From ba80a015ee80c01be5100b8b94794b8784aa562b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 20 Jun 2000 04:46:22 +0000 Subject: 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. --- linuxthreads/spinlock.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'linuxthreads/spinlock.c') diff --git a/linuxthreads/spinlock.c b/linuxthreads/spinlock.c index 3f5b823..60d056a 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 */ -- cgit v1.1