about summary refs log tree commit diff
path: root/linuxthreads/spinlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/spinlock.c')
-rw-r--r--linuxthreads/spinlock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/linuxthreads/spinlock.c b/linuxthreads/spinlock.c
index 102b1be5f7..5846c45fec 100644
--- a/linuxthreads/spinlock.c
+++ b/linuxthreads/spinlock.c
@@ -155,7 +155,7 @@ int __pthread_unlock(struct _pthread_fastlock * lock)
 #if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
   {
     WRITE_MEMORY_BARRIER();
-    lock->__spinlock = 0;
+    lock->__spinlock = LT_SPINLOCK_INIT;
     return 0;
   }
 #endif
@@ -394,7 +394,7 @@ void __pthread_alt_lock(struct _pthread_fastlock * lock,
     }
 
     WRITE_MEMORY_BARRIER();
-    lock->__spinlock = 0;
+    lock->__spinlock = LT_SPINLOCK_INIT;
 
     if (suspend_needed)
       suspend (self);
@@ -468,7 +468,7 @@ int __pthread_alt_timedlock(struct _pthread_fastlock * lock,
     }
 
     WRITE_MEMORY_BARRIER();
-    lock->__spinlock = 0;
+    lock->__spinlock = LT_SPINLOCK_INIT;
     goto suspend;
   }
 #endif
@@ -649,7 +649,7 @@ void __pthread_alt_unlock(struct _pthread_fastlock *lock)
 #if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
   {
     WRITE_MEMORY_BARRIER();
-    lock->__spinlock = 0;
+    lock->__spinlock = LT_SPINLOCK_INIT;
   }
 #endif
 }