From: Rich Felker Date: Thu, 3 Mar 2011 23:32:26 +0000 (-0500) Subject: preliminaries to adding POSIX semaphores X-Git-Tag: v0.7.0~46 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=03dcc3417ce4388a652bdd053cb2b6af860daf00;p=oweals%2Fmusl.git preliminaries to adding POSIX semaphores --- diff --git a/include/limits.h b/include/limits.h index 6757012b..e12819ba 100644 --- a/include/limits.h +++ b/include/limits.h @@ -29,6 +29,7 @@ #define PTHREAD_KEYS_MAX 1024 #define PTHREAD_STACK_MIN PAGE_SIZE #define PTHREAD_DESTRUCTOR_ITERATIONS 4 +#define SEM_VALUE_MAX 0x7fffffff /* Arbitrary numbers... */ diff --git a/include/semaphore.h b/include/semaphore.h index 5b68986d..2e9b8100 100644 --- a/include/semaphore.h +++ b/include/semaphore.h @@ -4,10 +4,16 @@ extern "C" { #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 *);