sys_types.h(0P)
๐ธ sys_types.h(0P) โ the POSIX Programmer's Manual one ๐ธ
okay bestie, so this is sys_types.h(0P) from the POSIX Programmer's Manual ๐ buckle up, we're talking about types and honestly? it's giving foundational.
โ ๏ธ PROLOG โ ๏ธ
so like. this manual page is part of the POSIX Programmer's Manual. but here's the tea: the Linux implementation of this interface may differ (so pls go consult the corresponding Linux manual page for the deets on Linux behavior), or โ and this is the part that hurts ๐ญ โ the interface might not even be implemented on Linux at all. vibe check accordingly.
โจ NAME โจ
sys/types.h โ data types. that's it. that's the whole name. iconic minimalism.
๐ SYNOPSIS ๐
#include <sys/types.h>
literally just include it and you're in. no cap. ๐ซถ
๐ DESCRIPTION ๐
the <sys/types.h> header shall define at least the following types, and bestie, there's a LOT of them:
blkcnt_tโ for file block counts ๐ฆblksize_tโ for block sizes ๐clock_tโ for system times, measured in clock ticks orCLOCKS_PER_SEC; go peek at<time.h>for the lore โฐclockid_tโ the clock ID type used in the clock and timer functions ๐ฐ๏ธdev_tโ for device IDs ๐fsblkcnt_tโ for file system block counts ๐๏ธfsfilcnt_tโ for file system file counts ๐gid_tโ for group IDs ๐ฅid_tโ a general identifier type; it can hold at least apid_t, auid_t, or agid_t. she's versatile ๐โโ๏ธino_tโ for file serial numbers ๐ขkey_tโ for XSI interprocess communication ๐mode_tโ for some file attributes ๐ ๏ธnlink_tโ for link counts ๐off_tโ for file sizes ๐pid_tโ for process IDs and process group IDs ๐pthread_attr_tโ identifies a thread attribute object ๐งตpthread_barrier_tโ identifies a barrier ๐งpthread_barrierattr_tโ defines a barrier attributes object ๐งโจpthread_cond_tโ for condition variables ๐ดpthread_condattr_tโ identifies a condition attribute object ๐ดโจpthread_key_tโ for thread-specific data keys ๐๏ธpthread_mutex_tโ for mutexes ๐pthread_mutexattr_tโ identifies a mutex attribute object ๐โจpthread_once_tโ for dynamic package initialization 1๏ธโฃpthread_rwlock_tโ for read-write locks ๐โ๏ธpthread_rwlockattr_tโ for read-write lock attributes ๐โ๏ธโจpthread_spinlock_tโ identifies a spin lock ๐pthread_tโ identifies a thread ๐งต๐size_tโ for sizes of objects ๐ฆ๐ฆssize_tโ for a count of bytes, or an error indication ๐จsuseconds_tโ for time in microseconds โกtime_tโ for time in seconds โณtimer_tโ the timer ID returned bytimer_create()โฒ๏ธtrace_attr_tโ identifies a trace stream attributes object ๐trace_event_id_tโ identifies a trace event type ๐โจtrace_event_set_tโ identifies a trace event type set ๐โจโจtrace_id_tโ identifies a trace stream ๐๐uid_tโ for user IDs ๐ซต
fr fr, all of these types shall be defined as arithmetic types of an appropriate length, with these exceptions (the girlies that are not arithmetic types):
pthread_attr_t
pthread_barrier_t
pthread_barrierattr_t
pthread_cond_t
pthread_condattr_t
pthread_key_t
pthread_mutex_t
pthread_mutexattr_t
pthread_once_t
pthread_rwlock_t
pthread_rwlockattr_t
pthread_spinlock_t
pthread_t
timer_t
trace_attr_t
trace_event_id_t
trace_event_set_t
trace_id_t
๐ฆ additionally ๐ฆ
mode_tshall be an integer type.dev_tshall be an integer type.nlink_t,uid_t,gid_t, andid_tshall be integer types.blkcnt_tandoff_tshall be signed integer types.fsblkcnt_t,fsfilcnt_t, andino_tshall be defined as unsigned integer types.size_tshall be an unsigned integer type.blksize_t,pid_t, andssize_tshall be signed integer types.clock_tshall be an integer or real-floating type. andtime_tshall be an integer type. (they're a duo but not twins, iykyk ๐ซ)
the type ssize_t shall be capable of storing values at least in the range [-1, {SSIZE_MAX}]. slay.
the type suseconds_t shall be a signed integer type capable of storing values at least in the range [-1, 1000000]. ๐ฏ
the implementation shall support one or more programming environments in which the widths of blksize_t, pid_t, size_t, ssize_t, and suseconds_t are no greater than the width of type long. the names of these programming environments can be obtained using the confstr() function or the getconf utility. (we love a lookup moment ๐ต๏ธโโ๏ธ)
๐ฉ heads up bestie: there are no defined comparison or assignment operators for the following types. so don't be out here comparing them like they're regular numbers, because they are NOT. periodt.
pthread_attr_t
pthread_barrier_t
pthread_barrierattr_t
pthread_cond_t
pthread_condattr_t
pthread_mutex_t
pthread_mutexattr_t
pthread_rwlock_t
pthread_rwlockattr_t
pthread_spinlock_t
timer_t
trace_attr_t
the following sections are informative. โจ
๐ APPLICATION USAGE ๐
none. literally nothing. she said "no notes." ๐
๐ RATIONALE ๐
none. again. empty. the void. ๐ณ๏ธโจ
๐ FUTURE DIRECTIONS ๐
none. the future is, apparently, also quiet. ๐ฎ
๐ SEE ALSO ๐
<time.h>- The System Interfaces volume of POSIX.1โ2017,
confstr() - The Shell and Utilities volume of POSIX.1โ2017,
getconf
๐ COPYRIGHT ๐
okay so legally speaking, portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.
and here's the important bit, no cap: 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 .
any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, bestie ๐ซถ this one came to you courtesy of IEEE/The Open Group, 2017 โ mwah, go forth and #include responsibly ๐โจ๐
๐ฆ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 ยท custom
- alpine 3.23: man-pages-posix 2017a-r0 ยท custom
- alpine 3.24: man-pages-posix 2017a-r0 ยท custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 ยท SUSE-IEEE
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms