Lines Matching full:l
19 #define local_read(l) atomic_long_read(&(l)->a) argument
20 #define local_set(l, i) atomic_long_set(&(l)->a, (i)) argument
22 #define local_add(i, l) atomic_long_add((i), (&(l)->a)) argument
23 #define local_sub(i, l) atomic_long_sub((i), (&(l)->a)) argument
24 #define local_inc(l) atomic_long_inc(&(l)->a) argument
25 #define local_dec(l) atomic_long_dec(&(l)->a) argument
30 static __inline__ long local_add_return(long i, local_t * l) in local_add_return() argument
47 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter) in local_add_return()
48 : "Ir" (i), "m" (l->a.counter) in local_add_return()
63 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter) in local_add_return()
64 : "Ir" (i), "m" (l->a.counter) in local_add_return()
70 result = l->a.counter; in local_add_return()
72 l->a.counter = result; in local_add_return()
79 static __inline__ long local_sub_return(long i, local_t * l) in local_sub_return() argument
96 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter) in local_sub_return()
97 : "Ir" (i), "m" (l->a.counter) in local_sub_return()
112 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter) in local_sub_return()
113 : "Ir" (i), "m" (l->a.counter) in local_sub_return()
119 result = l->a.counter; in local_sub_return()
121 l->a.counter = result; in local_sub_return()
128 #define local_cmpxchg(l, o, n) \ argument
129 ((long)cmpxchg_local(&((l)->a.counter), (o), (n)))
130 #define local_xchg(l, n) (atomic_long_xchg((&(l)->a), (n))) argument
134 * @l: pointer of type local_t
135 * @a: the amount to add to l...
136 * @u: ...unless l is equal to u.
138 * Atomically adds @a to @l, so long as it was not @u.
139 * Returns non-zero if @l was not @u, and zero otherwise.
141 #define local_add_unless(l, a, u) \ argument
144 c = local_read(l); \
145 while (c != (u) && (old = local_cmpxchg((l), c, c + (a))) != c) \
149 #define local_inc_not_zero(l) local_add_unless((l), 1, 0) argument
151 #define local_dec_return(l) local_sub_return(1, (l)) argument
152 #define local_inc_return(l) local_add_return(1, (l)) argument
157 * @l: pointer of type local_t
159 * Atomically subtracts @i from @l and returns
163 #define local_sub_and_test(i, l) (local_sub_return((i), (l)) == 0) argument
167 * @l: pointer of type local_t
169 * Atomically increments @l by 1
173 #define local_inc_and_test(l) (local_inc_return(l) == 0) argument
177 * @l: pointer of type local_t
179 * Atomically decrements @l by 1 and
183 #define local_dec_and_test(l) (local_sub_return(1, (l)) == 0) argument
187 * @l: pointer of type local_t
190 * Atomically adds @i to @l and returns true
194 #define local_add_negative(i, l) (local_add_return(i, (l)) < 0) argument
201 #define __local_inc(l) ((l)->a.counter++) argument
202 #define __local_dec(l) ((l)->a.counter++) argument
203 #define __local_add(i, l) ((l)->a.counter+=(i)) argument
204 #define __local_sub(i, l) ((l)->a.counter-=(i)) argument