Lines Matching defs:owner
254 pthread__mutex_spin(pthread_mutex_t *ptm, pthread_t owner)
259 for (count = 2;; owner = ptm->ptm_owner) {
260 thread = (pthread_t)MUTEX_OWNER(owner);
271 return owner;
277 void *newval, *owner, *next;
283 owner = ptm->ptm_owner;
290 if (MUTEX_OWNER(owner) == (uintptr_t)self) {
291 if (MUTEX_RECURSIVE(owner)) {
302 if (MUTEX_PROTECT(owner) && _sched_protect(ptm->ptm_ceiling) == -1) {
310 if (MUTEX_OWNER(owner) == 0) {
311 newval = (void *)((uintptr_t)self | (uintptr_t)owner);
312 next = atomic_cas_ptr(&ptm->ptm_owner, owner, newval);
313 if (__predict_false(next != owner)) {
314 owner = next;
322 } else if (MUTEX_OWNER(owner) != (uintptr_t)self) {
323 /* Spin while the owner is running. */
324 owner = pthread__mutex_spin(ptm, owner);
325 if (MUTEX_OWNER(owner) == 0) {
342 owner = ptm->ptm_owner;
385 if (MUTEX_PROTECT(owner))
391 owner = ptm->ptm_owner;