summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-03-03 18:32:26 -0500
committerRich Felker <dalias@aerifal.cx>2011-03-03 18:32:26 -0500
commit03dcc3417ce4388a652bdd053cb2b6af860daf00 (patch)
tree1097d2bbd9b8fb57f3e5ea952dd0f3f6d397e80f /include
parentb480808a6a511c9350a6559b63938ac261c83a76 (diff)
downloadmusl-03dcc3417ce4388a652bdd053cb2b6af860daf00.tar.gz
preliminaries to adding POSIX semaphores
Diffstat (limited to 'include')
-rw-r--r--include/limits.h1
-rw-r--r--include/semaphore.h8
2 files changed, 8 insertions, 1 deletions
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 <bits/alltypes.h>
+
+#include <fcntl.h>
+
#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 *);