aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/sem_wait.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/sem_wait.c')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sem_wait.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sem_wait.c b/nptl/sysdeps/unix/sysv/linux/sem_wait.c
index 05114c9..12f3f16 100644
--- a/nptl/sysdeps/unix/sysv/linux/sem_wait.c
+++ b/nptl/sysdeps/unix/sysv/linux/sem_wait.c
@@ -56,7 +56,9 @@ __new_sem_wait (sem_t *sem)
/* Enable asynchronous cancellation. Required by the standard. */
int oldtype = __pthread_enable_asynccancel ();
- err = lll_futex_wait (&isem->value, 0);
+ err = lll_futex_wait (&isem->value, 0,
+ // XYZ check mutex flag
+ LLL_SHARED);
/* Disable asynchronous cancellation. */
__pthread_disable_asynccancel (oldtype);
@@ -100,7 +102,8 @@ __old_sem_wait (sem_t *sem)
/* Enable asynchronous cancellation. Required by the standard. */
int oldtype = __pthread_enable_asynccancel ();
- err = lll_futex_wait (futex, 0);
+ /* Always assume the semaphore is shared. */
+ err = lll_futex_wait (futex, 0, LLL_SHARED);
/* Disable asynchronous cancellation. */
__pthread_disable_asynccancel (oldtype);