2020-09-17 10:42:59 +00:00
|
|
|
.\" Copyright (c) 2020 by Alejandro Colomar <colomar.6.4.3@gmail.com>
|
|
|
|
.\"
|
|
|
|
.\" %%%LICENSE_START(VERBATIM)
|
|
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
|
|
.\" preserved on all copies.
|
|
|
|
.\"
|
|
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
|
|
.\" permission notice identical to this one.
|
|
|
|
.\"
|
|
|
|
.\" Since the Linux kernel and libraries are constantly changing, this
|
|
|
|
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
|
|
.\" responsibility for errors or omissions, or for damages resulting from
|
|
|
|
.\" the use of the information contained herein. The author(s) may not
|
|
|
|
.\" have taken the same level of care in the production of this manual,
|
|
|
|
.\" which is licensed free of charge, as they might when working
|
|
|
|
.\" professionally.
|
|
|
|
.\"
|
|
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
|
|
|
.\" %%%LICENSE_END
|
|
|
|
.\"
|
|
|
|
.\"
|
|
|
|
.TH SYSTEM_DATA_TYPES 7 2020-09-13 "Linux" "Linux Programmer's Manual"
|
|
|
|
.SH NAME
|
|
|
|
system_data_types \- overview of system data types
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.\" Layout:
|
|
|
|
.\" A list of type names (the struct/union keyword will be omitted).
|
|
|
|
.\" Each entry will have the following parts:
|
|
|
|
.\" * Include
|
|
|
|
.\" The headers will be in the following order:
|
|
|
|
.\" 1) The main header that shall define the type
|
|
|
|
.\" according to the C Standard,
|
|
|
|
.\" and
|
|
|
|
.\" the main header that shall define the type
|
|
|
|
.\" according to POSIX,
|
|
|
|
.\" in alphabetical order.
|
|
|
|
.\" ;
|
|
|
|
.\" 2) All other headers that shall define the type
|
|
|
|
.\" as described in the previous header(s)
|
|
|
|
.\" according to the C Standard or POSIX,
|
|
|
|
.\" in alphabetical order.
|
|
|
|
.\" *) All headers that define the type
|
|
|
|
.\" *if* the type is not defined by C nor POSIX,
|
|
|
|
.\" in alphabetical order.
|
|
|
|
.\"
|
|
|
|
.\" * Definition (no "Definition" header)
|
|
|
|
.\" Only struct/union types will have definition;
|
|
|
|
.\" typedefs will remain opaque.
|
|
|
|
.\"
|
|
|
|
.\" * Description (no "Description" header)
|
|
|
|
.\" A few lines describing the type.
|
|
|
|
.\"
|
|
|
|
.\" * Conforming to
|
|
|
|
.\" Format: CXY and later; POSIX.1-XXXX and later.
|
|
|
|
.\" Forget about pre-C99 C standards (i.e., C89/C90)
|
|
|
|
.\"
|
|
|
|
.\" * Notes (optional)
|
|
|
|
.\"
|
|
|
|
.\" * See also
|
|
|
|
.TP
|
2020-09-18 12:04:40 +00:00
|
|
|
.I ptrdiff_t
|
|
|
|
.IP
|
|
|
|
Include:
|
2020-09-18 13:29:42 +00:00
|
|
|
.IR <stddef.h> .
|
2020-09-18 12:04:40 +00:00
|
|
|
.IP
|
|
|
|
Used for a count of elements, and array indices.
|
|
|
|
It is the result of subtracting two pointers.
|
|
|
|
According to the C language standard, it shall be a signed integer type
|
|
|
|
capable of storing values in the range
|
|
|
|
.BR "" [ PTRDIFF_MIN ,
|
|
|
|
.BR PTRDIFF_MAX ].
|
|
|
|
.IP
|
|
|
|
Conforming to: C99 and later; POSIX.1-2001 and later.
|
|
|
|
.IP
|
|
|
|
See also the
|
|
|
|
.I size_t
|
|
|
|
and
|
|
|
|
.I ssize_t
|
|
|
|
types in this page.
|
|
|
|
.TP
|
2020-09-18 13:29:43 +00:00
|
|
|
.I regmatch_t
|
|
|
|
.IP
|
|
|
|
Include:
|
|
|
|
.IR <regex.h> .
|
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
typedef struct {
|
|
|
|
regoff_t rm_so; /* Byte offset from start of string
|
|
|
|
* to start of substring */
|
|
|
|
regoff_t rm_eo; /* Byte offset from start of string of the
|
|
|
|
* first character after the end of substring */
|
|
|
|
} regmatch_t;
|
|
|
|
.EE
|
|
|
|
.IP
|
|
|
|
Conforming to: POSIX.1-2001 and later.
|
|
|
|
.IP
|
|
|
|
See also:
|
|
|
|
.BR regexec (3)
|
|
|
|
.TP
|
2020-09-18 12:45:53 +00:00
|
|
|
.I regoff_t
|
|
|
|
.IP
|
|
|
|
Include:
|
2020-09-18 13:29:42 +00:00
|
|
|
.IR <regex.h> .
|
2020-09-18 12:45:53 +00:00
|
|
|
.IP
|
|
|
|
According to POSIX, it shall be a signed integer type
|
|
|
|
capable of storing the largest value that can be stored in either a
|
|
|
|
.I ptrdiff_t
|
|
|
|
type or a
|
|
|
|
.I ssize_t
|
|
|
|
type.
|
|
|
|
.IP
|
|
|
|
Conforming to: POSIX.1-2001 and later.
|
|
|
|
.IP
|
|
|
|
Notes: Prior to POSIX.1-2008, the type was capable of storing
|
|
|
|
the largest value that can be stored in either an
|
|
|
|
.I off_t
|
|
|
|
type or a
|
|
|
|
.I ssize_t
|
|
|
|
type.
|
|
|
|
.IP
|
|
|
|
See also the
|
2020-09-18 13:29:43 +00:00
|
|
|
.I regmatch_t
|
|
|
|
structure and the
|
2020-09-18 12:45:53 +00:00
|
|
|
.I ptrdiff_t
|
|
|
|
and
|
|
|
|
.I ssize_t
|
|
|
|
types in this page.
|
|
|
|
.TP
|
2020-09-18 17:04:37 +00:00
|
|
|
.I sigevent
|
|
|
|
.IP
|
|
|
|
Include:
|
|
|
|
.IR <signal.h> ;
|
|
|
|
or
|
|
|
|
.I <aio.h>
|
|
|
|
or
|
|
|
|
.I <mqueue.h>
|
|
|
|
or
|
|
|
|
.IR <time.h> .
|
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
struct sigevent {
|
|
|
|
int sigev_notify; /* Notification type */
|
|
|
|
int sigev_signo; /* Signal number */
|
|
|
|
union sigval sigev_value; /* Signal value */
|
|
|
|
void (*sigev_notify_function)(union sigval);
|
|
|
|
/* Notification function */
|
|
|
|
pthread_attr_t *sigev_notify_attributes;
|
|
|
|
/* Notification attributes */
|
|
|
|
};
|
|
|
|
.EE
|
2020-09-18 21:08:28 +00:00
|
|
|
.IP
|
|
|
|
For further details about this type, see
|
|
|
|
.BR sigevent (7).
|
2020-09-18 17:04:37 +00:00
|
|
|
.IP
|
|
|
|
Conforming to: POSIX.1-2001 and later.
|
|
|
|
.IP
|
|
|
|
Notes:
|
|
|
|
.I <aio.h>
|
|
|
|
and
|
|
|
|
.I <time.h>
|
|
|
|
define
|
|
|
|
.I sigevent
|
|
|
|
since POSIX.1-2008.
|
|
|
|
.IP
|
|
|
|
See also:
|
|
|
|
.BR timer_create (2),
|
|
|
|
.BR getaddrinfo_a (3),
|
|
|
|
.BR lio_listio (3),
|
|
|
|
.BR mq_notify (3)
|
|
|
|
.\".IP
|
|
|
|
.\"See also the
|
|
|
|
.\".I aiocb FIXME
|
|
|
|
.\"structure in this page.
|
|
|
|
.TP
|
2020-09-17 10:42:59 +00:00
|
|
|
.I sigval
|
|
|
|
.IP
|
|
|
|
Include:
|
|
|
|
.IR <signal.h> .
|
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
union sigval {
|
|
|
|
int sigval_int; /* Integer value */
|
|
|
|
void *sigval_ptr; /* Pointer value */
|
|
|
|
};
|
|
|
|
.EE
|
|
|
|
.IP
|
|
|
|
Data passed with a signal.
|
|
|
|
.IP
|
|
|
|
Conforming to: POSIX.1-2001 and later.
|
|
|
|
.IP
|
|
|
|
See also:
|
|
|
|
.BR pthread_sigqueue (3),
|
|
|
|
.BR sigqueue (3),
|
|
|
|
.BR sigevent (7)
|
2020-09-18 17:04:37 +00:00
|
|
|
.IP
|
|
|
|
See also the
|
|
|
|
.I sigevent
|
|
|
|
structure
|
|
|
|
.\"and the
|
2020-09-18 12:45:55 +00:00
|
|
|
.\".I siginfo_t FIXME
|
2020-09-18 17:04:37 +00:00
|
|
|
.\"type
|
|
|
|
in this page.
|
2020-09-17 10:42:59 +00:00
|
|
|
.TP
|
2020-09-18 11:27:55 +00:00
|
|
|
.I size_t
|
|
|
|
.IP
|
|
|
|
Include:
|
|
|
|
.I <stddef.h>
|
|
|
|
or
|
|
|
|
.IR <sys/types.h> ;
|
|
|
|
or
|
|
|
|
.I <aio.h>
|
|
|
|
or
|
|
|
|
.I <glob.h>
|
|
|
|
or
|
|
|
|
.I <grp.h>
|
|
|
|
or
|
|
|
|
.I <iconv.h>
|
|
|
|
or
|
|
|
|
.I <monetary.h>
|
|
|
|
or
|
|
|
|
.I <mqueue.h>
|
|
|
|
or
|
|
|
|
.I <ndbm.h>
|
|
|
|
or
|
|
|
|
.I <pwd.h>
|
|
|
|
or
|
|
|
|
.I <regex.h>
|
|
|
|
or
|
|
|
|
.I <search.h>
|
|
|
|
or
|
|
|
|
.I <signal.h>
|
|
|
|
or
|
|
|
|
.I <stdio.h>
|
|
|
|
or
|
|
|
|
.I <stdlib.h>
|
|
|
|
or
|
|
|
|
.I <string.h>
|
|
|
|
or
|
|
|
|
.I <strings.h>
|
|
|
|
or
|
|
|
|
.I <sys/mman.h>
|
|
|
|
or
|
|
|
|
.I <sys/msg.h>
|
|
|
|
or
|
|
|
|
.I <sys/sem.h>
|
|
|
|
or
|
|
|
|
.I <sys/shm.h>
|
|
|
|
or
|
|
|
|
.I <sys/socket.h>
|
|
|
|
or
|
|
|
|
.I <sys/uio.h>
|
|
|
|
or
|
|
|
|
.I <time.h>
|
|
|
|
or
|
|
|
|
.I <unistd.h>
|
|
|
|
or
|
|
|
|
.I <wchar.h>
|
|
|
|
or
|
|
|
|
.IR <wordexp.h> .
|
|
|
|
.IP
|
|
|
|
Used for a count of bytes. It is the result of the
|
|
|
|
.I sizeof
|
|
|
|
operator.
|
|
|
|
According to the C language standard,
|
|
|
|
it shall be an unsigned integer type
|
|
|
|
capable of storing values in the range [0,
|
|
|
|
.BR SIZE_MAX ].
|
|
|
|
.IP
|
|
|
|
Conforming to: C99 and later; POSIX.1-2001 and later.
|
|
|
|
.IP
|
|
|
|
Notes:
|
|
|
|
.IR <aio.h> ,
|
|
|
|
.IR <glob.h> ,
|
|
|
|
.IR <grp.h> ,
|
|
|
|
.IR <iconv.h> ,
|
|
|
|
.IR <mqueue.h> ,
|
|
|
|
.IR <pwd.h> ,
|
2020-09-18 17:04:35 +00:00
|
|
|
.I <signal.h>
|
2020-09-18 11:27:55 +00:00
|
|
|
and
|
2020-09-18 17:04:35 +00:00
|
|
|
.I <sys/socket.h>
|
2020-09-18 11:27:55 +00:00
|
|
|
define
|
|
|
|
.I size_t
|
|
|
|
since POSIX.1-2008.
|
|
|
|
.IP
|
|
|
|
See also:
|
2020-09-18 20:08:02 +00:00
|
|
|
.BR read (2),
|
|
|
|
.BR write (2),
|
|
|
|
.BR memcmp (3),
|
2020-09-18 11:27:55 +00:00
|
|
|
.BR fread (3),
|
|
|
|
.BR fwrite (3),
|
|
|
|
.BR memcmp (3),
|
|
|
|
.BR memcpy (3),
|
|
|
|
.BR memset (3),
|
|
|
|
.BR offsetof (3)
|
|
|
|
.IP
|
|
|
|
See also the
|
|
|
|
.I ptrdiff_t
|
2020-09-18 12:04:39 +00:00
|
|
|
and
|
|
|
|
.I ssize_t
|
2020-09-18 11:27:55 +00:00
|
|
|
types in this page.
|
|
|
|
.TP
|
2020-09-17 10:42:59 +00:00
|
|
|
.I ssize_t
|
|
|
|
.IP
|
|
|
|
Include:
|
|
|
|
.IR <sys/types.h> ;
|
|
|
|
or
|
|
|
|
.I <aio.h>
|
|
|
|
or
|
|
|
|
.I <monetary.h>
|
|
|
|
or
|
|
|
|
.I <mqueue.h>
|
|
|
|
or
|
|
|
|
.I <stdio.h>
|
|
|
|
or
|
|
|
|
.I <sys/msg.h>
|
|
|
|
or
|
|
|
|
.I <sys/socket.h>
|
|
|
|
or
|
|
|
|
.I <sys/uio.h>
|
|
|
|
or
|
|
|
|
.IR <unistd.h> .
|
|
|
|
.IP
|
|
|
|
Used for a count of bytes or an error indication.
|
|
|
|
According to POSIX, it shall be a signed integer type
|
|
|
|
capable of storing values at least in the range [-1,
|
|
|
|
.BR SSIZE_MAX ].
|
|
|
|
.IP
|
|
|
|
Conforming to: POSIX.1-2001 and later.
|
|
|
|
.IP
|
|
|
|
See also:
|
|
|
|
.BR read (2),
|
|
|
|
.BR readlink (2),
|
|
|
|
.BR readv (2),
|
|
|
|
.BR recv (2),
|
|
|
|
.BR send (2),
|
|
|
|
.BR write (2)
|
2020-09-18 11:27:55 +00:00
|
|
|
.IP
|
|
|
|
See also the
|
2020-09-18 12:04:40 +00:00
|
|
|
.I ptrdiff_t
|
|
|
|
and
|
2020-09-18 11:27:55 +00:00
|
|
|
.I size_t
|
2020-09-18 12:04:40 +00:00
|
|
|
types in this page.
|
2020-09-17 10:42:59 +00:00
|
|
|
.TP
|
|
|
|
.I suseconds_t
|
|
|
|
.IP
|
|
|
|
Include:
|
|
|
|
.IR <sys/types.h> ;
|
|
|
|
or
|
|
|
|
.I <sys/select.h>
|
|
|
|
or
|
|
|
|
.IR <sys/time.h> .
|
|
|
|
.IP
|
|
|
|
Used for time in microseconds.
|
|
|
|
According to POSIX, it shall be a signed integer type
|
|
|
|
capable of storing values at least in the range [-1, 1000000].
|
|
|
|
.IP
|
|
|
|
Conforming to: POSIX.1-2001 and later.
|
|
|
|
.IP
|
|
|
|
See also the
|
|
|
|
.I timeval
|
|
|
|
structure in this page.
|
|
|
|
.TP
|
|
|
|
.I time_t
|
|
|
|
.IP
|
|
|
|
Include:
|
|
|
|
.I <sys/types.h>
|
|
|
|
or
|
|
|
|
.IR <time.h> ;
|
|
|
|
or
|
|
|
|
.I <sched.h>
|
|
|
|
or
|
|
|
|
.I <sys/msg.h>
|
|
|
|
or
|
|
|
|
.I <sys/select.h>
|
|
|
|
or
|
|
|
|
.I <sys/sem.h>
|
|
|
|
or
|
|
|
|
.I <sys/shm.h>
|
|
|
|
or
|
|
|
|
.I <sys/stat.h>
|
|
|
|
or
|
|
|
|
.I <sys/time.h>
|
|
|
|
or
|
|
|
|
.IR <utime.h> .
|
|
|
|
.IP
|
|
|
|
Used for time in seconds.
|
|
|
|
According to POSIX, it shall be an integer type.
|
|
|
|
.IP
|
|
|
|
Conforming to: C99 and later; POSIX.1-2001 and later.
|
|
|
|
.IP
|
|
|
|
Notes:
|
|
|
|
.I <sched.h>
|
|
|
|
defines
|
|
|
|
.I time_t
|
|
|
|
since POSIX.1-2008.
|
|
|
|
.IP
|
|
|
|
See also:
|
|
|
|
.BR stime (2),
|
|
|
|
.BR time (2),
|
|
|
|
.BR ctime (3),
|
|
|
|
.BR difftime (3)
|
|
|
|
.TP
|
|
|
|
.I timer_t
|
|
|
|
.IP
|
|
|
|
Include:
|
|
|
|
.IR <sys/types.h> ;
|
|
|
|
or
|
|
|
|
.IR <time.h> .
|
|
|
|
.IP
|
|
|
|
Used for timer ID returned by
|
|
|
|
.BR timer_create (2).
|
|
|
|
According to POSIX,
|
|
|
|
there are no defined comparison or assignment operators for this type.
|
|
|
|
.IP
|
|
|
|
Conforming to: POSIX.1-2001 and later.
|
|
|
|
.IP
|
|
|
|
See also:
|
|
|
|
.BR timer_create (2),
|
|
|
|
.BR timer_delete (2),
|
|
|
|
.BR timer_getoverrun (2),
|
|
|
|
.BR timer_settime (2)
|
|
|
|
.TP
|
|
|
|
.I timespec
|
|
|
|
.IP
|
|
|
|
Include:
|
|
|
|
.IR <time.h> ;
|
|
|
|
or
|
|
|
|
.I <aio.h>
|
|
|
|
or
|
|
|
|
.I <mqueue.h>
|
|
|
|
or
|
|
|
|
.I <sched.h>
|
|
|
|
or
|
|
|
|
.I <signal.h>
|
|
|
|
or
|
|
|
|
.I <sys/select.h>
|
|
|
|
or
|
|
|
|
.IR <sys/stat.h> .
|
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
struct timespec {
|
|
|
|
time_t tv_sec; /* Seconds */
|
|
|
|
long tv_nsec; /* Nanoseconds */
|
|
|
|
};
|
|
|
|
.EE
|
|
|
|
.IP
|
|
|
|
Describes times in seconds and nanoseconds.
|
|
|
|
.IP
|
|
|
|
Conforming to: C11 and later; POSIX.1-2001 and later.
|
|
|
|
.IP
|
|
|
|
See also:
|
|
|
|
.BR clock_gettime (2),
|
|
|
|
.BR clock_nanosleep (2),
|
|
|
|
.BR nanosleep (2),
|
|
|
|
.BR timerfd_gettime (2),
|
|
|
|
.BR timer_gettime (2)
|
|
|
|
.TP
|
|
|
|
.I timeval
|
|
|
|
.IP
|
|
|
|
Include:
|
|
|
|
.IR <sys/time.h> ;
|
|
|
|
or
|
|
|
|
.I <sys/resource.h>
|
|
|
|
or
|
|
|
|
.I <sys/select.h>
|
|
|
|
or
|
|
|
|
.IR <utmpx.h> .
|
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
struct timeval {
|
|
|
|
time_t tv_sec; /* Seconds */
|
|
|
|
suseconds_t tv_usec; /* Microseconds */
|
|
|
|
};
|
|
|
|
.EE
|
|
|
|
.IP
|
|
|
|
Describes times in seconds and microseconds.
|
|
|
|
.IP
|
|
|
|
Conforming to: POSIX.1-2001 and later.
|
|
|
|
.IP
|
|
|
|
See also:
|
|
|
|
.BR gettimeofday (2),
|
|
|
|
.BR select (2),
|
|
|
|
.BR utimes (2),
|
|
|
|
.BR adjtime (3),
|
|
|
|
.BR futimes (3),
|
|
|
|
.BR timeradd (3)
|
|
|
|
.SH NOTES
|
|
|
|
The structures described in this manual page shall contain,
|
|
|
|
at least, the members shown in their definition, in no particular order.
|
2020-09-17 20:29:29 +00:00
|
|
|
.SH SEE ALSO
|
|
|
|
.BR feature_test_macros (7),
|
|
|
|
.BR standards (7)
|