[libc-commits] [libc] [llvm] [libc] Implement pthread_cleanup_push and pthread_cleanup_pop (PR #223427)
via libc-commits
libc-commits at lists.llvm.org
Mon Sep 21 07:48:19 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 h,cpp -- libc/hdr/types/struct___pthread_cleanup_frame.h libc/include/llvm-libc-types/struct___pthread_cleanup_frame.h libc/src/__support/threads/cleanup_stack.h libc/src/pthread/__pthread_cleanup_pop.cpp libc/src/pthread/__pthread_cleanup_pop.h libc/src/pthread/__pthread_cleanup_push.cpp libc/src/pthread/__pthread_cleanup_push.h libc/test/integration/src/pthread/pthread_cleanup_test.cpp libc/include/llvm-libc-macros/pthread-macros.h libc/src/__support/threads/thread.cpp libc/src/__support/threads/thread_attributes.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/src/pthread/__pthread_cleanup_pop.cpp b/libc/src/pthread/__pthread_cleanup_pop.cpp
index 5cd82e684..67e3f43cc 100644
--- a/libc/src/pthread/__pthread_cleanup_pop.cpp
+++ b/libc/src/pthread/__pthread_cleanup_pop.cpp
@@ -21,8 +21,7 @@
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(void, __pthread_cleanup_pop, (int execute)) {
- __pthread_cleanup_frame *frame =
- current_thread().attrib->cleanup_stack.pop();
+ __pthread_cleanup_frame *frame = current_thread().attrib->cleanup_stack.pop();
LIBC_ASSERT(frame);
if (execute)
diff --git a/libc/src/pthread/__pthread_cleanup_push.cpp b/libc/src/pthread/__pthread_cleanup_push.cpp
index cc3f69ab1..1e658b7bc 100644
--- a/libc/src/pthread/__pthread_cleanup_push.cpp
+++ b/libc/src/pthread/__pthread_cleanup_push.cpp
@@ -21,7 +21,7 @@
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(void, __pthread_cleanup_push,
- (struct __pthread_cleanup_frame *frame,
+ (struct __pthread_cleanup_frame * frame,
void (*routine)(void *), void *arg)) {
LIBC_CRASH_ON_NULLPTR(frame);
LIBC_CRASH_ON_NULLPTR(routine);
``````````
</details>
https://github.com/llvm/llvm-project/pull/223427
More information about the libc-commits
mailing list