[libc-commits] [libc] [libc] Implement pthread_kill (PR #222625)

via libc-commits libc-commits at lists.llvm.org
Thu Sep 10 05:22:48 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,h -- libc/src/__support/OSUtil/linux/syscall_wrappers/tgkill.h libc/src/signal/linux/pthread_kill.cpp libc/src/signal/pthread_kill.h libc/test/integration/src/pthread/pthread_kill_test.cpp libc/src/__support/OSUtil/linux/syscall_wrappers/raise.h libc/src/__support/threads/linux/thread.cpp libc/src/__support/threads/thread.h --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/pthread/pthread_kill_test.cpp b/libc/test/integration/src/pthread/pthread_kill_test.cpp
index 1233a1e40..205e8b879 100644
--- a/libc/test/integration/src/pthread/pthread_kill_test.cpp
+++ b/libc/test/integration/src/pthread/pthread_kill_test.cpp
@@ -65,8 +65,7 @@ static void test_self_signal_zero() {
 
 static void test_self_signal_delivery() {
   pthread_t self = LIBC_NAMESPACE::pthread_self();
-  uint32_t initial =
-      usr1_count.load(LIBC_NAMESPACE::cpp::MemoryOrder::RELAXED);
+  uint32_t initial = usr1_count.load(LIBC_NAMESPACE::cpp::MemoryOrder::RELAXED);
   ASSERT_EQ(LIBC_NAMESPACE::pthread_kill(self, SIGUSR1), 0);
   ASSERT_EQ(usr1_count.load(LIBC_NAMESPACE::cpp::MemoryOrder::RELAXED),
             initial + 1);
@@ -81,8 +80,7 @@ static void *cross_thread_worker(void *initial_opaque) {
 
 static void test_cross_thread_signal() {
   pthread_t th;
-  uint32_t initial =
-      usr1_count.load(LIBC_NAMESPACE::cpp::MemoryOrder::RELAXED);
+  uint32_t initial = usr1_count.load(LIBC_NAMESPACE::cpp::MemoryOrder::RELAXED);
   ASSERT_EQ(LIBC_NAMESPACE::pthread_create(&th, nullptr, cross_thread_worker,
                                            reinterpret_cast<void *>(initial)),
             0);

``````````

</details>


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


More information about the libc-commits mailing list