mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
semaphore: fix init macro
This commit is contained in:
@@ -16,9 +16,10 @@ typedef struct {
|
|||||||
} semaphore_t;
|
} semaphore_t;
|
||||||
|
|
||||||
#define SEMAPHORE_INIT(x, v) { \
|
#define SEMAPHORE_INIT(x, v) { \
|
||||||
(x)->val = v; \
|
(x)->i = v; \
|
||||||
SPINLOCK_INIT((x)->lock); \
|
SPINLOCK_INIT((x)->lock); \
|
||||||
(x)->list = NULL; \
|
(x)->tail = NULL; \
|
||||||
|
(x)->head = NULL; \
|
||||||
}
|
}
|
||||||
|
|
||||||
int semaphore_wait(semaphore_t *sem, bool interruptible);
|
int semaphore_wait(semaphore_t *sem, bool interruptible);
|
||||||
|
|||||||
Reference in New Issue
Block a user