aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/pthread.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-26 02:18:41 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-26 02:18:41 +0000
commit9ec9e34ee301ccfa4216939639be5498831f9d37 (patch)
treee61a7957abfbeb4816cb6dc545c116b8e18159b5 /linuxthreads/pthread.c
parenta956d04575bbd053a1ff61a05a5526867633d0d0 (diff)
downloadglibc-9ec9e34ee301ccfa4216939639be5498831f9d37.tar
glibc-9ec9e34ee301ccfa4216939639be5498831f9d37.tar.gz
glibc-9ec9e34ee301ccfa4216939639be5498831f9d37.tar.bz2
glibc-9ec9e34ee301ccfa4216939639be5498831f9d37.zip
Update.
* internals.h (strict __pthread_descr_struct): Add p_sem_avail. * semaphore.c: Handle spurious wakeups. * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility. * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM. (__pthread_wait_for_restart): Likewise. * condvar.c (pthread_cond_wait): Also check whether thread is cancelable before aborting loop. (pthread_cond_timedwait): Likewise.
Diffstat (limited to 'linuxthreads/pthread.c')
-rw-r--r--linuxthreads/pthread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index 3a669c8dec..7195b2dedc 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -868,9 +868,9 @@ weak_alias (__pthread_getconcurrency, pthread_getconcurrency)
void __pthread_set_own_extricate_if(pthread_descr self, pthread_extricate_if *peif)
{
- __pthread_lock(self->p_lock, self);
+ __pthread_lock(THREAD_GETMEM(self, p_lock), self);
THREAD_SETMEM(self, p_extricate, peif);
- __pthread_unlock(self->p_lock);
+ __pthread_unlock(THREAD_GETMEM (self, p_lock));
}
/* Primitives for controlling thread execution */
@@ -881,10 +881,10 @@ void __pthread_wait_for_restart_signal(pthread_descr self)
sigprocmask(SIG_SETMASK, NULL, &mask); /* Get current signal mask */
sigdelset(&mask, __pthread_sig_restart); /* Unblock the restart signal */
+ THREAD_SETMEM(self, p_signal, 0);
do {
- self->p_signal = 0;
sigsuspend(&mask); /* Wait for signal */
- } while (self->p_signal !=__pthread_sig_restart );
+ } while (THREAD_GETMEM(self, p_signal) !=__pthread_sig_restart);
}
#if !__ASSUME_REALTIME_SIGNALS