[libc-commits] [libc] [libc] add pthread_rwlock_clockrdlock and pthread_rwlock_clockwrlock … (PR #100543)

Schrodinger ZHU Yifan via libc-commits libc-commits at lists.llvm.org
Sat Jul 27 20:53:28 PDT 2024


SchrodingerZhu wrote:

Could you also add the following to our documentation? Thank you!
```diff
diff --git a/libc/docs/dev/undefined_behavior.rst b/libc/docs/dev/undefined_behavior.rst
index b712780222aa..6c3963f069bb 100644
--- a/libc/docs/dev/undefined_behavior.rst
+++ b/libc/docs/dev/undefined_behavior.rst
@@ -116,3 +116,8 @@ inherited from parent process triggered inside the instruction window between ``
 and ``exec*``. As libc failed to maintain its internal states correctly, even though the
 functions used inside the signal handlers are marked as ``async-signal-safe`` (such as
 ``getpid``), they will still return wrong values or lead to other even worse situations.
+
+Unrecognized ``clockid_t`` values for ``pthread_rwlock_clock*`` APIs
+----------------------------------------------------------------------
+POSIX.1-2024 only demands support for ``CLOCK_REALTIME`` and ``CLOCK_MONOTONIC``. Currently,
+as in LLVM libc, if other clock ids are used, they will be treated as monotonic clocks.
```

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


More information about the libc-commits mailing list