[libc-commits] [libc] [libc] Implement pthread_getattr_np (PR #221231)
via libc-commits
libc-commits at lists.llvm.org
Mon Sep 7 02:13:45 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/hdr/types/pthread_attr_t.h libc/src/pthread/pthread_getattr_np.cpp libc/test/integration/src/pthread/pthread_getattr_np_test.cpp libc/src/__support/threads/linux/thread.cpp libc/src/pthread/pthread_getattr_np.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_getattr_np_test.cpp b/libc/test/integration/src/pthread/pthread_getattr_np_test.cpp
index 6fe9f87c1..ccba2102a 100644
--- a/libc/test/integration/src/pthread/pthread_getattr_np_test.cpp
+++ b/libc/test/integration/src/pthread/pthread_getattr_np_test.cpp
@@ -255,10 +255,9 @@ static void test_child_thread_dynamic_detach() {
TEST_MAIN() {
// Barriers cannot be destroyed safely due to issue #221680.
- ASSERT_EQ(
- LIBC_NAMESPACE::pthread_barrier_init(&ready_barrier, nullptr, 2), 0);
- ASSERT_EQ(
- LIBC_NAMESPACE::pthread_barrier_init(&done_barrier, nullptr, 2), 0);
+ ASSERT_EQ(LIBC_NAMESPACE::pthread_barrier_init(&ready_barrier, nullptr, 2),
+ 0);
+ ASSERT_EQ(LIBC_NAMESPACE::pthread_barrier_init(&done_barrier, nullptr, 2), 0);
test_main_thread();
test_child_thread_default();
``````````
</details>
https://github.com/llvm/llvm-project/pull/221231
More information about the libc-commits
mailing list