semaphore: fix init macro

This commit is contained in:
Matheus
2023-05-04 13:44:11 -03:00
parent 26621aeac6
commit 12ee7b5e31
+3 -2
View File
@@ -16,9 +16,10 @@ typedef struct {
} semaphore_t;
#define SEMAPHORE_INIT(x, v) { \
(x)->val = v; \
(x)->i = v; \
SPINLOCK_INIT((x)->lock); \
(x)->list = NULL; \
(x)->tail = NULL; \
(x)->head = NULL; \
}
int semaphore_wait(semaphore_t *sem, bool interruptible);