diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-05-25 06:15:25 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-05-25 06:15:25 +0000 |
commit | 0f5504179a2e37a20e409c48dcc8d640393cd16d (patch) | |
tree | 5e61a218eacec17393a6688dab8bb0e59943592b /linuxthreads/rwlock.c | |
parent | db33f7d4aef7422140d5e19c440bb5e084fbe186 (diff) | |
download | glibc-0f5504179a2e37a20e409c48dcc8d640393cd16d.tar.gz glibc-0f5504179a2e37a20e409c48dcc8d640393cd16d.tar.xz glibc-0f5504179a2e37a20e409c48dcc8d640393cd16d.zip |
Update.
2000-05-23 Jakub Jelinek <jakub@redhat.com> * sysdeps/i386/fpu/bits/mathinline.h (__sincos, __sincosf, __sincosl): Guard with __USE_GNU.
Diffstat (limited to 'linuxthreads/rwlock.c')
-rw-r--r-- | linuxthreads/rwlock.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/linuxthreads/rwlock.c b/linuxthreads/rwlock.c index e4a4c81f8c..9da87d25d1 100644 --- a/linuxthreads/rwlock.c +++ b/linuxthreads/rwlock.c @@ -217,7 +217,7 @@ __pthread_rwlock_destroy (pthread_rwlock_t *rwlock) __pthread_lock (&rwlock->__rw_lock, NULL); readers = rwlock->__rw_readers; writer = rwlock->__rw_writer; - __pthread_spin_unlock (&rwlock->__rw_lock); + __pthread_unlock (&rwlock->__rw_lock); if (readers > 0 || writer != NULL) return EBUSY; @@ -247,12 +247,12 @@ __pthread_rwlock_rdlock (pthread_rwlock_t *rwlock) break; enqueue (&rwlock->__rw_read_waiting, self); - __pthread_spin_unlock (&rwlock->__rw_lock); + __pthread_unlock (&rwlock->__rw_lock); suspend (self); /* This is not a cancellation point */ } ++rwlock->__rw_readers; - __pthread_spin_unlock (&rwlock->__rw_lock); + __pthread_unlock (&rwlock->__rw_lock); if (have_lock_already || out_of_mem) { @@ -291,7 +291,7 @@ __pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock) retval = 0; } - __pthread_spin_unlock (&rwlock->__rw_lock); + __pthread_unlock (&rwlock->__rw_lock); if (retval == 0) { @@ -320,13 +320,13 @@ __pthread_rwlock_wrlock (pthread_rwlock_t *rwlock) if (rwlock->__rw_readers == 0 && rwlock->__rw_writer == NULL) { rwlock->__rw_writer = self; - __pthread_spin_unlock (&rwlock->__rw_lock); + __pthread_unlock (&rwlock->__rw_lock); return 0; } /* Suspend ourselves, then try again */ enqueue (&rwlock->__rw_write_waiting, self); - __pthread_spin_unlock (&rwlock->__rw_lock); + __pthread_unlock (&rwlock->__rw_lock); suspend (self); /* This is not a cancellation point */ } } @@ -344,7 +344,7 @@ __pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock) rwlock->__rw_writer = thread_self (); result = 0; } - __pthread_spin_unlock (&rwlock->__rw_lock); + __pthread_unlock (&rwlock->__rw_lock); return result; } @@ -363,7 +363,7 @@ __pthread_rwlock_unlock (pthread_rwlock_t *rwlock) /* Unlocking a write lock. */ if (rwlock->__rw_writer != thread_self ()) { - __pthread_spin_unlock (&rwlock->__rw_lock); + __pthread_unlock (&rwlock->__rw_lock); return EPERM; } rwlock->__rw_writer = NULL; @@ -375,14 +375,14 @@ __pthread_rwlock_unlock (pthread_rwlock_t *rwlock) /* Restart all waiting readers. */ torestart = rwlock->__rw_read_waiting; rwlock->__rw_read_waiting = NULL; - __pthread_spin_unlock (&rwlock->__rw_lock); + __pthread_unlock (&rwlock->__rw_lock); while ((th = dequeue (&torestart)) != NULL) restart (th); } else { /* Restart one waiting writer. */ - __pthread_spin_unlock (&rwlock->__rw_lock); + __pthread_unlock (&rwlock->__rw_lock); restart (th); } } @@ -391,7 +391,7 @@ __pthread_rwlock_unlock (pthread_rwlock_t *rwlock) /* Unlocking a read lock. */ if (rwlock->__rw_readers == 0) { - __pthread_spin_unlock (&rwlock->__rw_lock); + __pthread_unlock (&rwlock->__rw_lock); return EPERM; } @@ -402,7 +402,7 @@ __pthread_rwlock_unlock (pthread_rwlock_t *rwlock) else th = NULL; - __pthread_spin_unlock (&rwlock->__rw_lock); + __pthread_unlock (&rwlock->__rw_lock); if (th != NULL) restart (th); |