Lines Matching refs:oldval

52 __kernel_cmpxchg (int oldval, int newval, int *mem)
57 register int lws_old asm("r25") = oldval;
72 if (!lws_errno && lws_ret != oldval)
119 unsigned int mask, shift, oldval, newval; \
126 oldval = *wordptr; \
127 newval = ((PFX_OP ((oldval & mask) >> shift) \
129 newval |= oldval & ~mask; \
130 failure = __kernel_cmpxchg (oldval, newval, wordptr); \
136 SUBWORD_SYNC_OP (add, , +, short, 2, oldval)
137 SUBWORD_SYNC_OP (sub, , -, short, 2, oldval)
138 SUBWORD_SYNC_OP (or, , |, short, 2, oldval)
139 SUBWORD_SYNC_OP (and, , &, short, 2, oldval)
140 SUBWORD_SYNC_OP (xor, , ^, short, 2, oldval)
141 SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval)
143 SUBWORD_SYNC_OP (add, , +, char, 1, oldval)
144 SUBWORD_SYNC_OP (sub, , -, char, 1, oldval)
145 SUBWORD_SYNC_OP (or, , |, char, 1, oldval)
146 SUBWORD_SYNC_OP (and, , &, char, 1, oldval)
147 SUBWORD_SYNC_OP (xor, , ^, char, 1, oldval)
148 SUBWORD_SYNC_OP (nand, ~, &, char, 1, oldval)
186 __sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval)
194 if (oldval != actual_oldval)
200 return oldval;
206 __sync_val_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \
219 if (((actual_oldval & mask) >> shift) != (unsigned int) oldval) \
229 return oldval; \
239 __sync_bool_compare_and_swap_4 (int *ptr, int oldval, int newval)
241 int failure = __kernel_cmpxchg (oldval, newval, ptr);
247 __sync_bool_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \
251 = __sync_val_compare_and_swap_##WIDTH (ptr, oldval, newval); \
252 return (oldval == actual_oldval); \
261 int failure, oldval;
264 oldval = *ptr;
265 failure = __kernel_cmpxchg (oldval, val, ptr);
268 return oldval;
276 unsigned int oldval, newval, shift, mask; \
283 oldval = *wordptr; \
284 newval = (oldval & ~mask) \
286 failure = __kernel_cmpxchg (oldval, newval, wordptr); \
289 return (oldval & mask) >> shift; \