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 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291
|
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
.TH "<sys/types.h>" P 2003 POSIX
.\" <sys/types.h>
.SH NAME
sys/types.h \- data types
.SH SYNOPSIS
.LP
\fB#include <sys/types.h>\fP
.SH DESCRIPTION
.LP
The \fI<sys/types.h>\fP header shall include definitions for at least
the following types:
.TP 7
\fBblkcnt_t\fP
Used for file block counts.
.TP 7
\fBblksize_t\fP
Used for block sizes.
.TP 7
\fBclock_t\fP
Used for system times in clock ticks or CLOCKS_PER_SEC; see \fI<time.h>\fP
\&.
.TP 7
\fBclockid_t\fP
Used for clock ID type in the clock and timer functions.
.TP 7
\fBdev_t\fP
Used for device IDs.
.TP 7
\fBfsblkcnt_t\fP
Used for file system block counts.
.TP 7
\fBfsfilcnt_t\fP
Used for file system file counts.
.TP 7
\fBgid_t\fP
Used for group IDs.
.TP 7
\fBid_t\fP
Used as a general identifier; can be used to contain at least a \fBpid_t\fP,
\fBuid_t\fP, or \fBgid_t\fP.
.TP 7
\fBino_t\fP
Used for file serial numbers.
.TP 7
\fBkey_t\fP
Used for XSI interprocess communication.
.TP 7
\fBmode_t\fP
Used for some file attributes.
.TP 7
\fBnlink_t\fP
Used for link counts.
.TP 7
\fBoff_t\fP
Used for file sizes.
.TP 7
\fBpid_t\fP
Used for process IDs and process group IDs.
.TP 7
\fBpthread_attr_t\fP
Used to identify a thread attribute object.
.TP 7
\fBpthread_barrier_t\fP
Used to identify a barrier.
.TP 7
\fBpthread_barrierattr_t\fP
Used to define a barrier attributes object.
.TP 7
\fBpthread_cond_t\fP
Used for condition variables.
.TP 7
\fBpthread_condattr_t\fP
Used to identify a condition attribute object.
.TP 7
\fBpthread_key_t\fP
Used for thread-specific data keys.
.TP 7
\fBpthread_mutex_t\fP
Used for mutexes.
.TP 7
\fBpthread_mutexattr_t\fP
Used to identify a mutex attribute object.
.TP 7
\fBpthread_once_t\fP
Used for dynamic package initialization.
.TP 7
\fBpthread_rwlock_t\fP
Used for read-write locks.
.TP 7
\fBpthread_rwlockattr_t\fP
Used for read-write lock attributes.
.TP 7
\fBpthread_spinlock_t\fP
Used to identify a spin lock.
.TP 7
\fBpthread_t\fP
Used to identify a thread.
.TP 7
\fBsize_t\fP
Used for sizes of objects.
.TP 7
\fBssize_t\fP
Used for a count of bytes or an error indication.
.TP 7
\fBsuseconds_t\fP
Used for time in microseconds.
.TP 7
\fBtime_t\fP
Used for time in seconds.
.TP 7
\fBtimer_t\fP
Used for timer ID returned by \fItimer_create\fP().
.TP 7
\fBtrace_attr_t\fP
Used to identify a trace stream attributes object.
.TP 7
\fBtrace_event_id_t\fP
Used to identify a trace event type.
.TP 7
\fBtrace_event_set_t\fP
Used to identify a trace event type set.
.TP 7
\fBtrace_id_t\fP
Used to identify a trace stream.
.TP 7
\fBuid_t\fP
Used for user IDs.
.TP 7
\fBuseconds_t\fP
Used for time in microseconds.
.sp
.LP
All of the types shall be defined as arithmetic types of an appropriate
length, with the following exceptions:
.LP
.sp
.sp
\fBkey_t\fP
.br
.sp
.sp
\fBpthread_attr_t\fP
.br
.sp
.sp
\fBpthread_barrier_t\fP
.br
\fBpthread_barrierattr_t\fP
.br
.sp
.sp
\fBpthread_cond_t\fP
.br
\fBpthread_condattr_t\fP
.br
\fBpthread_key_t\fP
.br
\fBpthread_mutex_t\fP
.br
\fBpthread_mutexattr_t\fP
.br
\fBpthread_once_t\fP
.br
\fBpthread_rwlock_t\fP
.br
\fBpthread_rwlockattr_t\fP
.br
.sp
.sp
\fBpthread_spinlock_t\fP
.br
.sp
.sp
\fBtrace_attr_t\fP
.br
\fBtrace_event_id_t\fP
.br
.sp
.sp
\fBtrace_event_set_t\fP
.br
.sp
.sp
\fBtrace_id_t\fP
.br
.sp
.LP
Additionally:
.IP " *" 3
\fBmode_t\fP shall be an integer type.
.LP
.IP " *" 3
\fBnlink_t\fP, \fBuid_t\fP, \fBgid_t\fP, and \fBid_t\fP shall be integer
types.
.LP
.IP " *" 3
\fBblkcnt_t\fP and \fBoff_t\fP shall be signed integer types.
.LP
.IP " *" 3
\fBfsblkcnt_t\fP, \fBfsfilcnt_t\fP, \ and
\fBino_t\fP shall be defined as unsigned integer types.
.LP
.IP " *" 3
\fBsize_t\fP shall be an unsigned integer type.
.LP
.IP " *" 3
\fBblksize_t\fP, \fBpid_t\fP, and \fBssize_t\fP shall be signed integer
types.
.LP
.IP " *" 3
\fBtime_t\fP and \fBclock_t\fP shall be integer or real-floating types.
.LP
.LP
The type \fBssize_t\fP shall be capable of storing values at least
in the range [-1,\ {SSIZE_MAX}]. \ The type
\fBuseconds_t\fP shall be an unsigned integer type capable of storing
values at least in the range [0,\ 1000000]. The type
\fBsuseconds_t\fP shall be a signed integer type capable of storing
values at least in the range [-1,\ 1000000].
.LP
The implementation shall support one or more programming environments
in which the widths of \fBblksize_t\fP, \fBpid_t\fP,
\fBsize_t\fP, \fBssize_t\fP, \fBsuseconds_t\fP, and \fBuseconds_t\fP
are no greater than the width of type \fBlong\fP. The
names of these programming environments can be obtained using the
\fIconfstr\fP()
function or the \fIgetconf\fP utility.
.LP
There are no defined comparison or assignment operators for the following
types:
.LP
.sp
.sp
\fBpthread_attr_t\fP
.br
.sp
.sp
\fBpthread_barrier_t\fP
.br
\fBpthread_barrierattr_t\fP
.br
.sp
.sp
\fBpthread_cond_t\fP
.br
\fBpthread_condattr_t\fP
.br
\fBpthread_mutex_t\fP
.br
\fBpthread_mutexattr_t\fP
.br
\fBpthread_rwlock_t\fP
.br
\fBpthread_rwlockattr_t\fP
.br
.sp
.sp
\fBpthread_spinlock_t\fP
.br
.sp
.sp
\fBtrace_attr_t\fP
.br
.sp
.LP
\fIThe following sections are informative.\fP
.SH APPLICATION USAGE
.LP
None.
.SH RATIONALE
.LP
None.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fI<time.h>\fP , the System Interfaces volume of IEEE\ Std\ 1003.1-2001,
\fIconfstr\fP(), the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
\fIgetconf\fP
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html .
|