Home | History | Annotate | Download | only in libpthread

Lines Matching defs:owner

139 pthread__rwlock_spin(uintptr_t owner)
144 if ((owner & ~RW_THREAD) != RW_WRITE_LOCKED)
147 thread = (pthread_t)(owner & RW_THREAD);
160 uintptr_t owner, next;
168 for (owner = (uintptr_t)ptr->ptr_owner;; owner = next) {
170 * Read the lock owner field. If the need-to-wait
173 if ((owner & (RW_WRITE_LOCKED | RW_WRITE_WANTED)) == 0) {
174 next = rw_cas(ptr, owner, owner + RW_READ_INCR);
175 if (owner == next) {
191 if ((owner & RW_THREAD) == (uintptr_t)self)
195 if (pthread__rwlock_spin(owner)) {
196 while (pthread__rwlock_spin(owner)) {
197 owner = (uintptr_t)ptr->ptr_owner;
199 next = owner;
214 next = rw_cas(ptr, owner, owner | RW_HAS_WAITERS);
215 if (owner != next) {
249 uintptr_t owner, next;
262 for (owner = (uintptr_t)ptr->ptr_owner;; owner = next) {
263 if ((owner & (RW_WRITE_LOCKED | RW_WRITE_WANTED)) != 0)
265 next = rw_cas(ptr, owner, owner + RW_READ_INCR);
266 if (owner == next) {
279 uintptr_t owner, next;
290 for (owner = (uintptr_t)ptr->ptr_owner;; owner = next) {
292 * Read the lock owner field. If the need-to-wait
295 if ((owner & RW_THREAD) == 0) {
296 next = rw_cas(ptr, owner,
298 if (owner == next) {
313 if ((owner & RW_THREAD) == (uintptr_t)self)
317 if (pthread__rwlock_spin(owner)) {
318 while (pthread__rwlock_spin(owner)) {
319 owner = (uintptr_t)ptr->ptr_owner;
321 next = owner;
336 next = rw_cas(ptr, owner,
337 owner | RW_HAS_WAITERS | RW_WRITE_WANTED);
338 if (owner != next) {
370 uintptr_t owner, next;
382 for (owner = (uintptr_t)ptr->ptr_owner;; owner = next) {
383 if (owner != 0)
385 next = rw_cas(ptr, owner, (uintptr_t)self | RW_WRITE_LOCKED);
386 if (owner == next) {
446 uintptr_t owner, decr, new, next;
465 owner = (uintptr_t)ptr->ptr_owner;
466 if ((owner & RW_WRITE_LOCKED) != 0) {
469 if ((owner & RW_THREAD) != (uintptr_t)self) {
474 if (owner == 0) {
479 for (;; owner = next) {
485 new = (owner - decr);
487 next = rw_cas(ptr, owner, new);
488 if (owner == next) {
502 owner = (uintptr_t)ptr->ptr_owner;
503 if ((owner & RW_HAS_WAITERS) == 0) {
505 next = owner;
578 uintptr_t owner, set, newval, next;
588 owner = (uintptr_t)ptr->ptr_owner;
590 if ((owner & RW_THREAD) == 0) {
602 for (;; owner = next) {
603 newval = (owner & ~(RW_HAS_WAITERS | RW_WRITE_WANTED)) | set;
604 next = rw_cas(ptr, owner, newval);
605 if (owner == next)
614 uintptr_t owner = (uintptr_t)ptr->ptr_owner;
616 if ((owner & RW_WRITE_LOCKED) != 0)
617 return (owner & RW_THREAD) == (uintptr_t)pthread__self();
618 return (owner & RW_THREAD) != 0;
624 uintptr_t owner = (uintptr_t)ptr->ptr_owner;
626 return (owner & RW_THREAD) != 0 && (owner & RW_WRITE_LOCKED) == 0;
632 uintptr_t owner = (uintptr_t)ptr->ptr_owner;
634 return (owner & (RW_THREAD | RW_WRITE_LOCKED)) ==