author | Rich Felker <dalias@aerifal.cx> | 2012年04月24日 13:55:06 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012年04月24日 13:55:06 -0400 |
commit | e7655ed37bc9c2d79d921af4f287ee5cf2788661 (patch) | |
tree | b21322ca5850ec44a9be633956a280f6786ab9de /src | |
parent | f34d0ea511e552851c8c6148fb113816f41e6759 (diff) | |
download | musl-e7655ed37bc9c2d79d921af4f287ee5cf2788661.tar.gz |
-rw-r--r-- | src/thread/__lock.c | 2 |
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); |