1<sys/types.h>(0P)          POSIX Programmer's Manual         <sys/types.h>(0P)
2
3
4

NAME

6       sys/types.h - data types
7

SYNOPSIS

9       #include <sys/types.h>
10

DESCRIPTION

12       The  <sys/types.h>  header  shall  include definitions for at least the
13       following types:
14
15       blkcnt_t
16              Used for file block counts.
17
18       blksize_t
19              Used for block sizes.
20
21       clock_t
22              Used for system times in  clock  ticks  or  CLOCKS_PER_SEC;  see
23              <time.h> .
24
25       clockid_t
26              Used for clock ID type in the clock and timer functions.
27
28       dev_t  Used for device IDs.
29
30       fsblkcnt_t
31              Used for file system block counts.
32
33       fsfilcnt_t
34              Used for file system file counts.
35
36       gid_t  Used for group IDs.
37
38       id_t   Used  as a general identifier; can be used to contain at least a
39              pid_t, uid_t, or gid_t.
40
41       ino_t  Used for file serial numbers.
42
43       key_t  Used for XSI interprocess communication.
44
45       mode_t Used for some file attributes.
46
47       nlink_t
48              Used for link counts.
49
50       off_t  Used for file sizes.
51
52       pid_t  Used for process IDs and process group IDs.
53
54       pthread_attr_t
55              Used to identify a thread attribute object.
56
57       pthread_barrier_t
58              Used to identify a barrier.
59
60       pthread_barrierattr_t
61              Used to define a barrier attributes object.
62
63       pthread_cond_t
64              Used for condition variables.
65
66       pthread_condattr_t
67              Used to identify a condition attribute object.
68
69       pthread_key_t
70              Used for thread-specific data keys.
71
72       pthread_mutex_t
73              Used for mutexes.
74
75       pthread_mutexattr_t
76              Used to identify a mutex attribute object.
77
78       pthread_once_t
79              Used for dynamic package initialization.
80
81       pthread_rwlock_t
82              Used for read-write locks.
83
84       pthread_rwlockattr_t
85              Used for read-write lock attributes.
86
87       pthread_spinlock_t
88              Used to identify a spin lock.
89
90       pthread_t
91              Used to identify a thread.
92
93       size_t Used for sizes of objects.
94
95       ssize_t
96              Used for a count of bytes or an error indication.
97
98       suseconds_t
99              Used for time in microseconds.
100
101       time_t Used for time in seconds.
102
103       timer_t
104              Used for timer ID returned by timer_create().
105
106       trace_attr_t
107              Used to identify a trace stream attributes object.
108
109       trace_event_id_t
110              Used to identify a trace event type.
111
112       trace_event_set_t
113              Used to identify a trace event type set.
114
115       trace_id_t
116              Used to identify a trace stream.
117
118       uid_t  Used for user IDs.
119
120       useconds_t
121              Used for time in microseconds.
122
123
124       All of the types shall be defined as arithmetic types of an appropriate
125       length, with the following exceptions:
126
127       key_t
128
129
130       pthread_attr_t
131
132
133       pthread_barrier_t
134       pthread_barrierattr_t
135
136
137       pthread_cond_t
138       pthread_condattr_t
139       pthread_key_t
140       pthread_mutex_t
141       pthread_mutexattr_t
142       pthread_once_t
143       pthread_rwlock_t
144       pthread_rwlockattr_t
145
146
147       pthread_spinlock_t
148
149
150       trace_attr_t
151       trace_event_id_t
152
153
154       trace_event_set_t
155
156
157       trace_id_t
158
159
160       Additionally:
161
162        * mode_t shall be an integer type.
163
164        * nlink_t, uid_t, gid_t, and id_t shall be integer types.
165
166        * blkcnt_t and off_t shall be signed integer types.
167
168        * fsblkcnt_t, fsfilcnt_t, and ino_t shall be defined as unsigned inte‐
169          ger types.
170
171        * size_t shall be an unsigned integer type.
172
173        * blksize_t, pid_t, and ssize_t shall be signed integer types.
174
175        * time_t and clock_t shall be integer or real-floating types.
176
177       The type ssize_t shall be capable of storing values  at  least  in  the
178       range  [-1, {SSIZE_MAX}].   The  type  useconds_t  shall be an unsigned
179       integer  type  capable  of  storing  values  at  least  in  the   range
180       [0, 1000000]. The type suseconds_t shall be a signed integer type capa‐
181       ble of storing values at least in the range [-1, 1000000].
182
183       The implementation shall support one or more  programming  environments
184       in  which the widths of blksize_t, pid_t, size_t, ssize_t, suseconds_t,
185       and useconds_t are no greater than the width of type long. The names of
186       these  programming  environments  can  be  obtained using the confstr()
187       function or the getconf utility.
188
189       There are no defined comparison or assignment operators for the follow‐
190       ing types:
191
192       pthread_attr_t
193
194
195       pthread_barrier_t
196       pthread_barrierattr_t
197
198
199       pthread_cond_t
200       pthread_condattr_t
201       pthread_mutex_t
202       pthread_mutexattr_t
203       pthread_rwlock_t
204       pthread_rwlockattr_t
205
206
207       pthread_spinlock_t
208
209
210       trace_attr_t
211
212
213       The following sections are informative.
214

APPLICATION USAGE

216       None.
217

RATIONALE

219       None.
220

FUTURE DIRECTIONS

222       None.
223

SEE ALSO

225       <time.h>,  the  System Interfaces volume of IEEE Std 1003.1-2001, conf‐
226       str(), the Shell and Utilities volume of IEEE Std 1003.1-2001, getconf
227
229       Portions of this text are reprinted and reproduced in  electronic  form
230       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
231       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
232       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
233       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
234       event of any discrepancy between this version and the original IEEE and
235       The Open Group Standard, the original IEEE and The Open Group  Standard
236       is  the  referee document. The original Standard can be obtained online
237       at http://www.opengroup.org/unix/online.html .
238
239
240
241IEEE/The Open Group                  2003                    <sys/types.h>(0P)
Impressum