about summary refs log tree commit diff
path: root/linuxthreads/spinlock.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-19 05:36:15 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-19 05:36:15 +0000
commita48297fdf310f0bf0fb29df1e185dd5f1561c1c1 (patch)
tree4909f4b6ec767d01616f31efc78a7d7b184ca00e /linuxthreads/spinlock.h
parent247c88694bd583af7967c9d785d5c3ebbd843de5 (diff)
downloadglibc-a48297fdf310f0bf0fb29df1e185dd5f1561c1c1.tar.gz
glibc-a48297fdf310f0bf0fb29df1e185dd5f1561c1c1.tar.xz
glibc-a48297fdf310f0bf0fb29df1e185dd5f1561c1c1.zip
Update.
	* spinlock.h (__pthread_trylock): Use __compare_and_swap, not
	compare_and_swap.
Diffstat (limited to 'linuxthreads/spinlock.h')
-rw-r--r--linuxthreads/spinlock.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/linuxthreads/spinlock.h b/linuxthreads/spinlock.h
index 435271d812..17efd183cd 100644
--- a/linuxthreads/spinlock.h
+++ b/linuxthreads/spinlock.h
@@ -22,7 +22,7 @@
 	semantics (it completes after previous writes.)
 
    For those platforms on which they are the same. HAS_COMPARE_AND_SWAP
-   should be defined. For those platforms on which they are different, 
+   should be defined. For those platforms on which they are different,
    HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS has to be defined.  */
 
 #ifndef HAS_COMPARE_AND_SWAP
@@ -115,12 +115,12 @@ static inline int __pthread_trylock (struct _pthread_fastlock * lock)
   do {
     oldstatus = lock->__status;
     if (oldstatus != 0) return EBUSY;
-  } while(! compare_and_swap(&lock->__status, 0, 1, &lock->__spinlock));
+  } while(! __compare_and_swap(&lock->__status, 0, 1));
   return 0;
 #endif
 }
 
-/* Variation of internal lock used for pthread_mutex_t, supporting 
+/* Variation of internal lock used for pthread_mutex_t, supporting
    timed-out waits.  Warning: do not mix these operations with the above ones
    over the same lock object! */