X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Fsemaphore.h;h=3690f49609d16026db882032ec7d7e2363e5eaa0;hb=c99b7daafdbf1e2415bf408e67ca7813e7ddeedf;hp=5b68986d15f8b53db001e6f2a51840bd578f75a5;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/include/semaphore.h b/include/semaphore.h index 5b68986d..3690f496 100644 --- a/include/semaphore.h +++ b/include/semaphore.h @@ -4,23 +4,35 @@ extern "C" { #endif +#include + +#define __NEED_time_t +#define __NEED_struct_timespec +#include + +#include + #define SEM_FAILED ((sem_t *)0) typedef struct { - long __val[4]; + volatile int __val[4*sizeof(long)/sizeof(int)]; } sem_t; int sem_close(sem_t *); int sem_destroy(sem_t *); -int sem_getvalue(sem_t *, int *); +int sem_getvalue(sem_t *__restrict, int *__restrict); int sem_init(sem_t *, int, unsigned); sem_t *sem_open(const char *, int, ...); int sem_post(sem_t *); -int sem_timedwait(sem_t *, const struct timespec *); +int sem_timedwait(sem_t *__restrict, const struct timespec *__restrict); int sem_trywait(sem_t *); int sem_unlink(const char *); int sem_wait(sem_t *); +#if _REDIR_TIME64 +__REDIR(sem_timedwait, __sem_timedwait_time64); +#endif + #ifdef __cplusplus } #endif