Lines Matching full:l

20 static __inline__ long local_read(const local_t *l)  in local_read()  argument
22 return READ_ONCE(l->v); in local_read()
25 static __inline__ void local_set(local_t *l, long i) in local_set() argument
27 WRITE_ONCE(l->v, i); in local_set()
31 static __inline__ void local_##op(long i, local_t *l) \
36 l->v c_op i; \
41 static __inline__ long local_##op##_return(long a, local_t *l) \
47 t = (l->v c_op a); \
60 #define local_add_negative(a, l) (local_add_return((a), (l)) < 0) argument
61 #define local_inc_return(l) local_add_return(1LL, l) argument
62 #define local_inc(l) local_inc_return(l) argument
66 * @l: pointer of type local_t
68 * Atomically increments @l by 1
72 #define local_inc_and_test(l) (local_inc_return(l) == 0) argument
74 #define local_dec_return(l) local_sub_return(1LL, l) argument
75 #define local_dec(l) local_dec_return(l) argument
76 #define local_sub_and_test(a, l) (local_sub_return((a), (l)) == 0) argument
77 #define local_dec_and_test(l) (local_dec_return((l)) == 0) argument
79 static __inline__ long local_cmpxchg(local_t *l, long o, long n) in local_cmpxchg() argument
85 t = l->v; in local_cmpxchg()
87 l->v = n; in local_cmpxchg()
93 static __inline__ long local_xchg(local_t *l, long n) in local_xchg() argument
99 t = l->v; in local_xchg()
100 l->v = n; in local_xchg()
108 * @l: pointer of type local_t
112 * Atomically adds @a to @l, so long as it was not @u.
113 * Returns non-zero if @l was not @u, and zero otherwise.
115 static __inline__ int local_add_unless(local_t *l, long a, long u) in local_add_unless() argument
121 if (l->v != u) { in local_add_unless()
122 l->v += a; in local_add_unless()
130 #define local_inc_not_zero(l) local_add_unless((l), 1, 0) argument
137 #define __local_inc(l) ((l)->v++) argument
138 #define __local_dec(l) ((l)->v++) argument
139 #define __local_add(i,l) ((l)->v+=(i)) argument
140 #define __local_sub(i,l) ((l)->v-=(i)) argument