From 9ec9e34ee301ccfa4216939639be5498831f9d37 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 26 Jul 2000 02:18:41 +0000 Subject: 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. --- linuxthreads/pthread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'linuxthreads/pthread.c') 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 -- cgit 1.4.1