gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

pthread_linux_386.go (79538B)


      1 // Code generated by 'ccgo pthread/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o pthread/pthread_linux_386.go -pkgname pthread', DO NOT EDIT.
      2 
      3 package pthread
      4 
      5 import (
      6 	"math"
      7 	"reflect"
      8 	"sync/atomic"
      9 	"unsafe"
     10 )
     11 
     12 var _ = math.Pi
     13 var _ reflect.Kind
     14 var _ atomic.Value
     15 var _ unsafe.Pointer
     16 
     17 const (
     18 	CLOCK_BOOTTIME                  = 7
     19 	CLOCK_BOOTTIME_ALARM            = 9
     20 	CLOCK_MONOTONIC                 = 1
     21 	CLOCK_MONOTONIC_COARSE          = 6
     22 	CLOCK_MONOTONIC_RAW             = 4
     23 	CLOCK_PROCESS_CPUTIME_ID        = 2
     24 	CLOCK_REALTIME                  = 0
     25 	CLOCK_REALTIME_ALARM            = 8
     26 	CLOCK_REALTIME_COARSE           = 5
     27 	CLOCK_TAI                       = 11
     28 	CLOCK_THREAD_CPUTIME_ID         = 3
     29 	PTHREAD_BARRIER_SERIAL_THREAD   = -1
     30 	PTHREAD_ONCE_INIT               = 0
     31 	SCHED_FIFO                      = 1
     32 	SCHED_OTHER                     = 0
     33 	SCHED_RR                        = 2
     34 	TIMER_ABSTIME                   = 1
     35 	TIME_UTC                        = 1
     36 	X_ATFILE_SOURCE                 = 1
     37 	X_BITS_CPU_SET_H                = 1
     38 	X_BITS_ENDIANNESS_H             = 1
     39 	X_BITS_ENDIAN_H                 = 1
     40 	X_BITS_PTHREADTYPES_ARCH_H      = 1
     41 	X_BITS_PTHREADTYPES_COMMON_H    = 1
     42 	X_BITS_SCHED_H                  = 1
     43 	X_BITS_SETJMP_H                 = 1
     44 	X_BITS_TIME64_H                 = 1
     45 	X_BITS_TIME_H                   = 1
     46 	X_BITS_TYPESIZES_H              = 1
     47 	X_BITS_TYPES_H                  = 1
     48 	X_BITS_TYPES_LOCALE_T_H         = 1
     49 	X_BITS_TYPES_STRUCT_SCHED_PARAM = 1
     50 	X_BITS_TYPES___LOCALE_T_H       = 1
     51 	X_BSD_SIZE_T_                   = 0
     52 	X_BSD_SIZE_T_DEFINED_           = 0
     53 	X_DEFAULT_SOURCE                = 1
     54 	X_FEATURES_H                    = 1
     55 	X_FILE_OFFSET_BITS              = 64
     56 	X_GCC_SIZE_T                    = 0
     57 	X_ILP32                         = 1
     58 	X_POSIX_C_SOURCE                = 200809
     59 	X_POSIX_SOURCE                  = 1
     60 	X_PTHREAD_H                     = 1
     61 	X_RWLOCK_INTERNAL_H             = 0
     62 	X_SCHED_H                       = 1
     63 	X_SIZET_                        = 0
     64 	X_SIZE_T                        = 0
     65 	X_SIZE_T_                       = 0
     66 	X_SIZE_T_DECLARED               = 0
     67 	X_SIZE_T_DEFINED                = 0
     68 	X_SIZE_T_DEFINED_               = 0
     69 	X_STDC_PREDEF_H                 = 1
     70 	X_STRUCT_TIMESPEC               = 1
     71 	X_SYS_CDEFS_H                   = 1
     72 	X_SYS_SIZE_T_H                  = 0
     73 	X_THREAD_MUTEX_INTERNAL_H       = 1
     74 	X_THREAD_SHARED_TYPES_H         = 1
     75 	X_TIME_H                        = 1
     76 	X_T_SIZE                        = 0
     77 	X_T_SIZE_                       = 0
     78 	I386                            = 1
     79 	Linux                           = 1
     80 	Unix                            = 1
     81 )
     82 
     83 // Read-write lock types.
     84 const ( /* pthread.h:100:1: */
     85 	PTHREAD_RWLOCK_PREFER_READER_NP              = 0
     86 	PTHREAD_RWLOCK_PREFER_WRITER_NP              = 1
     87 	PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP = 2
     88 	PTHREAD_RWLOCK_DEFAULT_NP                    = 0
     89 )
     90 
     91 // Read-write lock initializers.
     92 
     93 // Scheduler inheritance.
     94 const ( /* pthread.h:120:1: */
     95 	PTHREAD_INHERIT_SCHED  = 0
     96 	PTHREAD_EXPLICIT_SCHED = 1
     97 )
     98 
     99 // Scope handling.
    100 const ( /* pthread.h:130:1: */
    101 	PTHREAD_SCOPE_SYSTEM  = 0
    102 	PTHREAD_SCOPE_PROCESS = 1
    103 )
    104 
    105 // Process shared or private flag.
    106 const ( /* pthread.h:140:1: */
    107 	PTHREAD_PROCESS_PRIVATE = 0
    108 	PTHREAD_PROCESS_SHARED  = 1
    109 )
    110 
    111 // Cancellation
    112 const ( /* pthread.h:164:1: */
    113 	PTHREAD_CANCEL_ENABLE  = 0
    114 	PTHREAD_CANCEL_DISABLE = 1
    115 )
    116 const ( /* pthread.h:171:1: */
    117 	PTHREAD_CANCEL_DEFERRED     = 0
    118 	PTHREAD_CANCEL_ASYNCHRONOUS = 1
    119 )
    120 
    121 // Determine the wordsize from the preprocessor defines.
    122 
    123 // NB: Include guard matches what <linux/time.h> uses.
    124 
    125 // Detach state.
    126 const ( /* pthread.h:33:1: */
    127 	PTHREAD_CREATE_JOINABLE = 0
    128 	PTHREAD_CREATE_DETACHED = 1
    129 )
    130 
    131 // Mutex types.
    132 const ( /* pthread.h:43:1: */
    133 	PTHREAD_MUTEX_TIMED_NP      = 0
    134 	PTHREAD_MUTEX_RECURSIVE_NP  = 1
    135 	PTHREAD_MUTEX_ERRORCHECK_NP = 2
    136 	PTHREAD_MUTEX_ADAPTIVE_NP   = 3
    137 	PTHREAD_MUTEX_NORMAL        = 0
    138 	PTHREAD_MUTEX_RECURSIVE     = 1
    139 	PTHREAD_MUTEX_ERRORCHECK    = 2
    140 	PTHREAD_MUTEX_DEFAULT       = 0
    141 )
    142 
    143 // Robust mutex or not flags.
    144 const ( /* pthread.h:65:1: */
    145 	PTHREAD_MUTEX_STALLED    = 0
    146 	PTHREAD_MUTEX_STALLED_NP = 0
    147 	PTHREAD_MUTEX_ROBUST     = 1
    148 	PTHREAD_MUTEX_ROBUST_NP  = 1
    149 )
    150 
    151 // Mutex protocols.
    152 const ( /* pthread.h:77:1: */
    153 	PTHREAD_PRIO_NONE    = 0
    154 	PTHREAD_PRIO_INHERIT = 1
    155 	PTHREAD_PRIO_PROTECT = 2
    156 )
    157 
    158 type Ptrdiff_t = int32 /* <builtin>:3:26 */
    159 
    160 type Size_t = uint32 /* <builtin>:9:23 */
    161 
    162 type Wchar_t = int32 /* <builtin>:15:24 */
    163 
    164 type X__builtin_va_list = uintptr /* <builtin>:46:14 */
    165 type X__float128 = float64        /* <builtin>:47:21 */
    166 
    167 // Copyright (C) 2002-2020 Free Software Foundation, Inc.
    168 //    This file is part of the GNU C Library.
    169 //
    170 //    The GNU C Library is free software; you can redistribute it and/or
    171 //    modify it under the terms of the GNU Lesser General Public
    172 //    License as published by the Free Software Foundation; either
    173 //    version 2.1 of the License, or (at your option) any later version.
    174 //
    175 //    The GNU C Library is distributed in the hope that it will be useful,
    176 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    177 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    178 //    Lesser General Public License for more details.
    179 //
    180 //    You should have received a copy of the GNU Lesser General Public
    181 //    License along with the GNU C Library; if not, see
    182 //    <https://www.gnu.org/licenses/>.
    183 
    184 // Copyright (C) 1991-2020 Free Software Foundation, Inc.
    185 //    This file is part of the GNU C Library.
    186 //
    187 //    The GNU C Library is free software; you can redistribute it and/or
    188 //    modify it under the terms of the GNU Lesser General Public
    189 //    License as published by the Free Software Foundation; either
    190 //    version 2.1 of the License, or (at your option) any later version.
    191 //
    192 //    The GNU C Library is distributed in the hope that it will be useful,
    193 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    194 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    195 //    Lesser General Public License for more details.
    196 //
    197 //    You should have received a copy of the GNU Lesser General Public
    198 //    License along with the GNU C Library; if not, see
    199 //    <https://www.gnu.org/licenses/>.
    200 
    201 // These are defined by the user (or the compiler)
    202 //    to specify the desired environment:
    203 //
    204 //    __STRICT_ANSI__	ISO Standard C.
    205 //    _ISOC99_SOURCE	Extensions to ISO C89 from ISO C99.
    206 //    _ISOC11_SOURCE	Extensions to ISO C99 from ISO C11.
    207 //    _ISOC2X_SOURCE	Extensions to ISO C99 from ISO C2X.
    208 //    __STDC_WANT_LIB_EXT2__
    209 // 			Extensions to ISO C99 from TR 27431-2:2010.
    210 //    __STDC_WANT_IEC_60559_BFP_EXT__
    211 // 			Extensions to ISO C11 from TS 18661-1:2014.
    212 //    __STDC_WANT_IEC_60559_FUNCS_EXT__
    213 // 			Extensions to ISO C11 from TS 18661-4:2015.
    214 //    __STDC_WANT_IEC_60559_TYPES_EXT__
    215 // 			Extensions to ISO C11 from TS 18661-3:2015.
    216 //
    217 //    _POSIX_SOURCE	IEEE Std 1003.1.
    218 //    _POSIX_C_SOURCE	If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
    219 // 			if >=199309L, add IEEE Std 1003.1b-1993;
    220 // 			if >=199506L, add IEEE Std 1003.1c-1995;
    221 // 			if >=200112L, all of IEEE 1003.1-2004
    222 // 			if >=200809L, all of IEEE 1003.1-2008
    223 //    _XOPEN_SOURCE	Includes POSIX and XPG things.  Set to 500 if
    224 // 			Single Unix conformance is wanted, to 600 for the
    225 // 			sixth revision, to 700 for the seventh revision.
    226 //    _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
    227 //    _LARGEFILE_SOURCE	Some more functions for correct standard I/O.
    228 //    _LARGEFILE64_SOURCE	Additional functionality from LFS for large files.
    229 //    _FILE_OFFSET_BITS=N	Select default filesystem interface.
    230 //    _ATFILE_SOURCE	Additional *at interfaces.
    231 //    _GNU_SOURCE		All of the above, plus GNU extensions.
    232 //    _DEFAULT_SOURCE	The default set of features (taking precedence over
    233 // 			__STRICT_ANSI__).
    234 //
    235 //    _FORTIFY_SOURCE	Add security hardening to many library functions.
    236 // 			Set to 1 or 2; 2 performs stricter checks than 1.
    237 //
    238 //    _REENTRANT, _THREAD_SAFE
    239 // 			Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
    240 //
    241 //    The `-ansi' switch to the GNU C compiler, and standards conformance
    242 //    options such as `-std=c99', define __STRICT_ANSI__.  If none of
    243 //    these are defined, or if _DEFAULT_SOURCE is defined, the default is
    244 //    to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
    245 //    200809L, as well as enabling miscellaneous functions from BSD and
    246 //    SVID.  If more than one of these are defined, they accumulate.  For
    247 //    example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
    248 //    give you ISO C, 1003.1, and 1003.2, but nothing else.
    249 //
    250 //    These are defined by this file and are used by the
    251 //    header files to decide what to declare or define:
    252 //
    253 //    __GLIBC_USE (F)	Define things from feature set F.  This is defined
    254 // 			to 1 or 0; the subsequent macros are either defined
    255 // 			or undefined, and those tests should be moved to
    256 // 			__GLIBC_USE.
    257 //    __USE_ISOC11		Define ISO C11 things.
    258 //    __USE_ISOC99		Define ISO C99 things.
    259 //    __USE_ISOC95		Define ISO C90 AMD1 (C95) things.
    260 //    __USE_ISOCXX11	Define ISO C++11 things.
    261 //    __USE_POSIX		Define IEEE Std 1003.1 things.
    262 //    __USE_POSIX2		Define IEEE Std 1003.2 things.
    263 //    __USE_POSIX199309	Define IEEE Std 1003.1, and .1b things.
    264 //    __USE_POSIX199506	Define IEEE Std 1003.1, .1b, .1c and .1i things.
    265 //    __USE_XOPEN		Define XPG things.
    266 //    __USE_XOPEN_EXTENDED	Define X/Open Unix things.
    267 //    __USE_UNIX98		Define Single Unix V2 things.
    268 //    __USE_XOPEN2K        Define XPG6 things.
    269 //    __USE_XOPEN2KXSI     Define XPG6 XSI things.
    270 //    __USE_XOPEN2K8       Define XPG7 things.
    271 //    __USE_XOPEN2K8XSI    Define XPG7 XSI things.
    272 //    __USE_LARGEFILE	Define correct standard I/O things.
    273 //    __USE_LARGEFILE64	Define LFS things with separate names.
    274 //    __USE_FILE_OFFSET64	Define 64bit interface as default.
    275 //    __USE_MISC		Define things from 4.3BSD or System V Unix.
    276 //    __USE_ATFILE		Define *at interfaces and AT_* constants for them.
    277 //    __USE_GNU		Define GNU extensions.
    278 //    __USE_FORTIFY_LEVEL	Additional security measures used, according to level.
    279 //
    280 //    The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
    281 //    defined by this file unconditionally.  `__GNU_LIBRARY__' is provided
    282 //    only for compatibility.  All new code should use the other symbols
    283 //    to test for features.
    284 //
    285 //    All macros listed above as possibly being defined by this file are
    286 //    explicitly undefined if they are not explicitly defined.
    287 //    Feature-test macros that are not defined by the user or compiler
    288 //    but are implied by the other feature-test macros defined (or by the
    289 //    lack of any definitions) are defined by the file.
    290 //
    291 //    ISO C feature test macros depend on the definition of the macro
    292 //    when an affected header is included, not when the first system
    293 //    header is included, and so they are handled in
    294 //    <bits/libc-header-start.h>, which does not have a multiple include
    295 //    guard.  Feature test macros that can be handled from the first
    296 //    system header included are handled here.
    297 
    298 // Undefine everything, so we get a clean slate.
    299 
    300 // Suppress kernel-name space pollution unless user expressedly asks
    301 //    for it.
    302 
    303 // Convenience macro to test the version of gcc.
    304 //    Use like this:
    305 //    #if __GNUC_PREREQ (2,8)
    306 //    ... code requiring gcc 2.8 or later ...
    307 //    #endif
    308 //    Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
    309 //    added in 2.0.
    310 
    311 // Similarly for clang.  Features added to GCC after version 4.2 may
    312 //    or may not also be available in clang, and clang's definitions of
    313 //    __GNUC(_MINOR)__ are fixed at 4 and 2 respectively.  Not all such
    314 //    features can be queried via __has_extension/__has_feature.
    315 
    316 // Whether to use feature set F.
    317 
    318 // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
    319 //    _DEFAULT_SOURCE.  If _DEFAULT_SOURCE is present we do not
    320 //    issue a warning; the expectation is that the source is being
    321 //    transitioned to use the new macro.
    322 
    323 // If _GNU_SOURCE was defined by the user, turn on all the other features.
    324 
    325 // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
    326 //    define _DEFAULT_SOURCE.
    327 
    328 // This is to enable the ISO C2X extension.
    329 
    330 // This is to enable the ISO C11 extension.
    331 
    332 // This is to enable the ISO C99 extension.
    333 
    334 // This is to enable the ISO C90 Amendment 1:1995 extension.
    335 
    336 // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
    337 //    is defined, use POSIX.1-2008 (or another version depending on
    338 //    _XOPEN_SOURCE).
    339 
    340 // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
    341 //    defined in all multithreaded code.  GNU libc has not required this
    342 //    for many years.  We now treat them as compatibility synonyms for
    343 //    _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
    344 //    comprehensive support for multithreaded code.  Using them never
    345 //    lowers the selected level of POSIX conformance, only raises it.
    346 
    347 // The function 'gets' existed in C89, but is impossible to use
    348 //    safely.  It has been removed from ISO C11 and ISO C++14.  Note: for
    349 //    compatibility with various implementations of <cstdio>, this test
    350 //    must consider only the value of __cplusplus when compiling C++.
    351 
    352 // GNU formerly extended the scanf functions with modified format
    353 //    specifiers %as, %aS, and %a[...] that allocate a buffer for the
    354 //    input using malloc.  This extension conflicts with ISO C99, which
    355 //    defines %a as a standalone format specifier that reads a floating-
    356 //    point number; moreover, POSIX.1-2008 provides the same feature
    357 //    using the modifier letter 'm' instead (%ms, %mS, %m[...]).
    358 //
    359 //    We now follow C99 unless GNU extensions are active and the compiler
    360 //    is specifically in C89 or C++98 mode (strict or not).  For
    361 //    instance, with GCC, -std=gnu11 will have C99-compliant scanf with
    362 //    or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
    363 //    old extension.
    364 
    365 // Get definitions of __STDC_* predefined macros, if the compiler has
    366 //    not preincluded this header automatically.
    367 // Copyright (C) 1991-2020 Free Software Foundation, Inc.
    368 //    This file is part of the GNU C Library.
    369 //
    370 //    The GNU C Library is free software; you can redistribute it and/or
    371 //    modify it under the terms of the GNU Lesser General Public
    372 //    License as published by the Free Software Foundation; either
    373 //    version 2.1 of the License, or (at your option) any later version.
    374 //
    375 //    The GNU C Library is distributed in the hope that it will be useful,
    376 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    377 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    378 //    Lesser General Public License for more details.
    379 //
    380 //    You should have received a copy of the GNU Lesser General Public
    381 //    License along with the GNU C Library; if not, see
    382 //    <https://www.gnu.org/licenses/>.
    383 
    384 // This macro indicates that the installed library is the GNU C Library.
    385 //    For historic reasons the value now is 6 and this will stay from now
    386 //    on.  The use of this variable is deprecated.  Use __GLIBC__ and
    387 //    __GLIBC_MINOR__ now (see below) when you want to test for a specific
    388 //    GNU C library version and use the values in <gnu/lib-names.h> to get
    389 //    the sonames of the shared libraries.
    390 
    391 // Major and minor version number of the GNU C library package.  Use
    392 //    these macros to test for features in specific releases.
    393 
    394 // This is here only because every header file already includes this one.
    395 // Copyright (C) 1992-2020 Free Software Foundation, Inc.
    396 //    This file is part of the GNU C Library.
    397 //
    398 //    The GNU C Library is free software; you can redistribute it and/or
    399 //    modify it under the terms of the GNU Lesser General Public
    400 //    License as published by the Free Software Foundation; either
    401 //    version 2.1 of the License, or (at your option) any later version.
    402 //
    403 //    The GNU C Library is distributed in the hope that it will be useful,
    404 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    405 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    406 //    Lesser General Public License for more details.
    407 //
    408 //    You should have received a copy of the GNU Lesser General Public
    409 //    License along with the GNU C Library; if not, see
    410 //    <https://www.gnu.org/licenses/>.
    411 
    412 // We are almost always included from features.h.
    413 
    414 // The GNU libc does not support any K&R compilers or the traditional mode
    415 //    of ISO C compilers anymore.  Check for some of the combinations not
    416 //    anymore supported.
    417 
    418 // Some user header file might have defined this before.
    419 
    420 // All functions, except those with callbacks or those that
    421 //    synchronize memory, are leaf functions.
    422 
    423 // GCC can always grok prototypes.  For C++ programs we add throw()
    424 //    to help it optimize the function calls.  But this works only with
    425 //    gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
    426 //    as non-throwing using a function attribute since programs can use
    427 //    the -fexceptions options for C code as well.
    428 
    429 // Compilers that are not clang may object to
    430 //        #if defined __clang__ && __has_extension(...)
    431 //    even though they do not need to evaluate the right-hand side of the &&.
    432 
    433 // These two macros are not used in glibc anymore.  They are kept here
    434 //    only because some other projects expect the macros to be defined.
    435 
    436 // For these things, GCC behaves the ANSI way normally,
    437 //    and the non-ANSI way under -traditional.
    438 
    439 // This is not a typedef so `const __ptr_t' does the right thing.
    440 
    441 // C++ needs to know that types and declarations are C, not C++.
    442 
    443 // Fortify support.
    444 
    445 // Support for flexible arrays.
    446 //    Headers that should use flexible arrays only if they're "real"
    447 //    (e.g. only if they won't affect sizeof()) should test
    448 //    #if __glibc_c99_flexarr_available.
    449 
    450 // __asm__ ("xyz") is used throughout the headers to rename functions
    451 //    at the assembly language level.  This is wrapped by the __REDIRECT
    452 //    macro, in order to support compilers that can do this some other
    453 //    way.  When compilers don't support asm-names at all, we have to do
    454 //    preprocessor tricks instead (which don't have exactly the right
    455 //    semantics, but it's the best we can do).
    456 //
    457 //    Example:
    458 //    int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
    459 
    460 //
    461 // #elif __SOME_OTHER_COMPILER__
    462 //
    463 // # define __REDIRECT(name, proto, alias) name proto; 	_Pragma("let " #name " = " #alias)
    464 
    465 // GCC has various useful declarations that can be made with the
    466 //    `__attribute__' syntax.  All of the ways we use this do fine if
    467 //    they are omitted for compilers that don't understand it.
    468 
    469 // At some point during the gcc 2.96 development the `malloc' attribute
    470 //    for functions was introduced.  We don't want to use it unconditionally
    471 //    (although this would be possible) since it generates warnings.
    472 
    473 // Tell the compiler which arguments to an allocation function
    474 //    indicate the size of the allocation.
    475 
    476 // At some point during the gcc 2.96 development the `pure' attribute
    477 //    for functions was introduced.  We don't want to use it unconditionally
    478 //    (although this would be possible) since it generates warnings.
    479 
    480 // This declaration tells the compiler that the value is constant.
    481 
    482 // At some point during the gcc 3.1 development the `used' attribute
    483 //    for functions was introduced.  We don't want to use it unconditionally
    484 //    (although this would be possible) since it generates warnings.
    485 
    486 // Since version 3.2, gcc allows marking deprecated functions.
    487 
    488 // Since version 4.5, gcc also allows one to specify the message printed
    489 //    when a deprecated function is used.  clang claims to be gcc 4.2, but
    490 //    may also support this feature.
    491 
    492 // At some point during the gcc 2.8 development the `format_arg' attribute
    493 //    for functions was introduced.  We don't want to use it unconditionally
    494 //    (although this would be possible) since it generates warnings.
    495 //    If several `format_arg' attributes are given for the same function, in
    496 //    gcc-3.0 and older, all but the last one are ignored.  In newer gccs,
    497 //    all designated arguments are considered.
    498 
    499 // At some point during the gcc 2.97 development the `strfmon' format
    500 //    attribute for functions was introduced.  We don't want to use it
    501 //    unconditionally (although this would be possible) since it
    502 //    generates warnings.
    503 
    504 // The nonull function attribute allows to mark pointer parameters which
    505 //    must not be NULL.
    506 
    507 // If fortification mode, we warn about unused results of certain
    508 //    function calls which can lead to problems.
    509 
    510 // Forces a function to be always inlined.
    511 // The Linux kernel defines __always_inline in stddef.h (283d7573), and
    512 //    it conflicts with this definition.  Therefore undefine it first to
    513 //    allow either header to be included first.
    514 
    515 // Associate error messages with the source location of the call site rather
    516 //    than with the source location inside the function.
    517 
    518 // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
    519 //    inline semantics, unless -fgnu89-inline is used.  Using __GNUC_STDC_INLINE__
    520 //    or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
    521 //    older than 4.3 may define these macros and still not guarantee GNU inlining
    522 //    semantics.
    523 //
    524 //    clang++ identifies itself as gcc-4.2, but has support for GNU inlining
    525 //    semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
    526 //    __GNUC_GNU_INLINE__ macro definitions.
    527 
    528 // GCC 4.3 and above allow passing all anonymous arguments of an
    529 //    __extern_always_inline function to some other vararg function.
    530 
    531 // It is possible to compile containing GCC extensions even if GCC is
    532 //    run in pedantic mode if the uses are carefully marked using the
    533 //    `__extension__' keyword.  But this is not generally available before
    534 //    version 2.8.
    535 
    536 // __restrict is known in EGCS 1.2 and above.
    537 
    538 // ISO C99 also allows to declare arrays as non-overlapping.  The syntax is
    539 //      array_name[restrict]
    540 //    GCC 3.1 supports this.
    541 
    542 // Describes a char array whose address can safely be passed as the first
    543 //    argument to strncpy and strncat, as the char array is not necessarily
    544 //    a NUL-terminated string.
    545 
    546 // Undefine (also defined in libc-symbols.h).
    547 // Copies attributes from the declaration or type referenced by
    548 //    the argument.
    549 
    550 // Determine the wordsize from the preprocessor defines.
    551 
    552 // Properties of long double type.  ldbl-96 version.
    553 //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
    554 //    This file is part of the GNU C Library.
    555 //
    556 //    The GNU C Library is free software; you can redistribute it and/or
    557 //    modify it under the terms of the GNU Lesser General Public
    558 //    License  published by the Free Software Foundation; either
    559 //    version 2.1 of the License, or (at your option) any later version.
    560 //
    561 //    The GNU C Library is distributed in the hope that it will be useful,
    562 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    563 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    564 //    Lesser General Public License for more details.
    565 //
    566 //    You should have received a copy of the GNU Lesser General Public
    567 //    License along with the GNU C Library; if not, see
    568 //    <https://www.gnu.org/licenses/>.
    569 
    570 // long double is distinct from double, so there is nothing to
    571 //    define here.
    572 
    573 // __glibc_macro_warning (MESSAGE) issues warning MESSAGE.  This is
    574 //    intended for use in preprocessor macros.
    575 //
    576 //    Note: MESSAGE must be a _single_ string; concatenation of string
    577 //    literals is not supported.
    578 
    579 // Generic selection (ISO C11) is a C-only feature, available in GCC
    580 //    since version 4.9.  Previous versions do not provide generic
    581 //    selection, even though they might set __STDC_VERSION__ to 201112L,
    582 //    when in -std=c11 mode.  Thus, we must check for !defined __GNUC__
    583 //    when testing __STDC_VERSION__ for generic selection support.
    584 //    On the other hand, Clang also defines __GNUC__, so a clang-specific
    585 //    check is required to enable the use of generic selection.
    586 
    587 // If we don't have __REDIRECT, prototypes will be missing if
    588 //    __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
    589 
    590 // Decide whether we can define 'extern inline' functions in headers.
    591 
    592 // This is here only because every header file already includes this one.
    593 //    Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
    594 //    <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
    595 //    that will always return failure (and set errno to ENOSYS).
    596 // This file is automatically generated.
    597 //    This file selects the right generated file of `__stub_FUNCTION' macros
    598 //    based on the architecture being compiled for.
    599 
    600 // This file is automatically generated.
    601 //    It defines a symbol `__stub_FUNCTION' for each function
    602 //    in the C library which is a stub, meaning it will fail
    603 //    every time called, usually setting errno to ENOSYS.
    604 
    605 // Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface.
    606 //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
    607 //    This file is part of the GNU C Library.
    608 //
    609 //    The GNU C Library is free software; you can redistribute it and/or
    610 //    modify it under the terms of the GNU Lesser General Public
    611 //    License as published by the Free Software Foundation; either
    612 //    version 2.1 of the License, or (at your option) any later version.
    613 //
    614 //    The GNU C Library is distributed in the hope that it will be useful,
    615 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    616 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    617 //    Lesser General Public License for more details.
    618 //
    619 //    You should have received a copy of the GNU Lesser General Public
    620 //    License along with the GNU C Library; if not, see
    621 //    <https://www.gnu.org/licenses/>.
    622 
    623 // Copyright (C) 1991-2020 Free Software Foundation, Inc.
    624 //    This file is part of the GNU C Library.
    625 //
    626 //    The GNU C Library is free software; you can redistribute it and/or
    627 //    modify it under the terms of the GNU Lesser General Public
    628 //    License as published by the Free Software Foundation; either
    629 //    version 2.1 of the License, or (at your option) any later version.
    630 //
    631 //    The GNU C Library is distributed in the hope that it will be useful,
    632 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    633 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    634 //    Lesser General Public License for more details.
    635 //
    636 //    You should have received a copy of the GNU Lesser General Public
    637 //    License along with the GNU C Library; if not, see
    638 //    <https://www.gnu.org/licenses/>.
    639 
    640 // Get type definitions.
    641 // bits/types.h -- definitions of __*_t types underlying *_t types.
    642 //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
    643 //    This file is part of the GNU C Library.
    644 //
    645 //    The GNU C Library is free software; you can redistribute it and/or
    646 //    modify it under the terms of the GNU Lesser General Public
    647 //    License as published by the Free Software Foundation; either
    648 //    version 2.1 of the License, or (at your option) any later version.
    649 //
    650 //    The GNU C Library is distributed in the hope that it will be useful,
    651 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    652 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    653 //    Lesser General Public License for more details.
    654 //
    655 //    You should have received a copy of the GNU Lesser General Public
    656 //    License along with the GNU C Library; if not, see
    657 //    <https://www.gnu.org/licenses/>.
    658 
    659 // Never include this file directly; use <sys/types.h> instead.
    660 
    661 // Copyright (C) 1991-2020 Free Software Foundation, Inc.
    662 //    This file is part of the GNU C Library.
    663 //
    664 //    The GNU C Library is free software; you can redistribute it and/or
    665 //    modify it under the terms of the GNU Lesser General Public
    666 //    License as published by the Free Software Foundation; either
    667 //    version 2.1 of the License, or (at your option) any later version.
    668 //
    669 //    The GNU C Library is distributed in the hope that it will be useful,
    670 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    671 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    672 //    Lesser General Public License for more details.
    673 //
    674 //    You should have received a copy of the GNU Lesser General Public
    675 //    License along with the GNU C Library; if not, see
    676 //    <https://www.gnu.org/licenses/>.
    677 
    678 // Determine the wordsize from the preprocessor defines.
    679 
    680 // Bit size of the time_t type at glibc build time, x86-64 and x32 case.
    681 //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
    682 //    This file is part of the GNU C Library.
    683 //
    684 //    The GNU C Library is free software; you can redistribute it and/or
    685 //    modify it under the terms of the GNU Lesser General Public
    686 //    License as published by the Free Software Foundation; either
    687 //    version 2.1 of the License, or (at your option) any later version.
    688 //
    689 //    The GNU C Library is distributed in the hope that it will be useful,
    690 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    691 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    692 //    Lesser General Public License for more details.
    693 //
    694 //    You should have received a copy of the GNU Lesser General Public
    695 //    License along with the GNU C Library; if not, see
    696 //    <https://www.gnu.org/licenses/>.
    697 
    698 // For others, time size is word size.
    699 
    700 // Convenience types.
    701 type X__u_char = uint8   /* types.h:31:23 */
    702 type X__u_short = uint16 /* types.h:32:28 */
    703 type X__u_int = uint32   /* types.h:33:22 */
    704 type X__u_long = uint32  /* types.h:34:27 */
    705 
    706 // Fixed-size types, underlying types depend on word size and compiler.
    707 type X__int8_t = int8     /* types.h:37:21 */
    708 type X__uint8_t = uint8   /* types.h:38:23 */
    709 type X__int16_t = int16   /* types.h:39:26 */
    710 type X__uint16_t = uint16 /* types.h:40:28 */
    711 type X__int32_t = int32   /* types.h:41:20 */
    712 type X__uint32_t = uint32 /* types.h:42:22 */
    713 type X__int64_t = int64   /* types.h:47:44 */
    714 type X__uint64_t = uint64 /* types.h:48:46 */
    715 
    716 // Smallest types with at least a given width.
    717 type X__int_least8_t = X__int8_t     /* types.h:52:18 */
    718 type X__uint_least8_t = X__uint8_t   /* types.h:53:19 */
    719 type X__int_least16_t = X__int16_t   /* types.h:54:19 */
    720 type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
    721 type X__int_least32_t = X__int32_t   /* types.h:56:19 */
    722 type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
    723 type X__int_least64_t = X__int64_t   /* types.h:58:19 */
    724 type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
    725 
    726 // quad_t is also 64 bits.
    727 type X__quad_t = int64    /* types.h:66:37 */
    728 type X__u_quad_t = uint64 /* types.h:67:46 */
    729 
    730 // Largest integral types.
    731 type X__intmax_t = int64   /* types.h:75:37 */
    732 type X__uintmax_t = uint64 /* types.h:76:46 */
    733 
    734 // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
    735 //    macros for each of the OS types we define below.  The definitions
    736 //    of those macros must use the following macros for underlying types.
    737 //    We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
    738 //    variants of each of the following integer types on this machine.
    739 //
    740 // 	16		-- "natural" 16-bit type (always short)
    741 // 	32		-- "natural" 32-bit type (always int)
    742 // 	64		-- "natural" 64-bit type (long or long long)
    743 // 	LONG32		-- 32-bit type, traditionally long
    744 // 	QUAD		-- 64-bit type, traditionally long long
    745 // 	WORD		-- natural type of __WORDSIZE bits (int or long)
    746 // 	LONGWORD	-- type of __WORDSIZE bits, traditionally long
    747 //
    748 //    We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
    749 //    conventional uses of `long' or `long long' type modifiers match the
    750 //    types we define, even when a less-adorned type would be the same size.
    751 //    This matters for (somewhat) portably writing printf/scanf formats for
    752 //    these types, where using the appropriate l or ll format modifiers can
    753 //    make the typedefs and the formats match up across all GNU platforms.  If
    754 //    we used `long' when it's 64 bits where `long long' is expected, then the
    755 //    compiler would warn about the formats not matching the argument types,
    756 //    and the programmer changing them to shut up the compiler would break the
    757 //    program's portability.
    758 //
    759 //    Here we assume what is presently the case in all the GCC configurations
    760 //    we support: long long is always 64 bits, long is always word/address size,
    761 //    and int is always 32 bits.
    762 
    763 // We want __extension__ before typedef's that use nonstandard base types
    764 //    such as `long long' in C89 mode.
    765 // bits/typesizes.h -- underlying types for *_t.  Linux/x86-64 version.
    766 //    Copyright (C) 2012-2020 Free Software Foundation, Inc.
    767 //    This file is part of the GNU C Library.
    768 //
    769 //    The GNU C Library is free software; you can redistribute it and/or
    770 //    modify it under the terms of the GNU Lesser General Public
    771 //    License as published by the Free Software Foundation; either
    772 //    version 2.1 of the License, or (at your option) any later version.
    773 //
    774 //    The GNU C Library is distributed in the hope that it will be useful,
    775 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    776 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    777 //    Lesser General Public License for more details.
    778 //
    779 //    You should have received a copy of the GNU Lesser General Public
    780 //    License along with the GNU C Library; if not, see
    781 //    <https://www.gnu.org/licenses/>.
    782 
    783 // See <bits/types.h> for the meaning of these macros.  This file exists so
    784 //    that <bits/types.h> need not vary across different GNU platforms.
    785 
    786 // X32 kernel interface is 64-bit.
    787 
    788 // Number of descriptors that can fit in an `fd_set'.
    789 
    790 // bits/time64.h -- underlying types for __time64_t.  Generic version.
    791 //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
    792 //    This file is part of the GNU C Library.
    793 //
    794 //    The GNU C Library is free software; you can redistribute it and/or
    795 //    modify it under the terms of the GNU Lesser General Public
    796 //    License as published by the Free Software Foundation; either
    797 //    version 2.1 of the License, or (at your option) any later version.
    798 //
    799 //    The GNU C Library is distributed in the hope that it will be useful,
    800 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    801 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    802 //    Lesser General Public License for more details.
    803 //
    804 //    You should have received a copy of the GNU Lesser General Public
    805 //    License along with the GNU C Library; if not, see
    806 //    <https://www.gnu.org/licenses/>.
    807 
    808 // Define __TIME64_T_TYPE so that it is always a 64-bit type.
    809 
    810 // Define a 64-bit time type alongsize the 32-bit one.
    811 
    812 type X__dev_t = X__uint64_t                /* types.h:145:25 */ // Type of device numbers.
    813 type X__uid_t = uint32                     /* types.h:146:25 */ // Type of user identifications.
    814 type X__gid_t = uint32                     /* types.h:147:25 */ // Type of group identifications.
    815 type X__ino_t = uint32                     /* types.h:148:25 */ // Type of file serial numbers.
    816 type X__ino64_t = X__uint64_t              /* types.h:149:27 */ // Type of file serial numbers (LFS).
    817 type X__mode_t = uint32                    /* types.h:150:26 */ // Type of file attribute bitmasks.
    818 type X__nlink_t = uint32                   /* types.h:151:27 */ // Type of file link counts.
    819 type X__off_t = int32                      /* types.h:152:25 */ // Type of file sizes and offsets.
    820 type X__off64_t = X__int64_t               /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
    821 type X__pid_t = int32                      /* types.h:154:25 */ // Type of process identifications.
    822 type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
    823 type X__clock_t = int32                    /* types.h:156:27 */ // Type of CPU usage counts.
    824 type X__rlim_t = uint32                    /* types.h:157:26 */ // Type for resource measurement.
    825 type X__rlim64_t = X__uint64_t             /* types.h:158:28 */ // Type for resource measurement (LFS).
    826 type X__id_t = uint32                      /* types.h:159:24 */ // General type for IDs.
    827 type X__time_t = int32                     /* types.h:160:26 */ // Seconds since the Epoch.
    828 type X__useconds_t = uint32                /* types.h:161:30 */ // Count of microseconds.
    829 type X__suseconds_t = int32                /* types.h:162:31 */ // Signed count of microseconds.
    830 
    831 type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
    832 type X__key_t = int32   /* types.h:165:25 */ // Type of an IPC key.
    833 
    834 // Clock ID used in clock and timer functions.
    835 type X__clockid_t = int32 /* types.h:168:29 */
    836 
    837 // Timer ID returned by `timer_create'.
    838 type X__timer_t = uintptr /* types.h:171:12 */
    839 
    840 // Type to represent block size.
    841 type X__blksize_t = int32 /* types.h:174:29 */
    842 
    843 // Types from the Large File Support interface.
    844 
    845 // Type to count number of disk blocks.
    846 type X__blkcnt_t = int32        /* types.h:179:28 */
    847 type X__blkcnt64_t = X__int64_t /* types.h:180:30 */
    848 
    849 // Type to count file system blocks.
    850 type X__fsblkcnt_t = uint32        /* types.h:183:30 */
    851 type X__fsblkcnt64_t = X__uint64_t /* types.h:184:32 */
    852 
    853 // Type to count file system nodes.
    854 type X__fsfilcnt_t = uint32        /* types.h:187:30 */
    855 type X__fsfilcnt64_t = X__uint64_t /* types.h:188:32 */
    856 
    857 // Type of miscellaneous file system fields.
    858 type X__fsword_t = int32 /* types.h:191:28 */
    859 
    860 type X__ssize_t = int32 /* types.h:193:27 */ // Type of a byte count, or error.
    861 
    862 // Signed long type used in system calls.
    863 type X__syscall_slong_t = int32 /* types.h:196:33 */
    864 // Unsigned long type used in system calls.
    865 type X__syscall_ulong_t = uint32 /* types.h:198:33 */
    866 
    867 // These few don't really vary by system, they always correspond
    868 //
    869 //	to one of the other defined types.
    870 type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
    871 type X__caddr_t = uintptr   /* types.h:203:14 */
    872 
    873 // Duplicates info from stdint.h but this is used in unistd.h.
    874 type X__intptr_t = int32 /* types.h:206:25 */
    875 
    876 // Duplicate info from sys/socket.h.
    877 type X__socklen_t = uint32 /* types.h:209:23 */
    878 
    879 // C99: An integer type that can be accessed as an atomic entity,
    880 //
    881 //	even in the presence of asynchronous interrupts.
    882 //	It is not currently necessary for this to be machine-specific.
    883 type X__sig_atomic_t = int32 /* types.h:214:13 */
    884 
    885 // Seconds since the Epoch, visible to user code when time_t is too
    886 //
    887 //	narrow only for consistency with the old way of widening too-narrow
    888 //	types.  User code should never use __time64_t.
    889 type X__time64_t = X__int64_t /* types.h:222:28 */
    890 
    891 // Wide character type.
    892 //    Locale-writers should change this as necessary to
    893 //    be big enough to hold unique values not between 0 and 127,
    894 //    and not (wchar_t) -1, for each defined multibyte character.
    895 
    896 // Define this type if we are doing the whole job,
    897 //    or if we want this type in particular.
    898 
    899 // A null pointer constant.
    900 
    901 // bits/types.h -- definitions of __*_t types underlying *_t types.
    902 //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
    903 //    This file is part of the GNU C Library.
    904 //
    905 //    The GNU C Library is free software; you can redistribute it and/or
    906 //    modify it under the terms of the GNU Lesser General Public
    907 //    License as published by the Free Software Foundation; either
    908 //    version 2.1 of the License, or (at your option) any later version.
    909 //
    910 //    The GNU C Library is distributed in the hope that it will be useful,
    911 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    912 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    913 //    Lesser General Public License for more details.
    914 //
    915 //    You should have received a copy of the GNU Lesser General Public
    916 //    License along with the GNU C Library; if not, see
    917 //    <https://www.gnu.org/licenses/>.
    918 
    919 // Never include this file directly; use <sys/types.h> instead.
    920 
    921 // Returned by `time'.
    922 type Time_t = X__time_t /* time_t.h:7:18 */
    923 
    924 // NB: Include guard matches what <linux/time.h> uses.
    925 
    926 // bits/types.h -- definitions of __*_t types underlying *_t types.
    927 //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
    928 //    This file is part of the GNU C Library.
    929 //
    930 //    The GNU C Library is free software; you can redistribute it and/or
    931 //    modify it under the terms of the GNU Lesser General Public
    932 //    License as published by the Free Software Foundation; either
    933 //    version 2.1 of the License, or (at your option) any later version.
    934 //
    935 //    The GNU C Library is distributed in the hope that it will be useful,
    936 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    937 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    938 //    Lesser General Public License for more details.
    939 //
    940 //    You should have received a copy of the GNU Lesser General Public
    941 //    License along with the GNU C Library; if not, see
    942 //    <https://www.gnu.org/licenses/>.
    943 
    944 // Never include this file directly; use <sys/types.h> instead.
    945 
    946 // Endian macros for string.h functions
    947 //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
    948 //    This file is part of the GNU C Library.
    949 //
    950 //    The GNU C Library is free software; you can redistribute it and/or
    951 //    modify it under the terms of the GNU Lesser General Public
    952 //    License as published by the Free Software Foundation; either
    953 //    version 2.1 of the License, or (at your option) any later version.
    954 //
    955 //    The GNU C Library is distributed in the hope that it will be useful,
    956 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    957 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    958 //    Lesser General Public License for more details.
    959 //
    960 //    You should have received a copy of the GNU Lesser General Public
    961 //    License along with the GNU C Library; if not, see
    962 //    <http://www.gnu.org/licenses/>.
    963 
    964 // Definitions for byte order, according to significance of bytes,
    965 //    from low addresses to high addresses.  The value is what you get by
    966 //    putting '4' in the most significant byte, '3' in the second most
    967 //    significant byte, '2' in the second least significant byte, and '1'
    968 //    in the least significant byte, and then writing down one digit for
    969 //    each byte, starting with the byte at the lowest address at the left,
    970 //    and proceeding to the byte with the highest address at the right.
    971 
    972 // This file defines `__BYTE_ORDER' for the particular machine.
    973 
    974 // i386/x86_64 are little-endian.
    975 
    976 // Some machines may need to use a different endianness for floating point
    977 //    values.
    978 
    979 // POSIX.1b structure for a time value.  This is like a `struct timeval' but
    980 //
    981 //	has nanoseconds instead of microseconds.
    982 type Timespec = struct {
    983 	Ftv_sec  X__time_t
    984 	Ftv_nsec X__syscall_slong_t
    985 } /* struct_timespec.h:10:1 */
    986 
    987 type Pid_t = X__pid_t /* sched.h:38:17 */
    988 
    989 // Get system specific constant and data structure definitions.
    990 // Definitions of constants and data structure for POSIX 1003.1b-1993
    991 //    scheduling interface.
    992 //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
    993 //    This file is part of the GNU C Library.
    994 //
    995 //    The GNU C Library is free software; you can redistribute it and/or
    996 //    modify it under the terms of the GNU Lesser General Public
    997 //    License as published by the Free Software Foundation; either
    998 //    version 2.1 of the License, or (at your option) any later version.
    999 //
   1000 //    The GNU C Library is distributed in the hope that it will be useful,
   1001 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1002 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1003 //    Lesser General Public License for more details.
   1004 //
   1005 //    You should have received a copy of the GNU Lesser General Public
   1006 //    License along with the GNU C Library; if not, see
   1007 //    <https://www.gnu.org/licenses/>.
   1008 
   1009 // Scheduling algorithms.
   1010 
   1011 // Sched parameter structure.  Generic version.
   1012 //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
   1013 //    This file is part of the GNU C Library.
   1014 //
   1015 //    The GNU C Library is free software; you can redistribute it and/or
   1016 //    modify it under the terms of the GNU Lesser General Public
   1017 //    License as published by the Free Software Foundation; either
   1018 //    version 2.1 of the License, or (at your option) any later version.
   1019 //
   1020 //    The GNU C Library is distributed in the hope that it will be useful,
   1021 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1022 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1023 //    Lesser General Public License for more details.
   1024 //
   1025 //    You should have received a copy of the GNU Lesser General Public
   1026 //    License along with the GNU C Library;  if not, see
   1027 //    <https://www.gnu.org/licenses/>.
   1028 
   1029 // Data structure to describe a process' schedulability.
   1030 type Sched_param = struct{ Fsched_priority int32 } /* struct_sched_param.h:23:1 */
   1031 
   1032 // Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
   1033 //    scheduling interface.
   1034 //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
   1035 //    This file is part of the GNU C Library.
   1036 //
   1037 //    The GNU C Library is free software; you can redistribute it and/or
   1038 //    modify it under the terms of the GNU Lesser General Public
   1039 //    License as published by the Free Software Foundation; either
   1040 //    version 2.1 of the License, or (at your option) any later version.
   1041 //
   1042 //    The GNU C Library is distributed in the hope that it will be useful,
   1043 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1044 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1045 //    Lesser General Public License for more details.
   1046 //
   1047 //    You should have received a copy of the GNU Lesser General Public
   1048 //    License along with the GNU C Library; if not, see
   1049 //    <https://www.gnu.org/licenses/>.
   1050 
   1051 // Size definition for CPU sets.
   1052 
   1053 // Type for array elements in 'cpu_set_t'.
   1054 type X__cpu_mask = uint32 /* cpu-set.h:32:25 */
   1055 
   1056 // Basic access functions.
   1057 
   1058 // Data structure to describe CPU mask.
   1059 type Cpu_set_t = struct{ F__bits [32]X__cpu_mask } /* cpu-set.h:42:3 */
   1060 
   1061 // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   1062 //    This file is part of the GNU C Library.
   1063 //
   1064 //    The GNU C Library is free software; you can redistribute it and/or
   1065 //    modify it under the terms of the GNU Lesser General Public
   1066 //    License as published by the Free Software Foundation; either
   1067 //    version 2.1 of the License, or (at your option) any later version.
   1068 //
   1069 //    The GNU C Library is distributed in the hope that it will be useful,
   1070 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1071 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1072 //    Lesser General Public License for more details.
   1073 //
   1074 //    You should have received a copy of the GNU Lesser General Public
   1075 //    License along with the GNU C Library; if not, see
   1076 //    <https://www.gnu.org/licenses/>.
   1077 
   1078 //	ISO C99 Standard: 7.23 Date and time	<time.h>
   1079 
   1080 // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   1081 //    This file is part of the GNU C Library.
   1082 //
   1083 //    The GNU C Library is free software; you can redistribute it and/or
   1084 //    modify it under the terms of the GNU Lesser General Public
   1085 //    License as published by the Free Software Foundation; either
   1086 //    version 2.1 of the License, or (at your option) any later version.
   1087 //
   1088 //    The GNU C Library is distributed in the hope that it will be useful,
   1089 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1090 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1091 //    Lesser General Public License for more details.
   1092 //
   1093 //    You should have received a copy of the GNU Lesser General Public
   1094 //    License along with the GNU C Library; if not, see
   1095 //    <https://www.gnu.org/licenses/>.
   1096 
   1097 // Copyright (C) 1989-2020 Free Software Foundation, Inc.
   1098 //
   1099 // This file is part of GCC.
   1100 //
   1101 // GCC is free software; you can redistribute it and/or modify
   1102 // it under the terms of the GNU General Public License as published by
   1103 // the Free Software Foundation; either version 3, or (at your option)
   1104 // any later version.
   1105 //
   1106 // GCC is distributed in the hope that it will be useful,
   1107 // but WITHOUT ANY WARRANTY; without even the implied warranty of
   1108 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   1109 // GNU General Public License for more details.
   1110 //
   1111 // Under Section 7 of GPL version 3, you are granted additional
   1112 // permissions described in the GCC Runtime Library Exception, version
   1113 // 3.1, as published by the Free Software Foundation.
   1114 //
   1115 // You should have received a copy of the GNU General Public License and
   1116 // a copy of the GCC Runtime Library Exception along with this program;
   1117 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
   1118 // <http://www.gnu.org/licenses/>.
   1119 
   1120 // ISO C Standard:  7.17  Common definitions  <stddef.h>
   1121 
   1122 // Any one of these symbols __need_* means that GNU libc
   1123 //    wants us just to define one data type.  So don't define
   1124 //    the symbols that indicate this file's entire job has been done.
   1125 
   1126 // This avoids lossage on SunOS but only if stdtypes.h comes first.
   1127 //    There's no way to win with the other order!  Sun lossage.
   1128 
   1129 // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
   1130 //    Just ignore it.
   1131 
   1132 // On VxWorks, <type/vxTypesBase.h> may have defined macros like
   1133 //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
   1134 //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
   1135 //    not defined, and so that defining this macro defines _GCC_SIZE_T.
   1136 //    If we find that the macros are still defined at this point, we must
   1137 //    invoke them so that the type is defined as expected.
   1138 
   1139 // In case nobody has defined these types, but we aren't running under
   1140 //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
   1141 //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
   1142 //    parts of GCC is compiled by an older compiler, that actually
   1143 //    include gstddef.h, such as collect2.
   1144 
   1145 // Signed type of difference of two pointers.
   1146 
   1147 // Define this type if we are doing the whole job,
   1148 //    or if we want this type in particular.
   1149 
   1150 // Unsigned type of `sizeof' something.
   1151 
   1152 // Define this type if we are doing the whole job,
   1153 //    or if we want this type in particular.
   1154 
   1155 // Wide character type.
   1156 //    Locale-writers should change this as necessary to
   1157 //    be big enough to hold unique values not between 0 and 127,
   1158 //    and not (wchar_t) -1, for each defined multibyte character.
   1159 
   1160 // Define this type if we are doing the whole job,
   1161 //    or if we want this type in particular.
   1162 
   1163 // A null pointer constant.
   1164 
   1165 // This defines CLOCKS_PER_SEC, which is the number of processor clock
   1166 //    ticks per second, and possibly a number of other constants.
   1167 // System-dependent timing definitions.  Linux version.
   1168 //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
   1169 //    This file is part of the GNU C Library.
   1170 //
   1171 //    The GNU C Library is free software; you can redistribute it and/or
   1172 //    modify it under the terms of the GNU Lesser General Public
   1173 //    License as published by the Free Software Foundation; either
   1174 //    version 2.1 of the License, or (at your option) any later version.
   1175 //
   1176 //    The GNU C Library is distributed in the hope that it will be useful,
   1177 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1178 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1179 //    Lesser General Public License for more details.
   1180 //
   1181 //    You should have received a copy of the GNU Lesser General Public
   1182 //    License along with the GNU C Library; if not, see
   1183 //    <https://www.gnu.org/licenses/>.
   1184 
   1185 // Never include this file directly; use <time.h> instead.
   1186 
   1187 // bits/types.h -- definitions of __*_t types underlying *_t types.
   1188 //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   1189 //    This file is part of the GNU C Library.
   1190 //
   1191 //    The GNU C Library is free software; you can redistribute it and/or
   1192 //    modify it under the terms of the GNU Lesser General Public
   1193 //    License as published by the Free Software Foundation; either
   1194 //    version 2.1 of the License, or (at your option) any later version.
   1195 //
   1196 //    The GNU C Library is distributed in the hope that it will be useful,
   1197 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1198 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1199 //    Lesser General Public License for more details.
   1200 //
   1201 //    You should have received a copy of the GNU Lesser General Public
   1202 //    License along with the GNU C Library; if not, see
   1203 //    <https://www.gnu.org/licenses/>.
   1204 
   1205 // Never include this file directly; use <sys/types.h> instead.
   1206 
   1207 // ISO/IEC 9899:1999 7.23.1: Components of time
   1208 //    The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is
   1209 //    the number per second of the value returned by the `clock' function.
   1210 // CAE XSH, Issue 4, Version 2: <time.h>
   1211 //    The value of CLOCKS_PER_SEC is required to be 1 million on all
   1212 //    XSI-conformant systems.
   1213 
   1214 // Identifier for system-wide realtime clock.
   1215 // Monotonic system-wide clock.
   1216 // High-resolution timer from the CPU.
   1217 // Thread-specific CPU-time clock.
   1218 // Monotonic system-wide clock, not adjusted for frequency scaling.
   1219 // Identifier for system-wide realtime clock, updated only on ticks.
   1220 // Monotonic system-wide clock, updated only on ticks.
   1221 // Monotonic system-wide clock that includes time spent in suspension.
   1222 // Like CLOCK_REALTIME but also wakes suspended system.
   1223 // Like CLOCK_BOOTTIME but also wakes suspended system.
   1224 // Like CLOCK_REALTIME but in International Atomic Time.
   1225 
   1226 // Flag to indicate time is absolute.
   1227 
   1228 // Many of the typedefs and structs whose official home is this header
   1229 //    may also need to be defined by other headers.
   1230 
   1231 // bits/types.h -- definitions of __*_t types underlying *_t types.
   1232 //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   1233 //    This file is part of the GNU C Library.
   1234 //
   1235 //    The GNU C Library is free software; you can redistribute it and/or
   1236 //    modify it under the terms of the GNU Lesser General Public
   1237 //    License as published by the Free Software Foundation; either
   1238 //    version 2.1 of the License, or (at your option) any later version.
   1239 //
   1240 //    The GNU C Library is distributed in the hope that it will be useful,
   1241 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1242 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1243 //    Lesser General Public License for more details.
   1244 //
   1245 //    You should have received a copy of the GNU Lesser General Public
   1246 //    License along with the GNU C Library; if not, see
   1247 //    <https://www.gnu.org/licenses/>.
   1248 
   1249 // Never include this file directly; use <sys/types.h> instead.
   1250 
   1251 // Returned by `clock'.
   1252 type Clock_t = X__clock_t /* clock_t.h:7:19 */
   1253 
   1254 // bits/types.h -- definitions of __*_t types underlying *_t types.
   1255 //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   1256 //    This file is part of the GNU C Library.
   1257 //
   1258 //    The GNU C Library is free software; you can redistribute it and/or
   1259 //    modify it under the terms of the GNU Lesser General Public
   1260 //    License as published by the Free Software Foundation; either
   1261 //    version 2.1 of the License, or (at your option) any later version.
   1262 //
   1263 //    The GNU C Library is distributed in the hope that it will be useful,
   1264 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1265 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1266 //    Lesser General Public License for more details.
   1267 //
   1268 //    You should have received a copy of the GNU Lesser General Public
   1269 //    License along with the GNU C Library; if not, see
   1270 //    <https://www.gnu.org/licenses/>.
   1271 
   1272 // Never include this file directly; use <sys/types.h> instead.
   1273 
   1274 // ISO C `broken-down time' structure.
   1275 type Tm = struct {
   1276 	Ftm_sec    int32
   1277 	Ftm_min    int32
   1278 	Ftm_hour   int32
   1279 	Ftm_mday   int32
   1280 	Ftm_mon    int32
   1281 	Ftm_year   int32
   1282 	Ftm_wday   int32
   1283 	Ftm_yday   int32
   1284 	Ftm_isdst  int32
   1285 	Ftm_gmtoff int32
   1286 	Ftm_zone   uintptr
   1287 } /* struct_tm.h:7:1 */
   1288 
   1289 // NB: Include guard matches what <linux/time.h> uses.
   1290 
   1291 // bits/types.h -- definitions of __*_t types underlying *_t types.
   1292 //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   1293 //    This file is part of the GNU C Library.
   1294 //
   1295 //    The GNU C Library is free software; you can redistribute it and/or
   1296 //    modify it under the terms of the GNU Lesser General Public
   1297 //    License as published by the Free Software Foundation; either
   1298 //    version 2.1 of the License, or (at your option) any later version.
   1299 //
   1300 //    The GNU C Library is distributed in the hope that it will be useful,
   1301 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1302 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1303 //    Lesser General Public License for more details.
   1304 //
   1305 //    You should have received a copy of the GNU Lesser General Public
   1306 //    License along with the GNU C Library; if not, see
   1307 //    <https://www.gnu.org/licenses/>.
   1308 
   1309 // Never include this file directly; use <sys/types.h> instead.
   1310 
   1311 // Clock ID used in clock and timer functions.
   1312 type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
   1313 
   1314 // bits/types.h -- definitions of __*_t types underlying *_t types.
   1315 //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   1316 //    This file is part of the GNU C Library.
   1317 //
   1318 //    The GNU C Library is free software; you can redistribute it and/or
   1319 //    modify it under the terms of the GNU Lesser General Public
   1320 //    License as published by the Free Software Foundation; either
   1321 //    version 2.1 of the License, or (at your option) any later version.
   1322 //
   1323 //    The GNU C Library is distributed in the hope that it will be useful,
   1324 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1325 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1326 //    Lesser General Public License for more details.
   1327 //
   1328 //    You should have received a copy of the GNU Lesser General Public
   1329 //    License along with the GNU C Library; if not, see
   1330 //    <https://www.gnu.org/licenses/>.
   1331 
   1332 // Never include this file directly; use <sys/types.h> instead.
   1333 
   1334 // Timer ID returned by `timer_create'.
   1335 type Timer_t = X__timer_t /* timer_t.h:7:19 */
   1336 
   1337 // bits/types.h -- definitions of __*_t types underlying *_t types.
   1338 //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   1339 //    This file is part of the GNU C Library.
   1340 //
   1341 //    The GNU C Library is free software; you can redistribute it and/or
   1342 //    modify it under the terms of the GNU Lesser General Public
   1343 //    License as published by the Free Software Foundation; either
   1344 //    version 2.1 of the License, or (at your option) any later version.
   1345 //
   1346 //    The GNU C Library is distributed in the hope that it will be useful,
   1347 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1348 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1349 //    Lesser General Public License for more details.
   1350 //
   1351 //    You should have received a copy of the GNU Lesser General Public
   1352 //    License along with the GNU C Library; if not, see
   1353 //    <https://www.gnu.org/licenses/>.
   1354 
   1355 // Never include this file directly; use <sys/types.h> instead.
   1356 
   1357 // NB: Include guard matches what <linux/time.h> uses.
   1358 
   1359 // POSIX.1b structure for timer start values and intervals.
   1360 type Itimerspec = struct {
   1361 	Fit_interval struct {
   1362 		Ftv_sec  X__time_t
   1363 		Ftv_nsec X__syscall_slong_t
   1364 	}
   1365 	Fit_value struct {
   1366 		Ftv_sec  X__time_t
   1367 		Ftv_nsec X__syscall_slong_t
   1368 	}
   1369 } /* struct_itimerspec.h:8:1 */
   1370 
   1371 // Definition of locale_t.
   1372 //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
   1373 //    This file is part of the GNU C Library.
   1374 //
   1375 //    The GNU C Library is free software; you can redistribute it and/or
   1376 //    modify it under the terms of the GNU Lesser General Public
   1377 //    License as published by the Free Software Foundation; either
   1378 //    version 2.1 of the License, or (at your option) any later version.
   1379 //
   1380 //    The GNU C Library is distributed in the hope that it will be useful,
   1381 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1382 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1383 //    Lesser General Public License for more details.
   1384 //
   1385 //    You should have received a copy of the GNU Lesser General Public
   1386 //    License along with the GNU C Library; if not, see
   1387 //    <https://www.gnu.org/licenses/>.
   1388 
   1389 // Definition of struct __locale_struct and __locale_t.
   1390 //    Copyright (C) 1997-2020 Free Software Foundation, Inc.
   1391 //    This file is part of the GNU C Library.
   1392 //    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
   1393 //
   1394 //    The GNU C Library is free software; you can redistribute it and/or
   1395 //    modify it under the terms of the GNU Lesser General Public
   1396 //    License as published by the Free Software Foundation; either
   1397 //    version 2.1 of the License, or (at your option) any later version.
   1398 //
   1399 //    The GNU C Library is distributed in the hope that it will be useful,
   1400 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1401 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1402 //    Lesser General Public License for more details.
   1403 //
   1404 //    You should have received a copy of the GNU Lesser General Public
   1405 //    License along with the GNU C Library; if not, see
   1406 //    <https://www.gnu.org/licenses/>.
   1407 
   1408 // POSIX.1-2008: the locale_t type, representing a locale context
   1409 //    (implementation-namespace version).  This type should be treated
   1410 //    as opaque by applications; some details are exposed for the sake of
   1411 //    efficiency in e.g. ctype functions.
   1412 
   1413 type X__locale_struct = struct {
   1414 	F__locales       [13]uintptr
   1415 	F__ctype_b       uintptr
   1416 	F__ctype_tolower uintptr
   1417 	F__ctype_toupper uintptr
   1418 	F__names         [13]uintptr
   1419 } /* __locale_t.h:28:1 */
   1420 
   1421 type X__locale_t = uintptr /* __locale_t.h:42:32 */
   1422 
   1423 type Locale_t = X__locale_t /* locale_t.h:24:20 */
   1424 
   1425 // Endian macros for string.h functions
   1426 //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
   1427 //    This file is part of the GNU C Library.
   1428 //
   1429 //    The GNU C Library is free software; you can redistribute it and/or
   1430 //    modify it under the terms of the GNU Lesser General Public
   1431 //    License as published by the Free Software Foundation; either
   1432 //    version 2.1 of the License, or (at your option) any later version.
   1433 //
   1434 //    The GNU C Library is distributed in the hope that it will be useful,
   1435 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1436 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1437 //    Lesser General Public License for more details.
   1438 //
   1439 //    You should have received a copy of the GNU Lesser General Public
   1440 //    License along with the GNU C Library; if not, see
   1441 //    <http://www.gnu.org/licenses/>.
   1442 
   1443 // Declaration of common pthread types for all architectures.
   1444 //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
   1445 //    This file is part of the GNU C Library.
   1446 //
   1447 //    The GNU C Library is free software; you can redistribute it and/or
   1448 //    modify it under the terms of the GNU Lesser General Public
   1449 //    License as published by the Free Software Foundation; either
   1450 //    version 2.1 of the License, or (at your option) any later version.
   1451 //
   1452 //    The GNU C Library is distributed in the hope that it will be useful,
   1453 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1454 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1455 //    Lesser General Public License for more details.
   1456 //
   1457 //    You should have received a copy of the GNU Lesser General Public
   1458 //    License along with the GNU C Library; if not, see
   1459 //    <https://www.gnu.org/licenses/>.
   1460 
   1461 // For internal mutex and condition variable definitions.
   1462 // Common threading primitives definitions for both POSIX and C11.
   1463 //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
   1464 //    This file is part of the GNU C Library.
   1465 //
   1466 //    The GNU C Library is free software; you can redistribute it and/or
   1467 //    modify it under the terms of the GNU Lesser General Public
   1468 //    License as published by the Free Software Foundation; either
   1469 //    version 2.1 of the License, or (at your option) any later version.
   1470 //
   1471 //    The GNU C Library is distributed in the hope that it will be useful,
   1472 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1473 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1474 //    Lesser General Public License for more details.
   1475 //
   1476 //    You should have received a copy of the GNU Lesser General Public
   1477 //    License along with the GNU C Library; if not, see
   1478 //    <https://www.gnu.org/licenses/>.
   1479 
   1480 // Arch-specific definitions.  Each architecture must define the following
   1481 //    macros to define the expected sizes of pthread data types:
   1482 //
   1483 //    __SIZEOF_PTHREAD_ATTR_T        - size of pthread_attr_t.
   1484 //    __SIZEOF_PTHREAD_MUTEX_T       - size of pthread_mutex_t.
   1485 //    __SIZEOF_PTHREAD_MUTEXATTR_T   - size of pthread_mutexattr_t.
   1486 //    __SIZEOF_PTHREAD_COND_T        - size of pthread_cond_t.
   1487 //    __SIZEOF_PTHREAD_CONDATTR_T    - size of pthread_condattr_t.
   1488 //    __SIZEOF_PTHREAD_RWLOCK_T      - size of pthread_rwlock_t.
   1489 //    __SIZEOF_PTHREAD_RWLOCKATTR_T  - size of pthread_rwlockattr_t.
   1490 //    __SIZEOF_PTHREAD_BARRIER_T     - size of pthread_barrier_t.
   1491 //    __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
   1492 //
   1493 //    The additional macro defines any constraint for the lock alignment
   1494 //    inside the thread structures:
   1495 //
   1496 //    __LOCK_ALIGNMENT - for internal lock/futex usage.
   1497 //
   1498 //    Same idea but for the once locking primitive:
   1499 //
   1500 //    __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
   1501 
   1502 // Copyright (C) 2002-2020 Free Software Foundation, Inc.
   1503 //    This file is part of the GNU C Library.
   1504 //
   1505 //    The GNU C Library is free software; you can redistribute it and/or
   1506 //    modify it under the terms of the GNU Lesser General Public
   1507 //    License as published by the Free Software Foundation; either
   1508 //    version 2.1 of the License, or (at your option) any later version.
   1509 //
   1510 //    The GNU C Library is distributed in the hope that it will be useful,
   1511 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1512 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1513 //    Lesser General Public License for more details.
   1514 //
   1515 //    You should have received a copy of the GNU Lesser General Public
   1516 //    License along with the GNU C Library; if not, see
   1517 //    <https://www.gnu.org/licenses/>.
   1518 
   1519 // Determine the wordsize from the preprocessor defines.
   1520 
   1521 // Extra attributes for the cleanup functions.
   1522 
   1523 // Common definition of pthread_mutex_t.
   1524 
   1525 type X__pthread_internal_list = struct {
   1526 	F__prev uintptr
   1527 	F__next uintptr
   1528 } /* thread-shared-types.h:49:9 */
   1529 
   1530 // Endian macros for string.h functions
   1531 //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
   1532 //    This file is part of the GNU C Library.
   1533 //
   1534 //    The GNU C Library is free software; you can redistribute it and/or
   1535 //    modify it under the terms of the GNU Lesser General Public
   1536 //    License as published by the Free Software Foundation; either
   1537 //    version 2.1 of the License, or (at your option) any later version.
   1538 //
   1539 //    The GNU C Library is distributed in the hope that it will be useful,
   1540 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1541 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1542 //    Lesser General Public License for more details.
   1543 //
   1544 //    You should have received a copy of the GNU Lesser General Public
   1545 //    License along with the GNU C Library; if not, see
   1546 //    <http://www.gnu.org/licenses/>.
   1547 
   1548 // Declaration of common pthread types for all architectures.
   1549 //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
   1550 //    This file is part of the GNU C Library.
   1551 //
   1552 //    The GNU C Library is free software; you can redistribute it and/or
   1553 //    modify it under the terms of the GNU Lesser General Public
   1554 //    License as published by the Free Software Foundation; either
   1555 //    version 2.1 of the License, or (at your option) any later version.
   1556 //
   1557 //    The GNU C Library is distributed in the hope that it will be useful,
   1558 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1559 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1560 //    Lesser General Public License for more details.
   1561 //
   1562 //    You should have received a copy of the GNU Lesser General Public
   1563 //    License along with the GNU C Library; if not, see
   1564 //    <https://www.gnu.org/licenses/>.
   1565 
   1566 // For internal mutex and condition variable definitions.
   1567 // Common threading primitives definitions for both POSIX and C11.
   1568 //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
   1569 //    This file is part of the GNU C Library.
   1570 //
   1571 //    The GNU C Library is free software; you can redistribute it and/or
   1572 //    modify it under the terms of the GNU Lesser General Public
   1573 //    License as published by the Free Software Foundation; either
   1574 //    version 2.1 of the License, or (at your option) any later version.
   1575 //
   1576 //    The GNU C Library is distributed in the hope that it will be useful,
   1577 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1578 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1579 //    Lesser General Public License for more details.
   1580 //
   1581 //    You should have received a copy of the GNU Lesser General Public
   1582 //    License along with the GNU C Library; if not, see
   1583 //    <https://www.gnu.org/licenses/>.
   1584 
   1585 // Arch-specific definitions.  Each architecture must define the following
   1586 //    macros to define the expected sizes of pthread data types:
   1587 //
   1588 //    __SIZEOF_PTHREAD_ATTR_T        - size of pthread_attr_t.
   1589 //    __SIZEOF_PTHREAD_MUTEX_T       - size of pthread_mutex_t.
   1590 //    __SIZEOF_PTHREAD_MUTEXATTR_T   - size of pthread_mutexattr_t.
   1591 //    __SIZEOF_PTHREAD_COND_T        - size of pthread_cond_t.
   1592 //    __SIZEOF_PTHREAD_CONDATTR_T    - size of pthread_condattr_t.
   1593 //    __SIZEOF_PTHREAD_RWLOCK_T      - size of pthread_rwlock_t.
   1594 //    __SIZEOF_PTHREAD_RWLOCKATTR_T  - size of pthread_rwlockattr_t.
   1595 //    __SIZEOF_PTHREAD_BARRIER_T     - size of pthread_barrier_t.
   1596 //    __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
   1597 //
   1598 //    The additional macro defines any constraint for the lock alignment
   1599 //    inside the thread structures:
   1600 //
   1601 //    __LOCK_ALIGNMENT - for internal lock/futex usage.
   1602 //
   1603 //    Same idea but for the once locking primitive:
   1604 //
   1605 //    __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
   1606 
   1607 // Copyright (C) 2002-2020 Free Software Foundation, Inc.
   1608 //    This file is part of the GNU C Library.
   1609 //
   1610 //    The GNU C Library is free software; you can redistribute it and/or
   1611 //    modify it under the terms of the GNU Lesser General Public
   1612 //    License as published by the Free Software Foundation; either
   1613 //    version 2.1 of the License, or (at your option) any later version.
   1614 //
   1615 //    The GNU C Library is distributed in the hope that it will be useful,
   1616 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1617 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1618 //    Lesser General Public License for more details.
   1619 //
   1620 //    You should have received a copy of the GNU Lesser General Public
   1621 //    License along with the GNU C Library; if not, see
   1622 //    <https://www.gnu.org/licenses/>.
   1623 
   1624 // Determine the wordsize from the preprocessor defines.
   1625 
   1626 // Extra attributes for the cleanup functions.
   1627 
   1628 // Common definition of pthread_mutex_t.
   1629 
   1630 type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
   1631 
   1632 type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
   1633 
   1634 type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
   1635 
   1636 // Arch-specific mutex definitions.  A generic implementation is provided
   1637 //    by sysdeps/nptl/bits/struct_mutex.h.  If required, an architecture
   1638 //    can override it by defining:
   1639 //
   1640 //    1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
   1641 //       definition).  It should contains at least the internal members
   1642 //       defined in the generic version.
   1643 //
   1644 //    2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
   1645 //       atomic operations.
   1646 //
   1647 //    3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
   1648 //       It should initialize the mutex internal flag.
   1649 
   1650 // x86 internal mutex struct definitions.
   1651 //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
   1652 //    This file is part of the GNU C Library.
   1653 //
   1654 //    The GNU C Library is free software; you can redistribute it and/or
   1655 //    modify it under the terms of the GNU Lesser General Public
   1656 //    License as published by the Free Software Foundation; either
   1657 //    version 2.1 of the License, or (at your option) any later version.
   1658 //
   1659 //    The GNU C Library is distributed in the hope that it will be useful,
   1660 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1661 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1662 //    Lesser General Public License for more details.
   1663 //
   1664 //    You should have received a copy of the GNU Lesser General Public
   1665 //    License along with the GNU C Library; if not, see
   1666 //    <http://www.gnu.org/licenses/>.
   1667 
   1668 type X__pthread_mutex_s = struct {
   1669 	F__lock   int32
   1670 	F__count  uint32
   1671 	F__owner  int32
   1672 	F__kind   int32
   1673 	F__nusers uint32
   1674 	F__20     struct {
   1675 		F__ccgo_pad1    [0]uint32
   1676 		F__elision_data struct {
   1677 			F__espins   int16
   1678 			F__eelision int16
   1679 		}
   1680 	}
   1681 } /* struct_mutex.h:22:1 */
   1682 
   1683 // Arch-sepecific read-write lock definitions.  A generic implementation is
   1684 //    provided by struct_rwlock.h.  If required, an architecture can override it
   1685 //    by defining:
   1686 //
   1687 //    1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
   1688 //       It should contain at least the internal members defined in the
   1689 //       generic version.
   1690 //
   1691 //    2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
   1692 //       It should initialize the rwlock internal type.
   1693 
   1694 // x86 internal rwlock struct definitions.
   1695 //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
   1696 //
   1697 //    This file is part of the GNU C Library.
   1698 //
   1699 //    The GNU C Library is free software; you can redistribute it and/or
   1700 //    modify it under the terms of the GNU Lesser General Public
   1701 //    License as published by the Free Software Foundation; either
   1702 //    version 2.1 of the License, or (at your option) any later version.
   1703 //
   1704 //    The GNU C Library is distributed in the hope that it will be useful,
   1705 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1706 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1707 //    Lesser General Public License for more details.
   1708 //
   1709 //    You should have received a copy of the GNU Lesser General Public
   1710 //    License along with the GNU C Library; if not, see
   1711 //    <http://www.gnu.org/licenses/>.
   1712 
   1713 type X__pthread_rwlock_arch_t = struct {
   1714 	F__readers       uint32
   1715 	F__writers       uint32
   1716 	F__wrphase_futex uint32
   1717 	F__writers_futex uint32
   1718 	F__pad3          uint32
   1719 	F__pad4          uint32
   1720 	F__flags         uint8
   1721 	F__shared        uint8
   1722 	F__rwelision     int8
   1723 	F__pad2          uint8
   1724 	F__cur_writer    int32
   1725 } /* struct_rwlock.h:23:1 */
   1726 
   1727 // Common definition of pthread_cond_t.
   1728 
   1729 type X__pthread_cond_s = struct {
   1730 	F__0            struct{ F__wseq uint64 }
   1731 	F__8            struct{ F__g1_start uint64 }
   1732 	F__g_refs       [2]uint32
   1733 	F__g_size       [2]uint32
   1734 	F__g1_orig_size uint32
   1735 	F__wrefs        uint32
   1736 	F__g_signals    [2]uint32
   1737 } /* thread-shared-types.h:92:1 */
   1738 
   1739 // Thread identifiers.  The structure of the attribute type is not
   1740 //
   1741 //	exposed on purpose.
   1742 type Pthread_t = uint32 /* pthreadtypes.h:27:27 */
   1743 
   1744 // Data structures for mutex handling.  The structure of the attribute
   1745 //
   1746 //	type is not exposed on purpose.
   1747 type Pthread_mutexattr_t = struct {
   1748 	F__ccgo_pad1 [0]uint32
   1749 	F__size      [4]int8
   1750 } /* pthreadtypes.h:36:3 */
   1751 
   1752 // Data structure for condition variable handling.  The structure of
   1753 //
   1754 //	the attribute type is not exposed on purpose.
   1755 type Pthread_condattr_t = struct {
   1756 	F__ccgo_pad1 [0]uint32
   1757 	F__size      [4]int8
   1758 } /* pthreadtypes.h:45:3 */
   1759 
   1760 // Keys for thread-specific data
   1761 type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
   1762 
   1763 // Once-only execution
   1764 type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
   1765 
   1766 type Pthread_attr_t1 = struct {
   1767 	F__ccgo_pad1 [0]uint32
   1768 	F__size      [36]int8
   1769 } /* pthreadtypes.h:56:1 */
   1770 
   1771 type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
   1772 
   1773 type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
   1774 
   1775 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */
   1776 
   1777 // Data structure for reader-writer lock variable handling.  The
   1778 //
   1779 //	structure of the attribute type is deliberately not exposed.
   1780 type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
   1781 
   1782 type Pthread_rwlockattr_t = struct {
   1783 	F__ccgo_pad1 [0]uint32
   1784 	F__size      [8]int8
   1785 } /* pthreadtypes.h:97:3 */
   1786 
   1787 // POSIX spinlock data type.
   1788 type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
   1789 
   1790 // POSIX barriers data type.  The structure of the type is
   1791 //
   1792 //	deliberately not exposed.
   1793 type Pthread_barrier_t = struct {
   1794 	F__ccgo_pad1 [0]uint32
   1795 	F__size      [20]int8
   1796 } /* pthreadtypes.h:112:3 */
   1797 
   1798 type Pthread_barrierattr_t = struct {
   1799 	F__ccgo_pad1 [0]uint32
   1800 	F__size      [4]int8
   1801 } /* pthreadtypes.h:118:3 */
   1802 
   1803 // Copyright (C) 2001-2020 Free Software Foundation, Inc.
   1804 //    This file is part of the GNU C Library.
   1805 //
   1806 //    The GNU C Library is free software; you can redistribute it and/or
   1807 //    modify it under the terms of the GNU Lesser General Public
   1808 //    License as published by the Free Software Foundation; either
   1809 //    version 2.1 of the License, or (at your option) any later version.
   1810 //
   1811 //    The GNU C Library is distributed in the hope that it will be useful,
   1812 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1813 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1814 //    Lesser General Public License for more details.
   1815 //
   1816 //    You should have received a copy of the GNU Lesser General Public
   1817 //    License along with the GNU C Library; if not, see
   1818 //    <https://www.gnu.org/licenses/>.
   1819 
   1820 // Define the machine-dependent type `jmp_buf'.  x86-64 version.
   1821 
   1822 // Determine the wordsize from the preprocessor defines.
   1823 
   1824 type X__jmp_buf = [6]int32 /* setjmp.h:35:13 */
   1825 
   1826 // Conditional variable handling.
   1827 
   1828 // Cleanup buffers
   1829 type X_pthread_cleanup_buffer = struct {
   1830 	F__routine    uintptr
   1831 	F__arg        uintptr
   1832 	F__canceltype int32
   1833 	F__prev       uintptr
   1834 } /* pthread.h:155:1 */
   1835 
   1836 // Cancellation handling with integration into exception handling.
   1837 
   1838 type X__pthread_unwind_buf_t = struct {
   1839 	F__cancel_jmp_buf [1]struct {
   1840 		F__cancel_jmp_buf X__jmp_buf
   1841 		F__mask_was_saved int32
   1842 	}
   1843 	F__pad [4]uintptr
   1844 } /* pthread.h:507:3 */
   1845 
   1846 // No special attributes by default.
   1847 
   1848 // Structure to hold the cleanup handler information.
   1849 type X__pthread_cleanup_frame = struct {
   1850 	F__cancel_routine uintptr
   1851 	F__cancel_arg     uintptr
   1852 	F__do_it          int32
   1853 	F__cancel_type    int32
   1854 } /* pthread.h:516:1 */
   1855 
   1856 var _ int8 /* gen.c:2:13: */