Update copyright dates with scripts/update-copyrights
[glibc.git] / sysdeps / htl / bits / pthreadtypes.h
blob140b3469b8b36fcc12023404dea1c9182f72e01d
1 /* Declaration of common pthread types for all architectures. Hurd version.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
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.
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.
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/>. */
19 #if !defined _BITS_TYPES_H && !defined _PTHREAD_H
20 # error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead."
21 #endif
23 #ifndef _BITS_PTHREADTYPES_H
24 #define _BITS_PTHREADTYPES_H 1
26 #include <bits/thread-shared-types.h>
28 #include <features.h>
30 #include <bits/types.h>
32 __BEGIN_DECLS
33 #include <bits/pthread.h>
34 typedef __pthread_t pthread_t;
36 /* Possible values for the process shared attribute. */
37 enum __pthread_process_shared
39 __PTHREAD_PROCESS_PRIVATE = 0,
40 __PTHREAD_PROCESS_SHARED
43 /* Possible values for the inheritsched attribute. */
44 enum __pthread_inheritsched
46 __PTHREAD_EXPLICIT_SCHED = 0,
47 __PTHREAD_INHERIT_SCHED
50 /* Possible values for the `contentionscope' attribute. */
51 enum __pthread_contentionscope
53 __PTHREAD_SCOPE_SYSTEM = 0,
54 __PTHREAD_SCOPE_PROCESS
57 /* Possible values for the `detachstate' attribute. */
58 enum __pthread_detachstate
60 __PTHREAD_CREATE_JOINABLE = 0,
61 __PTHREAD_CREATE_DETACHED
64 #include <bits/types/struct___pthread_attr.h>
65 typedef struct __pthread_attr pthread_attr_t;
67 enum __pthread_mutex_protocol
69 __PTHREAD_PRIO_NONE = 0,
70 __PTHREAD_PRIO_INHERIT,
71 __PTHREAD_PRIO_PROTECT
74 enum __pthread_mutex_type
76 __PTHREAD_MUTEX_TIMED,
77 __PTHREAD_MUTEX_ERRORCHECK,
78 __PTHREAD_MUTEX_RECURSIVE
81 enum __pthread_mutex_robustness
83 __PTHREAD_MUTEX_STALLED,
84 __PTHREAD_MUTEX_ROBUST = 0x100
87 #include <bits/types/struct___pthread_mutexattr.h>
88 typedef struct __pthread_mutexattr pthread_mutexattr_t;
90 #include <bits/types/struct___pthread_mutex.h>
91 typedef struct __pthread_mutex pthread_mutex_t;
93 #include <bits/types/struct___pthread_condattr.h>
94 typedef struct __pthread_condattr pthread_condattr_t;
96 #include <bits/types/struct___pthread_cond.h>
97 typedef struct __pthread_cond pthread_cond_t;
99 #ifdef __USE_XOPEN2K
100 # include <bits/types/__pthread_spinlock_t.h>
101 typedef __pthread_spinlock_t pthread_spinlock_t;
102 #endif /* XPG6. */
104 #if defined __USE_UNIX98 || defined __USE_XOPEN2K
106 # include <bits/types/struct___pthread_rwlockattr.h>
107 typedef struct __pthread_rwlockattr pthread_rwlockattr_t;
109 # include <bits/types/struct___pthread_rwlock.h>
110 typedef struct __pthread_rwlock pthread_rwlock_t;
112 #endif /* __USE_UNIX98 || __USE_XOPEN2K */
114 #ifdef __USE_XOPEN2K
116 # include <bits/types/struct___pthread_barrierattr.h>
117 typedef struct __pthread_barrierattr pthread_barrierattr_t;
119 # include <bits/types/struct___pthread_barrier.h>
120 typedef struct __pthread_barrier pthread_barrier_t;
122 #endif /* __USE_XOPEN2K */
124 #include <bits/types/__pthread_key.h>
125 typedef __pthread_key pthread_key_t;
127 #include <bits/types/struct___pthread_once.h>
128 typedef struct __pthread_once pthread_once_t;
130 __END_DECLS
131 #endif /* bits/pthreadtypes.h */