about summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog6
-rw-r--r--linuxthreads/spinlock.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index fe1a4ed2e0..62567dad4d 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,9 @@
+2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
+
+	* spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
+	__compare_and_swap to compare_and_swap in code which assumes
+	compare swap is available.
+
 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
 
 	* spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
diff --git a/linuxthreads/spinlock.c b/linuxthreads/spinlock.c
index 43190a2eda..4ed4203970 100644
--- a/linuxthreads/spinlock.c
+++ b/linuxthreads/spinlock.c
@@ -417,8 +417,7 @@ void __pthread_alt_lock(struct _pthread_fastlock * lock,
     /* Make sure the store in wait_node.next completes before performing
        the compare-and-swap */
     MEMORY_BARRIER();
-  } while(! compare_and_swap(&lock->__status, oldstatus, newstatus,
-                             &lock->__spinlock));
+  } while(! __compare_and_swap(&lock->__status, oldstatus, newstatus));
 
   /* Suspend. Note that unlike in __pthread_lock, we don't worry
      here about spurious wakeup. That's because this lock is not
@@ -487,8 +486,7 @@ int __pthread_alt_timedlock(struct _pthread_fastlock * lock,
     /* Make sure the store in wait_node.next completes before performing
        the compare-and-swap */
     MEMORY_BARRIER();
-  } while(! compare_and_swap(&lock->__status, oldstatus, newstatus,
-                             &lock->__spinlock));
+  } while(! __compare_and_swap(&lock->__status, oldstatus, newstatus));
 #endif
 
 #if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP