Sourceware Bugzilla – Attachment 11457 Details for
Bug 23844
pthread_rwlock_trywrlock results in hang
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for tryrdlock function
tryrdlock.patch (text/plain), 840 bytes, created by
Rik Prohaska
on 2018-12-12 15:49:09 UTC
(
hide
)
Description:
patch for tryrdlock function
Filename:
MIME Type:
Creator:
Rik Prohaska
Created:
2018-12-12 15:49:09 UTC
Size:
840 bytes
patch
obsolete
>diff --git a/nptl/pthread_rwlock_tryrdlock.c b/nptl/pthread_rwlock_tryrdlock.c >index 4aec1fc15a..6bee2188cc 100644 >--- a/nptl/pthread_rwlock_tryrdlock.c >+++ b/nptl/pthread_rwlock_tryrdlock.c >@@ -102,7 +102,13 @@ __pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock) > overwrite the value set by the most recent writer (or the readers > before it in case of explicit hand-over) and we know that there > are no waiting readers. */ >- atomic_store_relaxed (&rwlock->__data.__wrphase_futex, 0); >+ /* TODO update above comment */ >+ if ((atomic_exchange_relaxed (&rwlock->__data.__wrphase_futex, 0) >+ & PTHREAD_RWLOCK_FUTEX_USED) != 0) >+ { >+ int private = __pthread_rwlock_get_private (rwlock); >+ futex_wake (&rwlock->__data.__wrphase_futex, INT_MAX, private); >+ } > } > > return 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 23844
:
11373
|
11448
|
11449
|
11450
| 11457