[libc-commits] [libc] [libc][POSIX][pthreads] implemented missing pthread_rwlockattr functions (PR #90249)
via libc-commits
libc-commits at lists.llvm.org
Fri Apr 26 15:16:44 PDT 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 5fd9bbdea6cc248469d5465de44e747378ffafcb 5326ae645cf50a44d22d11b14942a6ea01a098fc -- libc/src/pthread/pthread_rwlockattr_getkind_np.cpp libc/src/pthread/pthread_rwlockattr_getkind_np.h libc/src/pthread/pthread_rwlockattr_setkind_np.cpp libc/src/pthread/pthread_rwlockattr_setkind_np.h libc/src/pthread/pthread_rwlockattr_init.cpp libc/test/src/pthread/pthread_rwlockattr_test.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/pthread/pthread_rwlockattr_getkind_np.cpp b/libc/src/pthread/pthread_rwlockattr_getkind_np.cpp
index a80ef41fb2..0c821797b4 100644
--- a/libc/src/pthread/pthread_rwlockattr_getkind_np.cpp
+++ b/libc/src/pthread/pthread_rwlockattr_getkind_np.cpp
@@ -15,7 +15,8 @@
namespace LIBC_NAMESPACE {
LLVM_LIBC_FUNCTION(int, pthread_rwlockattr_getkind_np,
- (const pthread_rwlockattr_t *__restrict attr, int *__restrict pref)) {
+ (const pthread_rwlockattr_t *__restrict attr,
+ int *__restrict pref)) {
*pref = attr->pref;
return 0;
}
diff --git a/libc/src/pthread/pthread_rwlockattr_getkind_np.h b/libc/src/pthread/pthread_rwlockattr_getkind_np.h
index 827506d955..51f633cd55 100644
--- a/libc/src/pthread/pthread_rwlockattr_getkind_np.h
+++ b/libc/src/pthread/pthread_rwlockattr_getkind_np.h
@@ -13,7 +13,8 @@
namespace LIBC_NAMESPACE {
-int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *__restrict attr, int *__restrict pref);
+int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *__restrict attr,
+ int *__restrict pref);
} // namespace LIBC_NAMESPACE
diff --git a/libc/src/pthread/pthread_rwlockattr_setkind_np.cpp b/libc/src/pthread/pthread_rwlockattr_setkind_np.cpp
index ca3ab7d4a9..47fbf2a851 100644
--- a/libc/src/pthread/pthread_rwlockattr_setkind_np.cpp
+++ b/libc/src/pthread/pthread_rwlockattr_setkind_np.cpp
@@ -16,7 +16,7 @@
namespace LIBC_NAMESPACE {
LLVM_LIBC_FUNCTION(int, pthread_rwlockattr_setkind_np,
- (pthread_rwlockattr_t *attr, int pref)) {
+ (pthread_rwlockattr_t * attr, int pref)) {
if (pref != PTHREAD_RWLOCK_PREFER_READER_NP &&
pref != PTHREAD_RWLOCK_PREFER_WRITER_NP &&
``````````
</details>
https://github.com/llvm/llvm-project/pull/90249
More information about the libc-commits
mailing list