mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
(lll_mutex_cond_lock): Add one to value parameter of __lll_lock_wait to reflect reality in the futex syscall.
This commit is contained in:
@@ -118,7 +118,10 @@ extern void __lll_lock_wait (int *futex, int val) attribute_hidden;
|
||||
int __val = atomic_exchange_and_add (__futex, 2); \
|
||||
__asm __volatile (__lll_acq_instr ::: "memory"); \
|
||||
if (__builtin_expect (__val != 0, 0)) \
|
||||
__lll_lock_wait (__futex, __val); \
|
||||
/* Note, the val + 1 is kind of ugly here. __lll_lock_wait will add \
|
||||
1 again. But we added 2 to the futex value so this is the right \
|
||||
value which will be passed to the kernel. */ \
|
||||
__lll_lock_wait (__futex, __val + 1); \
|
||||
})
|
||||
|
||||
extern int __lll_timedlock_wait
|
||||
|
||||
Reference in New Issue
Block a user