[libc-commits] [libc] [libc] fix lost signal issue in cnd_test (PR #201721)
via libc-commits
libc-commits at lists.llvm.org
Thu Jun 4 17:06:42 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- libc/test/integration/src/threads/cnd_test.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/test/integration/src/threads/cnd_test.cpp b/libc/test/integration/src/threads/cnd_test.cpp
index 222e2c7c8..03c9ff3b4 100644
--- a/libc/test/integration/src/threads/cnd_test.cpp
+++ b/libc/test/integration/src/threads/cnd_test.cpp
@@ -117,7 +117,8 @@ enum class WaitMode {
};
int waiter_thread_func(void *arg) {
- auto *waiter_unblocked = static_cast<LIBC_NAMESPACE::cpp::Atomic<bool> *>(arg);
+ auto *waiter_unblocked =
+ static_cast<LIBC_NAMESPACE::cpp::Atomic<bool> *>(arg);
LIBC_NAMESPACE::mtx_lock(&waiter_mtx);
LIBC_NAMESPACE::mtx_lock(&main_thread_mtx);
@@ -143,7 +144,8 @@ void single_waiter_test(WaitMode wait_mode) {
thrd_t waiter_thread;
LIBC_NAMESPACE::cpp::Atomic<bool> waiter_unblocked(false);
- LIBC_NAMESPACE::thrd_create(&waiter_thread, waiter_thread_func, &waiter_unblocked);
+ LIBC_NAMESPACE::thrd_create(&waiter_thread, waiter_thread_func,
+ &waiter_unblocked);
if (wait_mode == WaitMode::Default) {
ASSERT_EQ(LIBC_NAMESPACE::cnd_wait(&main_thread_cnd, &main_thread_mtx),
``````````
</details>
https://github.com/llvm/llvm-project/pull/201721
More information about the libc-commits
mailing list