X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_spin_lock.c;h=ded2b653c4751db88f288af6b84f92a7341263b3;hb=4554f155dd23a65fcdfd39f1d5af8af55ba37694;hp=0462e0f3a4004ca469cf6f99f7c24566f383a423;hpb=7b1fb0c526936873a260e860ce3bca82113c3d4c;p=musl diff --git a/src/thread/pthread_spin_lock.c b/src/thread/pthread_spin_lock.c index 0462e0f3..ded2b653 100644 --- a/src/thread/pthread_spin_lock.c +++ b/src/thread/pthread_spin_lock.c @@ -1,7 +1,8 @@ #include "pthread_impl.h" +#include int pthread_spin_lock(pthread_spinlock_t *s) { - while (*(volatile int *)s || a_cas(s, 0, 1)) a_spin(); + while (*(volatile int *)s || a_cas(s, 0, EBUSY)) a_spin(); return 0; }