1sys_types.h(0P)            POSIX Programmer's Manual           sys_types.h(0P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       sys/types.h — data types
14

SYNOPSIS

16       #include <sys/types.h>
17

DESCRIPTION

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

APPLICATION USAGE

180       None.
181

RATIONALE

183       None.
184

FUTURE DIRECTIONS

186       None.
187

SEE ALSO

189       <time.h>
190
191       The System Interfaces volume of POSIX.1‐2008, confstr()
192
193       The Shell and Utilities volume of POSIX.1‐2008, getconf
194
196       Portions  of  this text are reprinted and reproduced in electronic form
197       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
198       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
199       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
200       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
201       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
202       event of any discrepancy between this version and the original IEEE and
203       The Open Group Standard, the original IEEE and The Open Group  Standard
204       is  the  referee document. The original Standard can be obtained online
205       at http://www.unix.org/online.html .
206
207       Any typographical or formatting errors that appear  in  this  page  are
208       most likely to have been introduced during the conversion of the source
209       files to man page format. To report such errors,  see  https://www.ker
210       nel.org/doc/man-pages/reporting_bugs.html .
211
212
213
214IEEE/The Open Group                  2013                      sys_types.h(0P)
Impressum