X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Fsemaphore.h;h=20d46f0de2a70c6f4c1c9f10891af2e7b5dec787;hp=5b68986d15f8b53db001e6f2a51840bd578f75a5;hb=43653c1250ad5eb5385d7e08292ad047420f8d25;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 diff --git a/include/semaphore.h b/include/semaphore.h index 5b68986d..20d46f0d 100644 --- a/include/semaphore.h +++ b/include/semaphore.h @@ -4,19 +4,27 @@ 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]; + 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 *);