Home | History | Annotate | Download | only in bionic

Lines Matching defs:cur_state

146     int32_t cur_state = rwlock->state;  // C++11 relaxed atomic read
147 if (__predict_true(cur_state >= 0)) {
149 done = __sync_bool_compare_and_swap(&rwlock->state, cur_state, cur_state + 1); // C++11 memory_order_aquire
158 int ret = __futex_wait_ex(&rwlock->state, rwlock_is_shared(rwlock), cur_state, rel_timeout);
179 int32_t cur_state = rwlock->state;
180 if (__predict_true(cur_state == 0)) {
191 int ret = __futex_wait_ex(&rwlock->state, rwlock_is_shared(rwlock), cur_state, rel_timeout);
212 int32_t cur_state = rwlock->state;
213 if ((cur_state >= 0) &&
214 __sync_bool_compare_and_swap(&rwlock->state, cur_state, cur_state + 1)) { // C++11 memory_order_acquire
230 int32_t cur_state = rwlock->state;
231 if ((cur_state == 0) &&
244 int32_t cur_state = rwlock->state;
245 if (cur_state == 0) {
248 if (cur_state == -1) {
266 } else { // cur_state > 0
269 done = __sync_bool_compare_and_swap(&rwlock->state, cur_state, cur_state - 1); // C++11 maybe memory_order_seq_cst?
270 if (done && (cur_state - 1) == 0) {