Lines 102-108
__pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock)
Link Here
|
102 |
overwrite the value set by the most recent writer (or the readers |
102 |
overwrite the value set by the most recent writer (or the readers |
103 |
before it in case of explicit hand-over) and we know that there |
103 |
before it in case of explicit hand-over) and we know that there |
104 |
are no waiting readers. */ |
104 |
are no waiting readers. */ |
105 |
atomic_store_relaxed (&rwlock->__data.__wrphase_futex, 0); |
105 |
/* TODO update above comment */ |
|
|
106 |
if ((atomic_exchange_relaxed (&rwlock->__data.__wrphase_futex, 0) |
107 |
& PTHREAD_RWLOCK_FUTEX_USED) != 0) |
108 |
{ |
109 |
int private = __pthread_rwlock_get_private (rwlock); |
110 |
futex_wake (&rwlock->__data.__wrphase_futex, INT_MAX, private); |
111 |
} |
106 |
} |
112 |
} |
107 |
|
113 |
|
108 |
return 0; |
114 |
return 0; |