Add posix semaphores support

There's still some bugs to work out on Windows and OpenBSD.
This commit is contained in:
Justine Tunney 2022-10-14 08:25:47 -07:00
parent f52f65b2e3
commit 8111462789
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
36 changed files with 779 additions and 59 deletions

View file

@ -19,6 +19,7 @@
#include "libc/calls/calls.h"
#include "libc/calls/struct/sigaction.h"
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "libc/fmt/itoa.h"
#include "libc/limits.h"
@ -29,6 +30,7 @@
#include "libc/stdio/rand.h"
#include "libc/stdio/stdio.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/f.h"
#include "libc/sysv/consts/sig.h"
#include "libc/testlib/testlib.h"
#include "libc/thread/thread.h"
@ -136,4 +138,7 @@ TEST(popen, torture) {
for (i = 0; i < n; ++i) {
ASSERT_EQ(0, pthread_join(t[i], 0));
}
for (i = 3; i < 16; ++i) {
ASSERT_SYS(EBADF, -1, fcntl(3, F_GETFL));
}
}