diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-06-20 04:46:22 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-06-20 04:46:22 +0000 |
commit | ba80a015ee80c01be5100b8b94794b8784aa562b (patch) | |
tree | 7bb6db1e6fa726246c08346ce0732e393f174450 /linuxthreads/spinlock.c | |
parent | ea97f90c9a84ce5c8a7c60695f05adfd2b6bb295 (diff) | |
download | glibc-ba80a015ee80c01be5100b8b94794b8784aa562b.tar.gz glibc-ba80a015ee80c01be5100b8b94794b8784aa562b.tar.xz glibc-ba80a015ee80c01be5100b8b94794b8784aa562b.zip |
Update.
* malloc/Makefile: Change all references to memprof into memusage. * malloc/memprof.c: Rename to... * malloc/memusage.c: ...this. New file. * malloc/memprof.sh: Rename to... * malloc/memusage.sh: ...this. New file. * malloc/memprofstat.c: Rename to... * malloc/memusagestat.c: ...this. New file.
Diffstat (limited to 'linuxthreads/spinlock.c')
-rw-r--r-- | linuxthreads/spinlock.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/linuxthreads/spinlock.c b/linuxthreads/spinlock.c index 3f5b8233b0..60d056aada 100644 --- a/linuxthreads/spinlock.c +++ b/linuxthreads/spinlock.c @@ -95,7 +95,9 @@ again: /* No threads are waiting for this lock. Please note that we also enter this case if the lock is not taken at all. If this wouldn't be done here we would crash further down. */ - if (! compare_and_swap(&lock->__status, oldstatus, 0, &lock->__spinlock)) + if (! compare_and_swap_with_release_semantics (&lock->__status, + oldstatus, 0, + &lock->__spinlock)) goto again; return 0; } @@ -126,9 +128,9 @@ again: /* If max prio thread is at head, remove it with compare-and-swap to guard against concurrent lock operation */ thr = (pthread_descr) oldstatus; - if (! compare_and_swap(&lock->__status, - oldstatus, (long)(thr->p_nextlock), - &lock->__spinlock)) + if (! compare_and_swap_with_release_semantics + (&lock->__status, oldstatus, (long)(thr->p_nextlock), + &lock->__spinlock)) goto again; } else { /* No risk of concurrent access, remove max prio thread normally */ |