[libc-commits] [libc] [libc] move pthread macros to dedicated header (PR #119286)

via libc-commits libc-commits at lists.llvm.org
Mon Dec 9 15:19:11 PST 2024


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 7d89ebfd5f93577e7b1f12d1d21ee3e87eacde07 3b4672309f7e2bca8101a6878f48117e4c9b451e --extensions h -- libc/include/llvm-libc-macros/pthread-macros.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/include/llvm-libc-macros/pthread-macros.h b/libc/include/llvm-libc-macros/pthread-macros.h
index 34ef450056..e170fd5683 100644
--- a/libc/include/llvm-libc-macros/pthread-macros.h
+++ b/libc/include/llvm-libc-macros/pthread-macros.h
@@ -26,7 +26,8 @@
 #define PTHREAD_PROCESS_SHARED 1
 
 #define PTHREAD_MUTEX_INITIALIZER {0}
-#define PTHREAD_RWLOCK_INITIALIZER {}
+#define PTHREAD_RWLOCK_INITIALIZER                                             \
+  {}
 
 // glibc extensions
 #define PTHREAD_STACK_MIN (1 << 14) // 16KB
@@ -35,4 +36,3 @@
 #define PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP 2
 
 #endif // LLVM_LIBC_MACROS_PTHREAD_MACRO_H
-

``````````

</details>


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


More information about the libc-commits mailing list