X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/a0655e5d30f3cdc73b1aaaa4825d8fae9f92ce4a..5aac681ee637d268960316d121129f95591339da:/lunaix-os/includes/lunaix/ds/semaphore.h diff --git a/lunaix-os/includes/lunaix/ds/semaphore.h b/lunaix-os/includes/lunaix/ds/semaphore.h index e202d14..aa7045f 100644 --- a/lunaix-os/includes/lunaix/ds/semaphore.h +++ b/lunaix-os/includes/lunaix/ds/semaphore.h @@ -3,15 +3,19 @@ #include -struct sem_t { - _Atomic unsigned int counter; +struct sem_t +{ + atomic_ulong counter; // FUTURE: might need a waiting list }; -void sem_init(struct sem_t *sem, unsigned int initial); +void +sem_init(struct sem_t* sem, unsigned int initial); -void sem_wait(struct sem_t *sem); +void +sem_wait(struct sem_t* sem); -void sem_post(struct sem_t *sem); +void +sem_post(struct sem_t* sem); #endif /* __LUNAIX_SEMAPHORE_H */