userspace fun: maze game and a new device to support it
[lunaix-os.git] / lunaix-os / kernel / ds / semaphore.c
index 84c01007b857de89d54819d9023a84846e4f6124..b02266c0574c8918824852790911188a597752e4 100644 (file)
@@ -12,6 +12,7 @@ sem_wait(struct sem_t* sem)
 {
     while (!atomic_load(&sem->counter)) {
         // FIXME: better thing like wait queue
+        sched_pass();
     }
     atomic_fetch_sub(&sem->counter, 1);
 }