X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Fsemaphore.h;h=724957fbe44635b2e080149908fec5035f7c8e5b;hp=5b68986d15f8b53db001e6f2a51840bd578f75a5;hb=c4ea0e3f8e286ec535691560d234d923b7f5d821;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 diff --git a/include/semaphore.h b/include/semaphore.h index 5b68986d..724957fb 100644 --- a/include/semaphore.h +++ b/include/semaphore.h @@ -4,19 +4,31 @@ extern "C" { #endif +#if __STDC_VERSION__ >= 199901L +#define __restrict restrict +#elif !defined(__GNUC__) +#define __restrict +#endif + +#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 *);