Warning: This file is not a C or C++ file. It does not have highlighting.
1 | /* Declaration of common pthread types for all architectures. Hurd version. |
---|---|
2 | Copyright (C) 2000-2022 Free Software Foundation, Inc. |
3 | This file is part of the GNU C Library. |
4 | |
5 | The GNU C Library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either |
8 | version 2.1 of the License, or (at your option) any later version. |
9 | |
10 | The GNU C Library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. |
14 | |
15 | You should have received a copy of the GNU Lesser General Public |
16 | License along with the GNU C Library; if not, see |
17 | <https://www.gnu.org/licenses/>. */ |
18 | |
19 | #if !defined _BITS_TYPES_H && !defined _PTHREAD_H |
20 | # error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead." |
21 | #endif |
22 | |
23 | #ifndef _BITS_PTHREADTYPES_H |
24 | #define _BITS_PTHREADTYPES_H 1 |
25 | |
26 | #include <bits/thread-shared-types.h> |
27 | |
28 | #include <features.h> |
29 | |
30 | #include <bits/types.h> |
31 | |
32 | __BEGIN_DECLS |
33 | #include <bits/pthread.h> |
34 | typedef __pthread_t pthread_t; |
35 | |
36 | /* Possible values for the process shared attribute. */ |
37 | enum __pthread_process_shared |
38 | { |
39 | __PTHREAD_PROCESS_PRIVATE = 0, |
40 | __PTHREAD_PROCESS_SHARED |
41 | }; |
42 | |
43 | /* Possible values for the inheritsched attribute. */ |
44 | enum __pthread_inheritsched |
45 | { |
46 | __PTHREAD_EXPLICIT_SCHED = 0, |
47 | __PTHREAD_INHERIT_SCHED |
48 | }; |
49 | |
50 | /* Possible values for the `contentionscope' attribute. */ |
51 | enum __pthread_contentionscope |
52 | { |
53 | __PTHREAD_SCOPE_SYSTEM = 0, |
54 | __PTHREAD_SCOPE_PROCESS |
55 | }; |
56 | |
57 | /* Possible values for the `detachstate' attribute. */ |
58 | enum __pthread_detachstate |
59 | { |
60 | __PTHREAD_CREATE_JOINABLE = 0, |
61 | __PTHREAD_CREATE_DETACHED |
62 | }; |
63 | |
64 | #include <bits/types/struct___pthread_attr.h> |
65 | typedef struct __pthread_attr pthread_attr_t; |
66 | |
67 | enum __pthread_mutex_protocol |
68 | { |
69 | __PTHREAD_PRIO_NONE = 0, |
70 | __PTHREAD_PRIO_INHERIT, |
71 | __PTHREAD_PRIO_PROTECT |
72 | }; |
73 | |
74 | enum __pthread_mutex_type |
75 | { |
76 | __PTHREAD_MUTEX_TIMED, |
77 | __PTHREAD_MUTEX_ERRORCHECK, |
78 | __PTHREAD_MUTEX_RECURSIVE |
79 | }; |
80 | |
81 | enum __pthread_mutex_robustness |
82 | { |
83 | __PTHREAD_MUTEX_STALLED, |
84 | __PTHREAD_MUTEX_ROBUST = 0x100 |
85 | }; |
86 | |
87 | #include <bits/types/struct___pthread_mutexattr.h> |
88 | typedef struct __pthread_mutexattr pthread_mutexattr_t; |
89 | |
90 | #include <bits/types/struct___pthread_mutex.h> |
91 | typedef struct __pthread_mutex pthread_mutex_t; |
92 | |
93 | #include <bits/types/struct___pthread_condattr.h> |
94 | typedef struct __pthread_condattr pthread_condattr_t; |
95 | |
96 | #include <bits/types/struct___pthread_cond.h> |
97 | typedef struct __pthread_cond pthread_cond_t; |
98 | |
99 | #ifdef __USE_XOPEN2K |
100 | # include <bits/types/__pthread_spinlock_t.h> |
101 | typedef __pthread_spinlock_t pthread_spinlock_t; |
102 | #endif /* XPG6. */ |
103 | |
104 | #if defined __USE_UNIX98 || defined __USE_XOPEN2K |
105 | |
106 | # include <bits/types/struct___pthread_rwlockattr.h> |
107 | typedef struct __pthread_rwlockattr pthread_rwlockattr_t; |
108 | |
109 | # include <bits/types/struct___pthread_rwlock.h> |
110 | typedef struct __pthread_rwlock pthread_rwlock_t; |
111 | |
112 | #endif /* __USE_UNIX98 || __USE_XOPEN2K */ |
113 | |
114 | #ifdef __USE_XOPEN2K |
115 | |
116 | # include <bits/types/struct___pthread_barrierattr.h> |
117 | typedef struct __pthread_barrierattr pthread_barrierattr_t; |
118 | |
119 | # include <bits/types/struct___pthread_barrier.h> |
120 | typedef struct __pthread_barrier pthread_barrier_t; |
121 | |
122 | #endif /* __USE_XOPEN2K */ |
123 | |
124 | #include <bits/types/__pthread_key.h> |
125 | typedef __pthread_key pthread_key_t; |
126 | |
127 | #include <bits/types/struct___pthread_once.h> |
128 | typedef struct __pthread_once pthread_once_t; |
129 | |
130 | __END_DECLS |
131 | #endif /* bits/pthreadtypes.h */ |
132 |
Warning: This file is not a C or C++ file. It does not have highlighting.