1 #include "pthread_impl.h"
3 void __lock(volatile int *l)
6 /* Do not use futexes because we insist that unlocking is a simple
7 * assignment to optimize non-pathological code with no contention. */
9 if (spins) spins--, a_spin();
10 else __syscall(SYS_sched_yield);