preliminaries to adding POSIX semaphores
authorRich Felker <dalias@aerifal.cx>
Thu, 3 Mar 2011 23:32:26 +0000 (18:32 -0500)
committerRich Felker <dalias@aerifal.cx>
Thu, 3 Mar 2011 23:32:26 +0000 (18:32 -0500)
include/limits.h
include/semaphore.h

index 6757012b7afdd500a4468deffbc7dd80e1ee6ab0..e12819bab3a94cc63240ce5bd4033d407654b556 100644 (file)
@@ -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... */
 
index 5b68986d15f8b53db001e6f2a51840bd578f75a5..2e9b81005abe2618d3947044edca4fe36cd577a2 100644 (file)
@@ -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 *);