diff options
author | David Robillard <d@drobilla.net> | 2020-12-14 15:44:28 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-14 15:44:28 +0100 |
commit | 9226bfc74fa6580bbcec428e6291fb81cefe4e42 (patch) | |
tree | 7783a54207e94e95448a5a5278fb29c460aa3190 /src/zix/sem.h | |
parent | 3b6afde09317b4d79ffb8a65cb49d525fc7b4101 (diff) | |
download | jalv-9226bfc74fa6580bbcec428e6291fb81cefe4e42.tar.gz jalv-9226bfc74fa6580bbcec428e6291fb81cefe4e42.tar.bz2 jalv-9226bfc74fa6580bbcec428e6291fb81cefe4e42.zip |
Update zix
Diffstat (limited to 'src/zix/sem.h')
-rw-r--r-- | src/zix/sem.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/zix/sem.h b/src/zix/sem.h index e306052..faeb148 100644 --- a/src/zix/sem.h +++ b/src/zix/sem.h @@ -25,14 +25,16 @@ # include <limits.h> # include <windows.h> #else -# include <semaphore.h> # include <errno.h> +# include <semaphore.h> #endif #ifdef __cplusplus extern "C" { #endif +#include <stdbool.h> + /** @addtogroup zix @{ @@ -40,6 +42,8 @@ extern "C" { @{ */ +struct ZixSemImpl; + /** A counting semaphore. @@ -148,7 +152,7 @@ static inline ZixStatus zix_sem_init(ZixSem* sem, unsigned initial) { sem->sem = CreateSemaphore(NULL, initial, LONG_MAX, NULL); - return (sem->sem) ? ZIX_STATUS_ERROR : ZIX_STATUS_SUCCESS; + return (sem->sem) ? ZIX_STATUS_SUCCESS : ZIX_STATUS_ERROR; } static inline void |