summaryrefslogtreecommitdiff
path: root/sysdeps/pthread/bits/pthreadtypes.h
blob: 2092f8f0770c370a0f054a78c267d4ef594cf3e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*
   Copyright (C) 2000-2018 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with the GNU C Library; see the file COPYING.LIB.  If
   not, see <http://www.gnu.org/licenses/>.  */

#if !defined _BITS_TYPES_H && !defined _PTHREAD_H
# error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead."
#endif

#ifndef _BITS_PTHREADTYPES_H
#define _BITS_PTHREADTYPES_H    1

#include <bits/thread-shared-types.h>

#include <features.h>

#include <bits/types.h>

__BEGIN_DECLS
#include <bits/pthread.h>
typedef __pthread_t pthread_t;

/* Possible values for the process shared attribute.  */
enum __pthread_process_shared
{
  __PTHREAD_PROCESS_PRIVATE = 0,
  __PTHREAD_PROCESS_SHARED
};

/* Possible values for the inheritsched attribute.  */
enum __pthread_inheritsched
{
  __PTHREAD_EXPLICIT_SCHED = 0,
  __PTHREAD_INHERIT_SCHED
};

/* Possible values for the `contentionscope' attribute.  */
enum __pthread_contentionscope
{
  __PTHREAD_SCOPE_SYSTEM = 0,
  __PTHREAD_SCOPE_PROCESS
};

/* Possible values for the `detachstate' attribute.  */
enum __pthread_detachstate
{
  __PTHREAD_CREATE_JOINABLE = 0,
  __PTHREAD_CREATE_DETACHED
};

#include <bits/types/struct___pthread_attr.h>
typedef struct __pthread_attr pthread_attr_t;

enum __pthread_mutex_protocol
{
  __PTHREAD_PRIO_NONE = 0,
  __PTHREAD_PRIO_INHERIT,
  __PTHREAD_PRIO_PROTECT
};

enum __pthread_mutex_type
{
  __PTHREAD_MUTEX_TIMED,
  __PTHREAD_MUTEX_ERRORCHECK,
  __PTHREAD_MUTEX_RECURSIVE
};

enum __pthread_mutex_robustness
{
  __PTHREAD_MUTEX_STALLED,
  __PTHREAD_MUTEX_ROBUST = 0x100
};

#include <bits/types/struct___pthread_mutexattr.h>
typedef struct __pthread_mutexattr pthread_mutexattr_t;

#include <bits/types/struct___pthread_mutex.h>
typedef struct __pthread_mutex pthread_mutex_t;

#include <bits/types/struct___pthread_condattr.h>
typedef struct __pthread_condattr pthread_condattr_t;

#include <bits/types/struct___pthread_cond.h>
typedef struct __pthread_cond pthread_cond_t;

#ifdef __USE_XOPEN2K
# include <bits/types/__pthread_spinlock_t.h>
typedef __pthread_spinlock_t pthread_spinlock_t;
#endif /* XPG6.  */

#if defined __USE_UNIX98 || defined __USE_XOPEN2K

# include <bits/types/struct___pthread_rwlockattr.h>
typedef struct __pthread_rwlockattr pthread_rwlockattr_t;

# include <bits/types/struct___pthread_rwlock.h>
typedef struct __pthread_rwlock pthread_rwlock_t;

#endif /* __USE_UNIX98 || __USE_XOPEN2K */

#ifdef __USE_XOPEN2K

# include <bits/types/struct___pthread_barrierattr.h>
typedef struct __pthread_barrierattr pthread_barrierattr_t;

# include <bits/types/struct___pthread_barrier.h>
typedef struct __pthread_barrier pthread_barrier_t;

#endif /* __USE_XOPEN2K */

#include <bits/types/__pthread_key.h>
typedef __pthread_key pthread_key_t;

#include <bits/types/struct___pthread_once.h>
typedef struct __pthread_once pthread_once_t;

__END_DECLS
#endif /* bits/pthreadtypes.h */