1 //===-- POSIX header pthread.h
--------------------------------------------===//
3 // Part of the LLVM Project
, under the Apache License v2.0 with LLVM Exceptions.
4 // See https
://llvm.org
/LICENSE.txt for license information.
5 // SPDX
-License
-Identifier
: Apache
-2.0 WITH LLVM
-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIBC_PTHREAD_H
10 #define LLVM_LIBC_PTHREAD_H
12 #include
"__llvm-libc-common.h"
14 // TODO
: move to a pthreads
-macros.h file
:
15 // https
://github.com
/llvm
/llvm
-project
/issues
/88997
17 #define
PTHREAD_STACK_MIN (1 << 14) // 16KB
19 #define PTHREAD_MUTEX_INITIALIZER
{0}
20 #define PTHREAD_RWLOCK_INITIALIZER
{}
21 #define PTHREAD_ONCE_INIT
{0}
24 PTHREAD_CREATE_JOINABLE
= 0x0,
25 PTHREAD_CREATE_DETACHED
= 0x1,
27 PTHREAD_MUTEX_NORMAL
= 0x0,
28 PTHREAD_MUTEX_ERRORCHECK
= 0x1,
29 PTHREAD_MUTEX_RECURSIVE
= 0x2,
30 PTHREAD_MUTEX_DEFAULT
= PTHREAD_MUTEX_NORMAL
,
32 PTHREAD_PROCESS_PRIVATE
= 0x0,
33 PTHREAD_PROCESS_SHARED
= 0x1,
35 PTHREAD_MUTEX_STALLED
= 0x0,
36 PTHREAD_MUTEX_ROBUST
= 0x1,
39 #define PTHREAD_PROCESS_PRIVATE
0
40 #define PTHREAD_PROCESS_SHARED
1
42 #define PTHREAD_RWLOCK_PREFER_READER_NP
0
43 #define PTHREAD_RWLOCK_PREFER_WRITER_NP
1
44 #define PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP
2
49 #endif
// LLVM_LIBC_PTHREAD_H