musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/thread/__lock.c 2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/__lock.c b/src/thread/__lock.c
index d1734096..5ba5dc5e 100644
--- a/src/thread/__lock.c
+++ b/src/thread/__lock.c
@@ -4,7 +4,7 @@ void __lock_2(volatile int *l)
{
if (!__syscall(SYS_futex, l, FUTEX_LOCK_PI, 0, 0))
return;
- int old, tid = __pthread_self()->tid;
+ int old, tid = __pthread_self()->tid|INT_MIN;
while ((old = a_cas(l, 0, tid))) {
a_cas(l, old, old|INT_MIN);
__syscall(SYS_futex, l, FUTEX_WAIT, old|INT_MIN, 0);
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月07日 16:42:54 +0000

AltStyle によって変換されたページ (->オリジナル) /