[libc-commits] [libc] [libc][semaphore] Add post and wait operations for internal semaphore (PR #198959)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Thu Jul 16 14:50:05 PDT 2026


================
@@ -8,24 +8,129 @@
 
 #include "hdr/errno_macros.h"
 #include "hdr/fcntl_macros.h"
+#include "hdr/time_macros.h"
+#include "hdr/types/struct_timespec.h"
+#include "src/__support/time/clock_gettime.h"
 #include "src/semaphore/linux/semaphore.h"
 #include "test/UnitTest/Test.h"
 
 using LIBC_NAMESPACE::Semaphore;
 
 TEST(LlvmLibcSemaphoreTest, InitAndGetValue) {
----------------
michaelrj-google wrote:

add a test covering the case where the semaphore number is greater than `SEM_VALUE_MAX`.

https://github.com/llvm/llvm-project/pull/198959


More information about the libc-commits mailing list