Home | History | Annotate | Download | only in bionic

Lines Matching refs:owner_tid

144   // owner_tid is read/written by both userspace code and kernel code. It includes three fields:
146 atomic_int owner_tid;
153 if (__predict_true(atomic_compare_exchange_strong_explicit(&mutex.owner_tid,
187 ret = -__futex_pi_lock_ex(&mutex.owner_tid, mutex.shared, use_realtime_clock, abs_timeout);
197 if (__predict_true(atomic_compare_exchange_strong_explicit(&mutex.owner_tid,
217 if (__predict_true(atomic_compare_exchange_strong_explicit(&mutex.owner_tid,
224 return -__futex_pi_unlock(&mutex.owner_tid, mutex.shared);
228 // The mutex should be in unlocked state (owner_tid == 0) when destroyed.
231 if (atomic_compare_exchange_strong_explicit(&mutex.owner_tid, &old_owner, 0xffffffff,
436 // atomic_int owner_tid; // Atomic(uint16_t) in 32-bit programs
448 // owner_tid is used only in recursive and errorcheck Non-PI mutexes to hold the mutex owner
457 atomic_int owner_tid;
474 _Atomic(uint16_t) owner_tid;
546 atomic_init(&mutex->owner_tid, 0);
680 // __futex_wait always waits on a 32-bit value. But state is 16-bit. For a normal mutex, the owner_tid
683 // owner_tid value in the value argument for __futex_wait, otherwise we may always get EAGAIN error.
692 static_assert(offsetof(pthread_mutex_internal_t, owner_tid) == 2, "");
694 uint32_t owner_tid = atomic_load_explicit(&mutex->owner_tid, memory_order_relaxed);
695 return __futex_wait_ex(&mutex->state, shared, (owner_tid << 16) | old_state,
714 if (tid == atomic_load_explicit(&mutex->owner_tid, memory_order_relaxed)) {
732 atomic_store_explicit(&mutex->owner_tid, tid, memory_order_relaxed);
751 atomic_store_explicit(&mutex->owner_tid, tid, memory_order_relaxed);
861 if ( tid != atomic_load_explicit(&mutex->owner_tid, memory_order_relaxed) ) {
880 atomic_store_explicit(&mutex->owner_tid, 0, memory_order_relaxed);
910 if (tid == atomic_load_explicit(&mutex->owner_tid, memory_order_relaxed)) {
931 atomic_store_explicit(&mutex->owner_tid, tid, memory_order_relaxed);