-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[libc][pthread] fix -Wmissing-field-initializers #126314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
6ef84f2
c380f97
bfc84ca
868122b
0f16df9
ff3e6d9
2da1ce2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,8 @@ | |
| #ifndef LLVM_LIBC_MACROS_PTHREAD_MACRO_H | ||
| #define LLVM_LIBC_MACROS_PTHREAD_MACRO_H | ||
|
|
||
| #include "null-macro.h" | ||
|
|
||
| #define PTHREAD_CREATE_JOINABLE 0 | ||
| #define PTHREAD_CREATE_DETACHED 1 | ||
|
|
||
|
|
@@ -25,8 +27,49 @@ | |
| #define PTHREAD_PROCESS_PRIVATE 0 | ||
| #define PTHREAD_PROCESS_SHARED 1 | ||
|
|
||
| #define PTHREAD_MUTEX_INITIALIZER {0} | ||
| #define PTHREAD_RWLOCK_INITIALIZER {0} | ||
| #ifdef __linux__ | ||
| #define PTHREAD_MUTEX_INITIALIZER \ | ||
| { \ | ||
| /* .__timed = */ 0, \ | ||
| /* .__recursive = */ 0, \ | ||
| /* .__robust = */ 0, \ | ||
| /* .__owner = */ NULL, \ | ||
| /* .__lock_count = */ 0, /* .__futex_word = */ \ | ||
| { \ | ||
| /* .__word = */ 0, \ | ||
| }, \ | ||
| } | ||
| #else | ||
| #define PTHREAD_MUTEX_INITIALIZER \ | ||
| { \ | ||
| /* .__timed = */ 0, /* .__recursive = */ 0, \ | ||
| /* .__robust = */ 0, /* .__owner = */ NULL, \ | ||
| /* .__lock_count = */ 0, \ | ||
| } | ||
| #endif | ||
|
|
||
| #define PTHREAD_RWLOCK_INITIALIZER \ | ||
| { \ | ||
| /* .__is_pshared = */ 0, \ | ||
| /* .__preference = */ 0, \ | ||
| /* .__state = */ 0, \ | ||
| /* .__write_tid = */ 0, /* .__wait_queue_mutex = */ \ | ||
|
||
| { \ | ||
| /* .__word = */ 0, \ | ||
| }, /* .__pending_readers = */ \ | ||
| { \ | ||
| /* .__word = */ 0, \ | ||
| }, /* .__pending_writers = */ \ | ||
| { \ | ||
| /* .__word = */ 0, \ | ||
| }, /* .__reader_serialization = */ \ | ||
| { \ | ||
| /* .__word = */ 0, \ | ||
| }, /* .__writer_serialization = */ \ | ||
| { \ | ||
| /* .__word = */ 0, \ | ||
| }, \ | ||
| } | ||
|
|
||
| // glibc extensions | ||
| #define PTHREAD_STACK_MIN (1 << 14) // 16KB | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.