[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:41:24 PDT 2024


SchrodingerZhu wrote:

Thank you for this PR! First, my apology that I somehow break the pthread integration test in a recent patch. You can re-enable the test temporarily via the following the patch. I am trying to address this in a separate PR already.

```diff
diff --git a/libc/src/__support/threads/CMakeLists.txt b/libc/src/__support/threads/CMakeLists.txt
index f1a2f162acfc..ab474b23bcbf 100644
--- a/libc/src/__support/threads/CMakeLists.txt
+++ b/libc/src/__support/threads/CMakeLists.txt
@@ -101,7 +101,7 @@ endif()
 
 set(tid_dep)
 if (LLVM_LIBC_FULL_BUILD)
-  list(APPEND tid_dep libc.src.__support.thread)
+  list(APPEND tid_dep libc.src.__support.threads.thread)
 else()
   list(APPEND tid_dep libc.src.__support.OSUtil.osutil)
   list(APPEND tid_dep libc.include.sys_syscall)
```

You should be able to see that your integration test cases are broken due to some minor issues. Could you address them? Thank you!

```bash
[162/169] Building CXX object libc/test/integration/src/pthread/CMakeFi...src.pthread.pthread_rwlock_test.__build__.dir/pthread_rwlock_test.cpp.o
FAILED: libc/test/integration/src/pthread/CMakeFiles/libc.test.integration.src.pthread.pthread_rwlock_test.__build__.dir/pthread_rwlock_test.cpp.o 
sccache /usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -I/home/schrodinger/development/llvm-project/libc -isystem /home/schrodinger/development/llvm-project/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -std=gnu++17 -mcpu=native -fpie -ffreestanding -fno-exceptions -fno-rtti -DLIBC_FULL_BUILD -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -DLIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY=1 -DLIBC_COPT_ENABLE_TID_CACHE=1 -MD -MT libc/test/integration/src/pthread/CMakeFiles/libc.test.integration.src.pthread.pthread_rwlock_test.__build__.dir/pthread_rwlock_test.cpp.o -MF libc/test/integration/src/pthread/CMakeFiles/libc.test.integration.src.pthread.pthread_rwlock_test.__build__.dir/pthread_rwlock_test.cpp.o.d -o libc/test/integration/src/pthread/CMakeFiles/libc.test.integration.src.pthread.pthread_rwlock_test.__build__.dir/pthread_rwlock_test.cpp.o -c /home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:117:68: error: too few arguments to function call, expected 3, have 2
  117 |   ASSERT_EQ(LIBC_NAMESPACE::pthread_rwlock_clockrdlock(nullptr, &ts), EINVAL);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:62:35: note: expanded from macro 'ASSERT_EQ'
   62 |   __CHECK_EQ(__FILE__, __LINE__, (val1), (val2), true)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:33:8: note: expanded from macro '__CHECK_EQ'
   33 |   if ((val1) != (val2)) {                                                      \
      |        ^~~~
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockrdlock.h:17:5: note: 'pthread_rwlock_clockrdlock' declared here
   17 | int pthread_rwlock_clockrdlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:118:68: error: too few arguments to function call, expected 3, have 2
  118 |   ASSERT_EQ(LIBC_NAMESPACE::pthread_rwlock_clockwrlock(nullptr, &ts), EINVAL);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:62:35: note: expanded from macro 'ASSERT_EQ'
   62 |   __CHECK_EQ(__FILE__, __LINE__, (val1), (val2), true)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:33:8: note: expanded from macro '__CHECK_EQ'
   33 |   if ((val1) != (val2)) {                                                      \
      |        ^~~~
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockwrlock.h:17:5: note: 'pthread_rwlock_clockwrlock' declared here
   17 | int pthread_rwlock_clockwrlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:166:68: error: too few arguments to function call, expected 3, have 2
  166 |   ASSERT_EQ(LIBC_NAMESPACE::pthread_rwlock_clockrdlock(&rwlock, &ts), EINVAL);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:62:35: note: expanded from macro 'ASSERT_EQ'
   62 |   __CHECK_EQ(__FILE__, __LINE__, (val1), (val2), true)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:33:8: note: expanded from macro '__CHECK_EQ'
   33 |   if ((val1) != (val2)) {                                                      \
      |        ^~~~
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockrdlock.h:17:5: note: 'pthread_rwlock_clockrdlock' declared here
   17 | int pthread_rwlock_clockrdlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:167:68: error: too few arguments to function call, expected 3, have 2
  167 |   ASSERT_EQ(LIBC_NAMESPACE::pthread_rwlock_clockwrlock(&rwlock, &ts), EINVAL);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:62:35: note: expanded from macro 'ASSERT_EQ'
   62 |   __CHECK_EQ(__FILE__, __LINE__, (val1), (val2), true)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:33:8: note: expanded from macro '__CHECK_EQ'
   33 |   if ((val1) != (val2)) {                                                      \
      |        ^~~~
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockwrlock.h:17:5: note: 'pthread_rwlock_clockwrlock' declared here
   17 | int pthread_rwlock_clockwrlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:170:68: error: too few arguments to function call, expected 3, have 2
  170 |   ASSERT_EQ(LIBC_NAMESPACE::pthread_rwlock_clockrdlock(&rwlock, &ts), EINVAL);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:62:35: note: expanded from macro 'ASSERT_EQ'
   62 |   __CHECK_EQ(__FILE__, __LINE__, (val1), (val2), true)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:33:8: note: expanded from macro '__CHECK_EQ'
   33 |   if ((val1) != (val2)) {                                                      \
      |        ^~~~
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockrdlock.h:17:5: note: 'pthread_rwlock_clockrdlock' declared here
   17 | int pthread_rwlock_clockrdlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:171:68: error: too few arguments to function call, expected 3, have 2
  171 |   ASSERT_EQ(LIBC_NAMESPACE::pthread_rwlock_clockwrlock(&rwlock, &ts), EINVAL);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:62:35: note: expanded from macro 'ASSERT_EQ'
   62 |   __CHECK_EQ(__FILE__, __LINE__, (val1), (val2), true)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:33:8: note: expanded from macro '__CHECK_EQ'
   33 |   if ((val1) != (val2)) {                                                      \
      |        ^~~~
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockwrlock.h:17:5: note: 'pthread_rwlock_clockwrlock' declared here
   17 | int pthread_rwlock_clockwrlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:174:68: error: too few arguments to function call, expected 3, have 2
  174 |   ASSERT_EQ(LIBC_NAMESPACE::pthread_rwlock_clockrdlock(&rwlock, &ts), EINVAL);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:62:35: note: expanded from macro 'ASSERT_EQ'
   62 |   __CHECK_EQ(__FILE__, __LINE__, (val1), (val2), true)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:33:8: note: expanded from macro '__CHECK_EQ'
   33 |   if ((val1) != (val2)) {                                                      \
      |        ^~~~
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockrdlock.h:17:5: note: 'pthread_rwlock_clockrdlock' declared here
   17 | int pthread_rwlock_clockrdlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:175:68: error: too few arguments to function call, expected 3, have 2
  175 |   ASSERT_EQ(LIBC_NAMESPACE::pthread_rwlock_clockwrlock(&rwlock, &ts), EINVAL);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:62:35: note: expanded from macro 'ASSERT_EQ'
   62 |   __CHECK_EQ(__FILE__, __LINE__, (val1), (val2), true)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:33:8: note: expanded from macro '__CHECK_EQ'
   33 |   if ((val1) != (val2)) {                                                      \
      |        ^~~~
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockwrlock.h:17:5: note: 'pthread_rwlock_clockwrlock' declared here
   17 | int pthread_rwlock_clockwrlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:182:68: error: too few arguments to function call, expected 3, have 2
  182 |   ASSERT_EQ(LIBC_NAMESPACE::pthread_rwlock_clockrdlock(&rwlock, &ts),
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  183 |             ETIMEDOUT);
      |             ~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:62:35: note: expanded from macro 'ASSERT_EQ'
   62 |   __CHECK_EQ(__FILE__, __LINE__, (val1), (val2), true)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:33:8: note: expanded from macro '__CHECK_EQ'
   33 |   if ((val1) != (val2)) {                                                      \
      |        ^~~~
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockrdlock.h:17:5: note: 'pthread_rwlock_clockrdlock' declared here
   17 | int pthread_rwlock_clockrdlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:184:68: error: too few arguments to function call, expected 3, have 2
  184 |   ASSERT_EQ(LIBC_NAMESPACE::pthread_rwlock_clockwrlock(&rwlock, &ts),
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  185 |             ETIMEDOUT);
      |             ~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:62:35: note: expanded from macro 'ASSERT_EQ'
   62 |   __CHECK_EQ(__FILE__, __LINE__, (val1), (val2), true)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:33:8: note: expanded from macro '__CHECK_EQ'
   33 |   if ((val1) != (val2)) {                                                      \
      |        ^~~~
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockwrlock.h:17:5: note: 'pthread_rwlock_clockwrlock' declared here
   17 | int pthread_rwlock_clockwrlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:201:68: error: too few arguments to function call, expected 3, have 2
  201 |   ASSERT_EQ(LIBC_NAMESPACE::pthread_rwlock_clockwrlock(&rwlock, &ts),
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
  202 |             ETIMEDOUT);
      |             ~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:62:35: note: expanded from macro 'ASSERT_EQ'
   62 |   __CHECK_EQ(__FILE__, __LINE__, (val1), (val2), true)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:33:8: note: expanded from macro '__CHECK_EQ'
   33 |   if ((val1) != (val2)) {                                                      \
      |        ^~~~
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockwrlock.h:17:5: note: 'pthread_rwlock_clockwrlock' declared here
   17 | int pthread_rwlock_clockwrlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:203:68: error: too few arguments to function call, expected 3, have 2
  203 |   ASSERT_EQ(LIBC_NAMESPACE::pthread_rwlock_clockrdlock(&rwlock, &ts), 0);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:62:35: note: expanded from macro 'ASSERT_EQ'
   62 |   __CHECK_EQ(__FILE__, __LINE__, (val1), (val2), true)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/IntegrationTest/test.h:33:8: note: expanded from macro '__CHECK_EQ'
   33 |   if ((val1) != (val2)) {                                                      \
      |        ^~~~
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockrdlock.h:17:5: note: 'pthread_rwlock_clockrdlock' declared here
   17 | int pthread_rwlock_clockrdlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:382:68: error: too few arguments to function call, expected 3, have 2
  382 |     if (LIBC_NAMESPACE::pthread_rwlock_clockrdlock(&data->lock, &ts) == 0) {
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                 ^
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockrdlock.h:17:5: note: 'pthread_rwlock_clockrdlock' declared here
   17 | int pthread_rwlock_clockrdlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/schrodinger/development/llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:390:68: error: too few arguments to function call, expected 3, have 2
  390 |     if (LIBC_NAMESPACE::pthread_rwlock_clockwrlock(&data->lock, &ts) == 0) {
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                 ^
/home/schrodinger/development/llvm-project/libc/src/pthread/pthread_rwlock_clockwrlock.h:17:5: note: 'pthread_rwlock_clockwrlock' declared here
   17 | int pthread_rwlock_clockwrlock(pthread_rwlock_t *__restrict rwlock,
      |     ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   18 |                                clockid_t clockid,
      |                                ~~~~~~~~~~~~~~~~~~
   19 |                                const timespec *__restrict abstime);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 errors generated.
[165/169] Running integration test libc.test.integration.src.pthread.pthread_test
ninja: build stopped: subcommand failed.
```

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


More information about the libc-commits mailing list