aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/spinlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/spinlock.h')
-rw-r--r--linuxthreads/spinlock.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/linuxthreads/spinlock.h b/linuxthreads/spinlock.h
index d324abbc84..1707d3e42a 100644
--- a/linuxthreads/spinlock.h
+++ b/linuxthreads/spinlock.h
@@ -15,9 +15,11 @@
/* 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)