Flesh out <sys/msg.h>, <sys/sem.h>, <sys/shm.h>.
Also fix <sys/ipc.h>.
Not useful except to systems/bringup folks for testing. Trivial tests
added, and double-checked under strace to see that things look right.
x86 -- which works differently to everything else -- tested on the host.
Bug: http://b/27952303
Change-Id: I328534e994ae9e90755f545478fba03038c0bb94
diff --git a/libc/include/sys/sem.h b/libc/include/sys/sem.h
index 753fc37..99873c1 100644
--- a/libc/include/sys/sem.h
+++ b/libc/include/sys/sem.h
@@ -30,6 +30,27 @@
#define _SYS_SEM_H_
#include <sys/cdefs.h>
+#include <sys/ipc.h>
+#include <sys/types.h>
+
+#if defined(__USE_GNU)
+#include <bits/timespec.h>
+#endif
+
#include <linux/sem.h>
-#endif /* _SYS_SEM_H_ */
+#define semid_ds semid64_ds
+
+__BEGIN_DECLS
+
+int semctl(int, int, int, ...) __INTRODUCED_IN_FUTURE;
+int semget(key_t, int, int) __INTRODUCED_IN_FUTURE;
+int semop(int, struct sembuf*, size_t) __INTRODUCED_IN_FUTURE;
+
+#if defined(__USE_GNU)
+int semtimedop(int, struct sembuf*, size_t, const struct timespec*) __INTRODUCED_IN_FUTURE;
+#endif
+
+__END_DECLS
+
+#endif