about summary refs log tree commit diff
path: root/linuxthreads/condvar.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-10-29 15:17:25 +0000
committerUlrich Drepper <drepper@redhat.com>1998-10-29 15:17:25 +0000
commitc5e340c71ba6f4563ca5fa245baa82b6363ddb2e (patch)
tree3ff655dfee624df411e1f3ebc062181fc0f3f338 /linuxthreads/condvar.c
parent05e951cd1ae7917ce25ec96cc17ebcbf401e345c (diff)
downloadglibc-c5e340c71ba6f4563ca5fa245baa82b6363ddb2e.tar.gz
glibc-c5e340c71ba6f4563ca5fa245baa82b6363ddb2e.tar.xz
glibc-c5e340c71ba6f4563ca5fa245baa82b6363ddb2e.zip
Update.
1998-10-29  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/ttyname_r.c (ttyname_r): Try reading
	/prof/self/fd/FD first.
	* sysdeps/unix/sysv/linux/ttyname.c (ttyname): Likewise.

	* stdio-common/_itoa.h (_fitoa_word): New inline function.  Write
	formatted number starting at given position and return pointer to
	following byte.
	(_fitoa): Likewise, for long long.
Diffstat (limited to 'linuxthreads/condvar.c')
-rw-r--r--linuxthreads/condvar.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/linuxthreads/condvar.c b/linuxthreads/condvar.c
index b880a38a73..cd22a241af 100644
--- a/linuxthreads/condvar.c
+++ b/linuxthreads/condvar.c
@@ -43,7 +43,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
 {
   volatile pthread_descr self = thread_self();
 
-  __pthread_lock(&cond->__c_lock);
+  __pthread_lock(&cond->__c_lock, self);
   enqueue(&cond->__c_waiting, self);
   __pthread_unlock(&cond->__c_lock);
   pthread_mutex_unlock(mutex);
@@ -53,7 +53,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
   if (THREAD_GETMEM(self, p_canceled)
       && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) {
     /* Remove ourselves from the waiting queue if we're still on it */
-    __pthread_lock(&cond->__c_lock);
+    __pthread_lock(&cond->__c_lock, self);
     remove_from_queue(&cond->__c_waiting, self);
     __pthread_unlock(&cond->__c_lock);
     pthread_exit(PTHREAD_CANCELED);
@@ -72,7 +72,7 @@ pthread_cond_timedwait_relative(pthread_cond_t *cond,
   sigjmp_buf jmpbuf;
 
   /* Wait on the condition */
-  __pthread_lock(&cond->__c_lock);
+  __pthread_lock(&cond->__c_lock, self);
   enqueue(&cond->__c_waiting, self);
   __pthread_unlock(&cond->__c_lock);
   pthread_mutex_unlock(mutex);
@@ -107,7 +107,7 @@ pthread_cond_timedwait_relative(pthread_cond_t *cond,
   /* This is a cancellation point */
   if (THREAD_GETMEM(self, p_canceled)
       && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) {
-    __pthread_lock(&cond->__c_lock);
+    __pthread_lock(&cond->__c_lock, self);
     remove_from_queue(&cond->__c_waiting, self);
     __pthread_unlock(&cond->__c_lock);
     pthread_mutex_lock(mutex);
@@ -115,7 +115,7 @@ pthread_cond_timedwait_relative(pthread_cond_t *cond,
   }
   /* If not signaled: also remove ourselves and return an error code */
   if (THREAD_GETMEM(self, p_signal) == 0) {
-    __pthread_lock(&cond->__c_lock);
+    __pthread_lock(&cond->__c_lock, self);
     remove_from_queue(&cond->__c_waiting, self);
     __pthread_unlock(&cond->__c_lock);
     pthread_mutex_lock(mutex);
@@ -147,7 +147,7 @@ int pthread_cond_signal(pthread_cond_t *cond)
 {
   pthread_descr th;
 
-  __pthread_lock(&cond->__c_lock);
+  __pthread_lock(&cond->__c_lock, NULL);
   th = dequeue(&cond->__c_waiting);
   __pthread_unlock(&cond->__c_lock);
   if (th != NULL) restart(th);
@@ -158,7 +158,7 @@ int pthread_cond_broadcast(pthread_cond_t *cond)
 {
   pthread_descr tosignal, th;
 
-  __pthread_lock(&cond->__c_lock);
+  __pthread_lock(&cond->__c_lock, NULL);
   /* Copy the current state of the waiting queue and empty it */
   tosignal = cond->__c_waiting;
   cond->__c_waiting = NULL;