diff options
Diffstat (limited to 'nptl/sysdeps/pthread')
-rw-r--r-- | nptl/sysdeps/pthread/createthread.c | 8 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/pthread_rwlock_rdlock.c | 2 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c | 2 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c | 4 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/pthread_rwlock_wrlock.c | 4 |
5 files changed, 11 insertions, 9 deletions
diff --git a/nptl/sysdeps/pthread/createthread.c b/nptl/sysdeps/pthread/createthread.c index 9d00e4e..ea12138 100644 --- a/nptl/sysdeps/pthread/createthread.c +++ b/nptl/sysdeps/pthread/createthread.c @@ -78,8 +78,9 @@ create_thread (struct pthread *pd, STACK_VARIABLES_PARMS) if (ARCH_CLONE (start_thread_debug, STACK_VARIABLES_ARGS, CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGNAL | CLONE_SETTLS | CLONE_PARENT_SETTID | - CLONE_CHILD_CLEARTID | CLONE_DETACHED | 0, - pd, &pd->tid, TLS_VALUE, &pd->tid) == -1) + CLONE_CHILD_CLEARTID | CLONE_DETACHED | + CLONE_SYSVSEM | 0, pd, &pd->tid, TLS_VALUE, + &pd->tid) == -1) /* Failed. */ return errno; @@ -151,7 +152,8 @@ create_thread (struct pthread *pd, STACK_VARIABLES_PARMS) if (ARCH_CLONE (start_thread, STACK_VARIABLES_ARGS, CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGNAL | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID | - CLONE_DETACHED | 0, pd, &pd->tid, TLS_VALUE, &pd->tid) == -1) + CLONE_DETACHED | CLONE_SYSVSEM | 0, pd, &pd->tid, TLS_VALUE, + &pd->tid) == -1) /* Failed. */ return errno; diff --git a/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c b/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c index 197af9c..7fb93df 100644 --- a/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c +++ b/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c @@ -57,7 +57,7 @@ __pthread_rwlock_rdlock (rwlock) a deadlock situation we recognize and report. */ if (rwlock->__data.__writer != 0 && __builtin_expect (rwlock->__data.__writer - == (pthread_t) THREAD_SELF, 0)) + == (pthread_t) THREAD_ID, 0)) { result = EDEADLK; break; diff --git a/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c b/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c index 9c18155..d5a75ba 100644 --- a/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c +++ b/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c @@ -60,7 +60,7 @@ pthread_rwlock_timedrdlock (rwlock, abstime) a deadlock situation we recognize and report. */ if (rwlock->__data.__writer != 0 && __builtin_expect (rwlock->__data.__writer - == (pthread_t) THREAD_SELF, 0)) + == (pthread_t) THREAD_ID, 0)) { result = EDEADLK; break; diff --git a/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c b/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c index e4d08ea..52308af 100644 --- a/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c +++ b/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c @@ -43,7 +43,7 @@ pthread_rwlock_timedwrlock (rwlock, abstime) if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0) { /* Mark self as writer. */ - rwlock->__data.__writer = (pthread_t) THREAD_SELF; + rwlock->__data.__writer = (pthread_t) THREAD_ID; break; } @@ -51,7 +51,7 @@ pthread_rwlock_timedwrlock (rwlock, abstime) a deadlock situation we recognize and report. */ if (rwlock->__data.__writer != 0 && __builtin_expect (rwlock->__data.__writer - == (pthread_t) THREAD_SELF, 0)) + == (pthread_t) THREAD_ID, 0)) { result = EDEADLK; break; diff --git a/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c b/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c index 03c37a1..171a14a 100644 --- a/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c +++ b/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c @@ -40,7 +40,7 @@ __pthread_rwlock_wrlock (rwlock) if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0) { /* Mark self as writer. */ - rwlock->__data.__writer = (pthread_t) THREAD_SELF; + rwlock->__data.__writer = (pthread_t) THREAD_ID; break; } @@ -48,7 +48,7 @@ __pthread_rwlock_wrlock (rwlock) a deadlock situation we recognize and report. */ if (rwlock->__data.__writer != 0 && __builtin_expect (rwlock->__data.__writer - == (pthread_t) THREAD_SELF, 0)) + == (pthread_t) THREAD_ID, 0)) { result = EDEADLK; break; |