semaphore: haswaiters and redo how threads are attached

This commit is contained in:
Matheus
2023-07-03 22:40:44 -03:00
parent 3839136009
commit 02b3d5696b
2 changed files with 31 additions and 16 deletions
+2
View File
@@ -21,9 +21,11 @@ typedef struct semaphore_t{
(x)->head = NULL; \
}
int semaphore_wait(semaphore_t *sem, bool interruptible);
void semaphore_signal(semaphore_t *sem);
bool semaphore_test(semaphore_t *sem);
bool semaphore_haswaiters(semaphore_t *sem);
#include <kernel/scheduler.h>