Searched refs:old_state (Results 1 – 9 of 9) sorted by relevance
/bionic/libc/bionic/ |
D | pthread_mutex.cpp | 560 uint16_t old_state = unlocked; in NormalMutexTryLock() local 561 if (__predict_true(atomic_compare_exchange_strong_explicit(&mutex->state, &old_state, in NormalMutexTryLock() 669 uint16_t old_state) { in RecursiveIncrement() argument 673 if (MUTEX_COUNTER_BITS_WILL_OVERFLOW(old_state)) { in RecursiveIncrement() 687 uint16_t old_state, in RecursiveOrErrorcheckMutexWait() argument 696 return __futex_wait_ex(&mutex->state, shared, old_state, use_realtime_clock, abs_timeout); in RecursiveOrErrorcheckMutexWait() 705 return __futex_wait_ex(&mutex->state, shared, (owner_tid << 16) | old_state, in RecursiveOrErrorcheckMutexWait() 713 uint16_t old_state = atomic_load_explicit(&mutex->state, memory_order_relaxed); in MutexLockWithTimeout() local 714 uint16_t mtype = (old_state & MUTEX_TYPE_MASK); in MutexLockWithTimeout() 715 uint16_t shared = (old_state & MUTEX_SHARED_MASK); in MutexLockWithTimeout() [all …]
|
D | pthread_rwlock.cpp | 263 static inline __always_inline bool __can_acquire_read_lock(int old_state, in __can_acquire_read_lock() argument 267 bool cannot_apply = __state_owned_by_writer(old_state) || in __can_acquire_read_lock() 268 (writer_nonrecursive_preferred && __state_have_pending_writers(old_state)); in __can_acquire_read_lock() 273 int old_state = atomic_load_explicit(&rwlock->state, memory_order_relaxed); in __pthread_rwlock_tryrdlock() local 275 …while (__predict_true(__can_acquire_read_lock(old_state, rwlock->writer_nonrecursive_preferred))) { in __pthread_rwlock_tryrdlock() 277 int new_state = old_state + STATE_READER_COUNT_CHANGE_STEP; in __pthread_rwlock_tryrdlock() 281 if (__predict_true(atomic_compare_exchange_weak_explicit(&rwlock->state, &old_state, new_state, in __pthread_rwlock_tryrdlock() 305 int old_state = atomic_load_explicit(&rwlock->state, memory_order_relaxed); in __pthread_rwlock_timedrdlock() local 306 if (__can_acquire_read_lock(old_state, rwlock->writer_nonrecursive_preferred)) { in __pthread_rwlock_timedrdlock() 317 old_state = atomic_fetch_or_explicit(&rwlock->state, STATE_HAVE_PENDING_READERS_FLAG, in __pthread_rwlock_timedrdlock() [all …]
|
D | pthread_join.cpp | 48 ThreadJoinState old_state = THREAD_NOT_JOINED; in pthread_join() local 49 while ((old_state == THREAD_NOT_JOINED || old_state == THREAD_EXITED_NOT_JOINED) && in pthread_join() 50 !atomic_compare_exchange_weak(&thread->join_state, &old_state, THREAD_JOINED)) { in pthread_join() 53 if (old_state == THREAD_DETACHED || old_state == THREAD_JOINED) { in pthread_join()
|
D | pthread_detach.cpp | 42 ThreadJoinState old_state = THREAD_NOT_JOINED; in pthread_detach() local 43 while (old_state == THREAD_NOT_JOINED && in pthread_detach() 44 !atomic_compare_exchange_weak(&thread->join_state, &old_state, THREAD_DETACHED)) { in pthread_detach() 47 if (old_state == THREAD_NOT_JOINED) { in pthread_detach() 49 } else if (old_state == THREAD_EXITED_NOT_JOINED) { in pthread_detach()
|
D | pthread_exit.cpp | 102 ThreadJoinState old_state = THREAD_NOT_JOINED; in pthread_exit() local 103 while (old_state == THREAD_NOT_JOINED && in pthread_exit() 104 !atomic_compare_exchange_weak(&thread->join_state, &old_state, THREAD_EXITED_NOT_JOINED)) { in pthread_exit() 127 if (old_state == THREAD_DETACHED) { in pthread_exit()
|
D | pthread_cond.cpp | 191 unsigned int old_state = atomic_load_explicit(&cond->state, memory_order_relaxed); in __pthread_cond_timedwait() local 198 int status = __futex_wait_ex(&cond->state, cond->process_shared(), old_state, in __pthread_cond_timedwait()
|
/bionic/libc/private/ |
D | bionic_lock.h | 54 LockState old_state = Unlocked; in trylock() local 55 return __predict_true(atomic_compare_exchange_strong_explicit(&state, &old_state, in trylock() 60 LockState old_state = Unlocked; in lock() local 61 if (__predict_true(atomic_compare_exchange_strong_explicit(&state, &old_state, in lock()
|
/bionic/libc/stdio/ |
D | stdio_ext.cpp | 80 int old_state = _EXT(fp)->_caller_handles_locking ? FSETLOCKING_BYCALLER : FSETLOCKING_INTERNAL; in __fsetlocking() local 82 return old_state; in __fsetlocking() 91 return old_state; in __fsetlocking()
|
/bionic/tests/ |
D | stdio_ext_test.cpp | 228 int old_state = __fsetlocking(stdout, FSETLOCKING_BYCALLER); in TEST() local 238 __fsetlocking(stdout, old_state); in TEST()
|