Lines Matching refs:Arg
41 template <typename Arg>
42 inline void SkOnce(SkOnceFlag* once, void (*f)(Arg), Arg arg);
48 template <typename Lock, typename Arg>
49 inline void SkOnce(bool* done, Lock* lock, void (*f)(Arg), Arg arg);
85 template <typename Lock, typename Arg>
86 static void sk_once_slow(bool* done, Lock* lock, void (*f)(Arg), Arg arg) {
89 f(arg);
91 // done before here---in particular, those done by calling f(arg)---are observable
95 // to and including f(arg), then check in *done=true as a subsequent change".
97 // We'll use this in the fast path to make sure f(arg)'s effects are
105 template <typename Lock, typename Arg>
106 inline void SkOnce(bool* done, Lock* lock, void (*f)(Arg), Arg arg) {
108 sk_once_slow(done, lock, f, arg);
112 // calling f(arg)---is at least as current as the value we read from done.
118 // happens after f(arg), so by syncing to done = true here we're
119 // forcing ourselves to also wait until the effects of f(arg) are readble.
123 template <typename Arg>
124 inline void SkOnce(SkOnceFlag* once, void (*f)(Arg), Arg arg) {
125 return SkOnce(once->mutableDone(), once, f, arg);
130 // (We pass _this_ as the function and the no-arg function as its argument. Cute eh?)