(acquire): Use helper function.
authordrepper <drepper>
Mon, 20 Apr 1998 18:13:14 +0000 (18:13 +0000)
committerdrepper <drepper>
Mon, 20 Apr 1998 18:13:14 +0000 (18:13 +0000)
linuxthreads/spinlock.h

index d324abb..1707d3e 100644 (file)
 
 /* Spin locks */
 
+extern void __pthread_acquire(int * spinlock);
+
 static inline void acquire(int * spinlock)
 {
-  while (testandset(spinlock)) __sched_yield();
+  if (testandset(spinlock)) __pthread_acquire(spinlock);
 }
 
 static inline void release(int * spinlock)