1 #include "pthread_impl.h"
3 static volatile int vmlock[2];
8 while ((tmp=vmlock[0]))
9 __wait(vmlock, vmlock+1, tmp, 1);
12 void __vm_lock(pthread_t self)
17 void __vm_unlock(pthread_t self)
19 if (a_fetch_add(vmlock, -1)==1 && vmlock[1])
20 __wake(vmlock, -1, 1);