mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
semaphore: fix init macro
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user