X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Fsemaphore.h;h=3690f49609d16026db882032ec7d7e2363e5eaa0;hb=8c0c9c69a12acc0a82590d4fd64cf633ff1dedd2;hp=2e9b81005abe2618d3947044edca4fe36cd577a2;hpb=03dcc3417ce4388a652bdd053cb2b6af860daf00;p=musl diff --git a/include/semaphore.h b/include/semaphore.h index 2e9b8100..3690f496 100644 --- a/include/semaphore.h +++ b/include/semaphore.h @@ -4,6 +4,8 @@ extern "C" { #endif +#include + #define __NEED_time_t #define __NEED_struct_timespec #include @@ -13,20 +15,24 @@ extern "C" { #define SEM_FAILED ((sem_t *)0) typedef struct { - int __val[4*sizeof(long)/sizeof(int)]; + 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