github.com/afumu/libc@v0.0.6/signal/signal_linux_loong64.go (about)

     1  // Code generated by 'ccgo signal/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 signal/signal_linux_loong64.go -pkgname signal', DO NOT EDIT.
     2  
     3  package signal
     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  	BIG_ENDIAN                   = 4321
    19  	BYTE_ORDER                   = 1234
    20  	ELF_PRARGSZ                  = 80
    21  	ESR_MAGIC                    = 0x45535201
    22  	EXTRA_MAGIC                  = 0x45585401
    23  	FD_SETSIZE                   = 1024
    24  	FPSIMD_MAGIC                 = 0x46508001
    25  	LITTLE_ENDIAN                = 1234
    26  	MINSIGSTKSZ                  = 5120
    27  	NSIG                         = 65
    28  	PDP_ENDIAN                   = 3412
    29  	SA_INTERRUPT                 = 0x20000000
    30  	SA_NOCLDSTOP                 = 1
    31  	SA_NOCLDWAIT                 = 2
    32  	SA_NODEFER                   = 0x40000000
    33  	SA_NOMASK                    = 1073741824
    34  	SA_ONESHOT                   = 2147483648
    35  	SA_ONSTACK                   = 0x08000000
    36  	SA_RESETHAND                 = 0x80000000
    37  	SA_RESTART                   = 0x10000000
    38  	SA_SIGINFO                   = 4
    39  	SA_STACK                     = 134217728
    40  	SIGABRT                      = 6
    41  	SIGALRM                      = 14
    42  	SIGBUS                       = 7
    43  	SIGCHLD                      = 17
    44  	SIGCLD                       = 17
    45  	SIGCONT                      = 18
    46  	SIGFPE                       = 8
    47  	SIGHUP                       = 1
    48  	SIGILL                       = 4
    49  	SIGINT                       = 2
    50  	SIGIO                        = 29
    51  	SIGIOT                       = 6
    52  	SIGKILL                      = 9
    53  	SIGPIPE                      = 13
    54  	SIGPOLL                      = 29
    55  	SIGPROF                      = 27
    56  	SIGPWR                       = 30
    57  	SIGQUIT                      = 3
    58  	SIGSEGV                      = 11
    59  	SIGSTKFLT                    = 16
    60  	SIGSTKSZ                     = 16384
    61  	SIGSTOP                      = 19
    62  	SIGSYS                       = 31
    63  	SIGTERM                      = 15
    64  	SIGTRAP                      = 5
    65  	SIGTSTP                      = 20
    66  	SIGTTIN                      = 21
    67  	SIGTTOU                      = 22
    68  	SIGURG                       = 23
    69  	SIGUSR1                      = 10
    70  	SIGUSR2                      = 12
    71  	SIGVTALRM                    = 26
    72  	SIGWINCH                     = 28
    73  	SIGXCPU                      = 24
    74  	SIGXFSZ                      = 25
    75  	SIG_BLOCK                    = 0
    76  	SIG_SETMASK                  = 2
    77  	SIG_UNBLOCK                  = 1
    78  	SVE_MAGIC                    = 0x53564501
    79  	SVE_NUM_PREGS                = 16
    80  	SVE_NUM_ZREGS                = 32
    81  	SVE_VL_MAX                   = 8192
    82  	SVE_VL_MIN                   = 16
    83  	SVE_VQ_BYTES                 = 16
    84  	SVE_VQ_MAX                   = 512
    85  	SVE_VQ_MIN                   = 1
    86  	X_ASM_GENERIC_INT_LL64_H     = 0
    87  	X_ASM_GENERIC_TYPES_H        = 0
    88  	X_ATFILE_SOURCE              = 1
    89  	X_BITS_BYTESWAP_H            = 1
    90  	X_BITS_ENDIANNESS_H          = 1
    91  	X_BITS_ENDIAN_H              = 1
    92  	X_BITS_PTHREADTYPES_ARCH_H   = 1
    93  	X_BITS_PTHREADTYPES_COMMON_H = 1
    94  	X_BITS_SIGACTION_H           = 1
    95  	X_BITS_SIGCONTEXT_H          = 1
    96  	X_BITS_SIGEVENT_CONSTS_H     = 1
    97  	X_BITS_SIGINFO_ARCH_H        = 1
    98  	X_BITS_SIGINFO_CONSTS_H      = 1
    99  	X_BITS_SIGNUM_GENERIC_H      = 1
   100  	X_BITS_SIGNUM_H              = 1
   101  	X_BITS_SIGSTACK_H            = 1
   102  	X_BITS_SIGTHREAD_H           = 1
   103  	X_BITS_SS_FLAGS_H            = 1
   104  	X_BITS_STDINT_INTN_H         = 1
   105  	X_BITS_TIME64_H              = 1
   106  	X_BITS_TYPESIZES_H           = 1
   107  	X_BITS_TYPES_H               = 1
   108  	X_BITS_UINTN_IDENTITY_H      = 1
   109  	X_BSD_SIZE_T_                = 0
   110  	X_BSD_SIZE_T_DEFINED_        = 0
   111  	X_DEFAULT_SOURCE             = 1
   112  	X_ENDIAN_H                   = 1
   113  	X_FEATURES_H                 = 1
   114  	X_FILE_OFFSET_BITS           = 64
   115  	X_GCC_SIZE_T                 = 0
   116  	X_LINUX_POSIX_TYPES_H        = 0
   117  	X_LINUX_TYPES_H              = 0
   118  	X_LP64                       = 1
   119  	X_NSIG                       = 65
   120  	X_POSIX_C_SOURCE             = 200809
   121  	X_POSIX_SOURCE               = 1
   122  	X_RWLOCK_INTERNAL_H          = 0
   123  	X_SIGNAL_H                   = 0
   124  	X_SIZET_                     = 0
   125  	X_SIZE_T                     = 0
   126  	X_SIZE_T_                    = 0
   127  	X_SIZE_T_DECLARED            = 0
   128  	X_SIZE_T_DEFINED             = 0
   129  	X_SIZE_T_DEFINED_            = 0
   130  	X_STDC_PREDEF_H              = 1
   131  	X_STRUCT_TIMESPEC            = 1
   132  	X_SYS_CDEFS_H                = 1
   133  	X_SYS_PROCFS_H               = 1
   134  	X_SYS_SELECT_H               = 1
   135  	X_SYS_SIZE_T_H               = 0
   136  	X_SYS_TIME_H                 = 1
   137  	X_SYS_TYPES_H                = 1
   138  	X_SYS_UCONTEXT_H             = 1
   139  	X_SYS_USER_H                 = 1
   140  	X_THREAD_MUTEX_INTERNAL_H    = 1
   141  	X_THREAD_SHARED_TYPES_H      = 1
   142  	X_T_SIZE                     = 0
   143  	X_T_SIZE_                    = 0
   144  	Linux                        = 1
   145  	Unix                         = 1
   146  )
   147  
   148  // POSIX names to access some of the members.
   149  
   150  // sigevent constants.  Linux version.
   151  //    Copyright (C) 1997-2020 Free Software Foundation, Inc.
   152  //    This file is part of the GNU C Library.
   153  //
   154  //    The GNU C Library is free software; you can redistribute it and/or
   155  //    modify it under the terms of the GNU Lesser General Public
   156  //    License as published by the Free Software Foundation; either
   157  //    version 2.1 of the License, or (at your option) any later version.
   158  //
   159  //    The GNU C Library is distributed in the hope that it will be useful,
   160  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   161  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   162  //    Lesser General Public License for more details.
   163  //
   164  //    You should have received a copy of the GNU Lesser General Public
   165  //    License along with the GNU C Library; if not, see
   166  //    <https://www.gnu.org/licenses/>.
   167  
   168  // `sigev_notify' values.
   169  const ( /* sigevent-consts.h:27:1: */
   170  	SIGEV_SIGNAL = 0 // Notify via signal.
   171  	SIGEV_NONE   = 1 // Other notification: meaningless.
   172  	SIGEV_THREAD = 2 // Deliver via thread creation.
   173  
   174  	SIGEV_THREAD_ID = 4
   175  )
   176  
   177  // `si_code' values for SIGSEGV signal.
   178  const ( /* siginfo-consts.h:119:1: */
   179  	SEGV_MAPERR  = 1 // Address not mapped to object.
   180  	SEGV_ACCERR  = 2 // Invalid permissions for mapped object.
   181  	SEGV_BNDERR  = 3 // Bounds checking failure.
   182  	SEGV_PKUERR  = 4 // Protection key checking failure.
   183  	SEGV_ACCADI  = 5 // ADI not enabled for mapped object.
   184  	SEGV_ADIDERR = 6 // Disrupting MCD error.
   185  	SEGV_ADIPERR = 7
   186  )
   187  
   188  // `si_code' values for SIGBUS signal.
   189  const ( /* siginfo-consts.h:138:1: */
   190  	BUS_ADRALN    = 1 // Invalid address alignment.
   191  	BUS_ADRERR    = 2 // Non-existant physical address.
   192  	BUS_OBJERR    = 3 // Object specific hardware error.
   193  	BUS_MCEERR_AR = 4 // Hardware memory error: action required.
   194  	BUS_MCEERR_AO = 5
   195  )
   196  
   197  // `si_code' values for SIGCHLD signal.
   198  const ( /* siginfo-consts.h:172:1: */
   199  	CLD_EXITED    = 1 // Child has exited.
   200  	CLD_KILLED    = 2 // Child was killed.
   201  	CLD_DUMPED    = 3 // Child terminated abnormally.
   202  	CLD_TRAPPED   = 4 // Traced child has trapped.
   203  	CLD_STOPPED   = 5 // Child has stopped.
   204  	CLD_CONTINUED = 6
   205  )
   206  
   207  // `si_code' values for SIGPOLL signal.
   208  const ( /* siginfo-consts.h:189:1: */
   209  	POLL_IN  = 1 // Data input available.
   210  	POLL_OUT = 2 // Output buffers available.
   211  	POLL_MSG = 3 // Input message available.
   212  	POLL_ERR = 4 // I/O error.
   213  	POLL_PRI = 5 // High priority input available.
   214  	POLL_HUP = 6
   215  )
   216  
   217  // X/Open requires some more fields with fixed names.
   218  
   219  // siginfo constants.  Linux version.
   220  //    Copyright (C) 1997-2020 Free Software Foundation, Inc.
   221  //    This file is part of the GNU C Library.
   222  //
   223  //    The GNU C Library is free software; you can redistribute it and/or
   224  //    modify it under the terms of the GNU Lesser General Public
   225  //    License as published by the Free Software Foundation; either
   226  //    version 2.1 of the License, or (at your option) any later version.
   227  //
   228  //    The GNU C Library is distributed in the hope that it will be useful,
   229  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   230  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   231  //    Lesser General Public License for more details.
   232  //
   233  //    You should have received a copy of the GNU Lesser General Public
   234  //    License along with the GNU C Library; if not, see
   235  //    <https://www.gnu.org/licenses/>.
   236  
   237  // Most of these constants are uniform across all architectures, but there
   238  //    is one exception.
   239  // Architecture-specific adjustments to siginfo_t.
   240  
   241  // Values for `si_code'.  Positive values are reserved for kernel-generated
   242  //
   243  //	signals.
   244  const ( /* siginfo-consts.h:35:1: */
   245  	SI_ASYNCNL  = -60 // Sent by asynch name lookup completion.
   246  	SI_DETHREAD = -7  // Sent by execve killing subsidiary
   247  	// 				   threads.
   248  	SI_TKILL   = -6 // Sent by tkill.
   249  	SI_SIGIO   = -5 // Sent by queued SIGIO.
   250  	SI_ASYNCIO = -4 // Sent by AIO completion.
   251  	SI_MESGQ   = -3 // Sent by real time mesq state change.
   252  	SI_TIMER   = -2 // Sent by timer expiration.
   253  	SI_QUEUE   = -1 // Sent by sigqueue.
   254  	SI_USER    = 0  // Sent by kill, sigsend.
   255  	SI_KERNEL  = 128
   256  )
   257  
   258  // `si_code' values for SIGILL signal.
   259  const ( /* siginfo-consts.h:71:1: */
   260  	ILL_ILLOPC   = 1 // Illegal opcode.
   261  	ILL_ILLOPN   = 2 // Illegal operand.
   262  	ILL_ILLADR   = 3 // Illegal addressing mode.
   263  	ILL_ILLTRP   = 4 // Illegal trap.
   264  	ILL_PRVOPC   = 5 // Privileged opcode.
   265  	ILL_PRVREG   = 6 // Privileged register.
   266  	ILL_COPROC   = 7 // Coprocessor error.
   267  	ILL_BADSTK   = 8 // Internal stack error.
   268  	ILL_BADIADDR = 9
   269  )
   270  
   271  // `si_code' values for SIGFPE signal.
   272  const ( /* siginfo-consts.h:94:1: */
   273  	FPE_INTDIV   = 1  // Integer divide by zero.
   274  	FPE_INTOVF   = 2  // Integer overflow.
   275  	FPE_FLTDIV   = 3  // Floating point divide by zero.
   276  	FPE_FLTOVF   = 4  // Floating point overflow.
   277  	FPE_FLTUND   = 5  // Floating point underflow.
   278  	FPE_FLTRES   = 6  // Floating point inexact result.
   279  	FPE_FLTINV   = 7  // Floating point invalid operation.
   280  	FPE_FLTSUB   = 8  // Subscript out of range.
   281  	FPE_FLTUNK   = 14 // Undiagnosed floating-point exception.
   282  	FPE_CONDTRAP = 15
   283  )
   284  
   285  // sigstack, sigaltstack definitions.
   286  //    Copyright (C) 2015-2020 Free Software Foundation, Inc.
   287  //    This file is part of the GNU C Library.
   288  //
   289  //    The GNU C Library is free software; you can redistribute it and/or
   290  //    modify it under the terms of the GNU Lesser General Public
   291  //    License as published by the Free Software Foundation; either
   292  //    version 2.1 of the License, or (at your option) any later version.
   293  //
   294  //    The GNU C Library is distributed in the hope that it will be useful,
   295  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   296  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   297  //    Lesser General Public License for more details.
   298  //
   299  //    You should have received a copy of the GNU Lesser General Public
   300  //    License along with the GNU C Library; if not, see
   301  //    <https://www.gnu.org/licenses/>.
   302  
   303  // Minimum stack size for a signal handler.
   304  
   305  // System default stack size.
   306  
   307  // ss_flags values for stack_t.  Linux version.
   308  //    Copyright (C) 1998-2020 Free Software Foundation, Inc.
   309  //    This file is part of the GNU C Library.
   310  //
   311  //    The GNU C Library is free software; you can redistribute it and/or
   312  //    modify it under the terms of the GNU Lesser General Public
   313  //    License as published by the Free Software Foundation; either
   314  //    version 2.1 of the License, or (at your option) any later version.
   315  //
   316  //    The GNU C Library is distributed in the hope that it will be useful,
   317  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   318  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   319  //    Lesser General Public License for more details.
   320  //
   321  //    You should have received a copy of the GNU Lesser General Public
   322  //    License along with the GNU C Library; if not, see
   323  //    <https://www.gnu.org/licenses/>.
   324  
   325  // Possible values for `ss_flags'.
   326  const ( /* ss_flags.h:27:1: */
   327  	SS_ONSTACK = 1
   328  	SS_DISABLE = 2
   329  )
   330  
   331  // Values for the first argument to `getitimer' and `setitimer'.
   332  const ( /* time.h:89:1: */
   333  	// Timers run in real time.
   334  	ITIMER_REAL = 0
   335  	// Timers run only when the process is executing.
   336  	ITIMER_VIRTUAL = 1
   337  	// Timers run when the process is executing and when
   338  	//        the system is executing on behalf of the process.
   339  	ITIMER_PROF = 2
   340  )
   341  
   342  type Ptrdiff_t = int64 /* <builtin>:3:26 */
   343  
   344  type Size_t = uint64 /* <builtin>:9:23 */
   345  
   346  type Wchar_t = uint32 /* <builtin>:15:24 */
   347  
   348  type X__int128_t = struct {
   349  	Flo int64
   350  	Fhi int64
   351  } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
   352  type X__uint128_t = struct {
   353  	Flo uint64
   354  	Fhi uint64
   355  } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
   356  
   357  type X__builtin_va_list = uintptr /* <builtin>:46:14 */
   358  type X__float128 = float64        /* <builtin>:47:21 */
   359  
   360  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   361  //    This file is part of the GNU C Library.
   362  //
   363  //    The GNU C Library is free software; you can redistribute it and/or
   364  //    modify it under the terms of the GNU Lesser General Public
   365  //    License as published by the Free Software Foundation; either
   366  //    version 2.1 of the License, or (at your option) any later version.
   367  //
   368  //    The GNU C Library is distributed in the hope that it will be useful,
   369  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   370  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   371  //    Lesser General Public License for more details.
   372  //
   373  //    You should have received a copy of the GNU Lesser General Public
   374  //    License along with the GNU C Library; if not, see
   375  //    <https://www.gnu.org/licenses/>.
   376  
   377  //	ISO C99 Standard: 7.14 Signal handling <signal.h>
   378  
   379  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   380  //    This file is part of the GNU C Library.
   381  //
   382  //    The GNU C Library is free software; you can redistribute it and/or
   383  //    modify it under the terms of the GNU Lesser General Public
   384  //    License as published by the Free Software Foundation; either
   385  //    version 2.1 of the License, or (at your option) any later version.
   386  //
   387  //    The GNU C Library is distributed in the hope that it will be useful,
   388  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   389  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   390  //    Lesser General Public License for more details.
   391  //
   392  //    You should have received a copy of the GNU Lesser General Public
   393  //    License along with the GNU C Library; if not, see
   394  //    <https://www.gnu.org/licenses/>.
   395  
   396  // These are defined by the user (or the compiler)
   397  //    to specify the desired environment:
   398  //
   399  //    __STRICT_ANSI__	ISO Standard C.
   400  //    _ISOC99_SOURCE	Extensions to ISO C89 from ISO C99.
   401  //    _ISOC11_SOURCE	Extensions to ISO C99 from ISO C11.
   402  //    _ISOC2X_SOURCE	Extensions to ISO C99 from ISO C2X.
   403  //    __STDC_WANT_LIB_EXT2__
   404  // 			Extensions to ISO C99 from TR 27431-2:2010.
   405  //    __STDC_WANT_IEC_60559_BFP_EXT__
   406  // 			Extensions to ISO C11 from TS 18661-1:2014.
   407  //    __STDC_WANT_IEC_60559_FUNCS_EXT__
   408  // 			Extensions to ISO C11 from TS 18661-4:2015.
   409  //    __STDC_WANT_IEC_60559_TYPES_EXT__
   410  // 			Extensions to ISO C11 from TS 18661-3:2015.
   411  //
   412  //    _POSIX_SOURCE	IEEE Std 1003.1.
   413  //    _POSIX_C_SOURCE	If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
   414  // 			if >=199309L, add IEEE Std 1003.1b-1993;
   415  // 			if >=199506L, add IEEE Std 1003.1c-1995;
   416  // 			if >=200112L, all of IEEE 1003.1-2004
   417  // 			if >=200809L, all of IEEE 1003.1-2008
   418  //    _XOPEN_SOURCE	Includes POSIX and XPG things.  Set to 500 if
   419  // 			Single Unix conformance is wanted, to 600 for the
   420  // 			sixth revision, to 700 for the seventh revision.
   421  //    _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
   422  //    _LARGEFILE_SOURCE	Some more functions for correct standard I/O.
   423  //    _LARGEFILE64_SOURCE	Additional functionality from LFS for large files.
   424  //    _FILE_OFFSET_BITS=N	Select default filesystem interface.
   425  //    _ATFILE_SOURCE	Additional *at interfaces.
   426  //    _GNU_SOURCE		All of the above, plus GNU extensions.
   427  //    _DEFAULT_SOURCE	The default set of features (taking precedence over
   428  // 			__STRICT_ANSI__).
   429  //
   430  //    _FORTIFY_SOURCE	Add security hardening to many library functions.
   431  // 			Set to 1 or 2; 2 performs stricter checks than 1.
   432  //
   433  //    _REENTRANT, _THREAD_SAFE
   434  // 			Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
   435  //
   436  //    The `-ansi' switch to the GNU C compiler, and standards conformance
   437  //    options such as `-std=c99', define __STRICT_ANSI__.  If none of
   438  //    these are defined, or if _DEFAULT_SOURCE is defined, the default is
   439  //    to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
   440  //    200809L, as well as enabling miscellaneous functions from BSD and
   441  //    SVID.  If more than one of these are defined, they accumulate.  For
   442  //    example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
   443  //    give you ISO C, 1003.1, and 1003.2, but nothing else.
   444  //
   445  //    These are defined by this file and are used by the
   446  //    header files to decide what to declare or define:
   447  //
   448  //    __GLIBC_USE (F)	Define things from feature set F.  This is defined
   449  // 			to 1 or 0; the subsequent macros are either defined
   450  // 			or undefined, and those tests should be moved to
   451  // 			__GLIBC_USE.
   452  //    __USE_ISOC11		Define ISO C11 things.
   453  //    __USE_ISOC99		Define ISO C99 things.
   454  //    __USE_ISOC95		Define ISO C90 AMD1 (C95) things.
   455  //    __USE_ISOCXX11	Define ISO C++11 things.
   456  //    __USE_POSIX		Define IEEE Std 1003.1 things.
   457  //    __USE_POSIX2		Define IEEE Std 1003.2 things.
   458  //    __USE_POSIX199309	Define IEEE Std 1003.1, and .1b things.
   459  //    __USE_POSIX199506	Define IEEE Std 1003.1, .1b, .1c and .1i things.
   460  //    __USE_XOPEN		Define XPG things.
   461  //    __USE_XOPEN_EXTENDED	Define X/Open Unix things.
   462  //    __USE_UNIX98		Define Single Unix V2 things.
   463  //    __USE_XOPEN2K        Define XPG6 things.
   464  //    __USE_XOPEN2KXSI     Define XPG6 XSI things.
   465  //    __USE_XOPEN2K8       Define XPG7 things.
   466  //    __USE_XOPEN2K8XSI    Define XPG7 XSI things.
   467  //    __USE_LARGEFILE	Define correct standard I/O things.
   468  //    __USE_LARGEFILE64	Define LFS things with separate names.
   469  //    __USE_FILE_OFFSET64	Define 64bit interface as default.
   470  //    __USE_MISC		Define things from 4.3BSD or System V Unix.
   471  //    __USE_ATFILE		Define *at interfaces and AT_* constants for them.
   472  //    __USE_GNU		Define GNU extensions.
   473  //    __USE_FORTIFY_LEVEL	Additional security measures used, according to level.
   474  //
   475  //    The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
   476  //    defined by this file unconditionally.  `__GNU_LIBRARY__' is provided
   477  //    only for compatibility.  All new code should use the other symbols
   478  //    to test for features.
   479  //
   480  //    All macros listed above as possibly being defined by this file are
   481  //    explicitly undefined if they are not explicitly defined.
   482  //    Feature-test macros that are not defined by the user or compiler
   483  //    but are implied by the other feature-test macros defined (or by the
   484  //    lack of any definitions) are defined by the file.
   485  //
   486  //    ISO C feature test macros depend on the definition of the macro
   487  //    when an affected header is included, not when the first system
   488  //    header is included, and so they are handled in
   489  //    <bits/libc-header-start.h>, which does not have a multiple include
   490  //    guard.  Feature test macros that can be handled from the first
   491  //    system header included are handled here.
   492  
   493  // Undefine everything, so we get a clean slate.
   494  
   495  // Suppress kernel-name space pollution unless user expressedly asks
   496  //    for it.
   497  
   498  // Convenience macro to test the version of gcc.
   499  //    Use like this:
   500  //    #if __GNUC_PREREQ (2,8)
   501  //    ... code requiring gcc 2.8 or later ...
   502  //    #endif
   503  //    Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
   504  //    added in 2.0.
   505  
   506  // Similarly for clang.  Features added to GCC after version 4.2 may
   507  //    or may not also be available in clang, and clang's definitions of
   508  //    __GNUC(_MINOR)__ are fixed at 4 and 2 respectively.  Not all such
   509  //    features can be queried via __has_extension/__has_feature.
   510  
   511  // Whether to use feature set F.
   512  
   513  // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
   514  //    _DEFAULT_SOURCE.  If _DEFAULT_SOURCE is present we do not
   515  //    issue a warning; the expectation is that the source is being
   516  //    transitioned to use the new macro.
   517  
   518  // If _GNU_SOURCE was defined by the user, turn on all the other features.
   519  
   520  // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
   521  //    define _DEFAULT_SOURCE.
   522  
   523  // This is to enable the ISO C2X extension.
   524  
   525  // This is to enable the ISO C11 extension.
   526  
   527  // This is to enable the ISO C99 extension.
   528  
   529  // This is to enable the ISO C90 Amendment 1:1995 extension.
   530  
   531  // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
   532  //    is defined, use POSIX.1-2008 (or another version depending on
   533  //    _XOPEN_SOURCE).
   534  
   535  // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
   536  //    defined in all multithreaded code.  GNU libc has not required this
   537  //    for many years.  We now treat them as compatibility synonyms for
   538  //    _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
   539  //    comprehensive support for multithreaded code.  Using them never
   540  //    lowers the selected level of POSIX conformance, only raises it.
   541  
   542  // The function 'gets' existed in C89, but is impossible to use
   543  //    safely.  It has been removed from ISO C11 and ISO C++14.  Note: for
   544  //    compatibility with various implementations of <cstdio>, this test
   545  //    must consider only the value of __cplusplus when compiling C++.
   546  
   547  // GNU formerly extended the scanf functions with modified format
   548  //    specifiers %as, %aS, and %a[...] that allocate a buffer for the
   549  //    input using malloc.  This extension conflicts with ISO C99, which
   550  //    defines %a as a standalone format specifier that reads a floating-
   551  //    point number; moreover, POSIX.1-2008 provides the same feature
   552  //    using the modifier letter 'm' instead (%ms, %mS, %m[...]).
   553  //
   554  //    We now follow C99 unless GNU extensions are active and the compiler
   555  //    is specifically in C89 or C++98 mode (strict or not).  For
   556  //    instance, with GCC, -std=gnu11 will have C99-compliant scanf with
   557  //    or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
   558  //    old extension.
   559  
   560  // Get definitions of __STDC_* predefined macros, if the compiler has
   561  //    not preincluded this header automatically.
   562  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   563  //    This file is part of the GNU C Library.
   564  //
   565  //    The GNU C Library is free software; you can redistribute it and/or
   566  //    modify it under the terms of the GNU Lesser General Public
   567  //    License as published by the Free Software Foundation; either
   568  //    version 2.1 of the License, or (at your option) any later version.
   569  //
   570  //    The GNU C Library is distributed in the hope that it will be useful,
   571  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   572  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   573  //    Lesser General Public License for more details.
   574  //
   575  //    You should have received a copy of the GNU Lesser General Public
   576  //    License along with the GNU C Library; if not, see
   577  //    <https://www.gnu.org/licenses/>.
   578  
   579  // This macro indicates that the installed library is the GNU C Library.
   580  //    For historic reasons the value now is 6 and this will stay from now
   581  //    on.  The use of this variable is deprecated.  Use __GLIBC__ and
   582  //    __GLIBC_MINOR__ now (see below) when you want to test for a specific
   583  //    GNU C library version and use the values in <gnu/lib-names.h> to get
   584  //    the sonames of the shared libraries.
   585  
   586  // Major and minor version number of the GNU C library package.  Use
   587  //    these macros to test for features in specific releases.
   588  
   589  // This is here only because every header file already includes this one.
   590  // Copyright (C) 1992-2020 Free Software Foundation, Inc.
   591  //    This file is part of the GNU C Library.
   592  //
   593  //    The GNU C Library is free software; you can redistribute it and/or
   594  //    modify it under the terms of the GNU Lesser General Public
   595  //    License as published by the Free Software Foundation; either
   596  //    version 2.1 of the License, or (at your option) any later version.
   597  //
   598  //    The GNU C Library is distributed in the hope that it will be useful,
   599  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   600  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   601  //    Lesser General Public License for more details.
   602  //
   603  //    You should have received a copy of the GNU Lesser General Public
   604  //    License along with the GNU C Library; if not, see
   605  //    <https://www.gnu.org/licenses/>.
   606  
   607  // We are almost always included from features.h.
   608  
   609  // The GNU libc does not support any K&R compilers or the traditional mode
   610  //    of ISO C compilers anymore.  Check for some of the combinations not
   611  //    anymore supported.
   612  
   613  // Some user header file might have defined this before.
   614  
   615  // All functions, except those with callbacks or those that
   616  //    synchronize memory, are leaf functions.
   617  
   618  // GCC can always grok prototypes.  For C++ programs we add throw()
   619  //    to help it optimize the function calls.  But this works only with
   620  //    gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
   621  //    as non-throwing using a function attribute since programs can use
   622  //    the -fexceptions options for C code as well.
   623  
   624  // Compilers that are not clang may object to
   625  //        #if defined __clang__ && __has_extension(...)
   626  //    even though they do not need to evaluate the right-hand side of the &&.
   627  
   628  // These two macros are not used in glibc anymore.  They are kept here
   629  //    only because some other projects expect the macros to be defined.
   630  
   631  // For these things, GCC behaves the ANSI way normally,
   632  //    and the non-ANSI way under -traditional.
   633  
   634  // This is not a typedef so `const __ptr_t' does the right thing.
   635  
   636  // C++ needs to know that types and declarations are C, not C++.
   637  
   638  // Fortify support.
   639  
   640  // Support for flexible arrays.
   641  //    Headers that should use flexible arrays only if they're "real"
   642  //    (e.g. only if they won't affect sizeof()) should test
   643  //    #if __glibc_c99_flexarr_available.
   644  
   645  // __asm__ ("xyz") is used throughout the headers to rename functions
   646  //    at the assembly language level.  This is wrapped by the __REDIRECT
   647  //    macro, in order to support compilers that can do this some other
   648  //    way.  When compilers don't support asm-names at all, we have to do
   649  //    preprocessor tricks instead (which don't have exactly the right
   650  //    semantics, but it's the best we can do).
   651  //
   652  //    Example:
   653  //    int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
   654  
   655  //
   656  // #elif __SOME_OTHER_COMPILER__
   657  //
   658  // # define __REDIRECT(name, proto, alias) name proto; 	_Pragma("let " #name " = " #alias)
   659  
   660  // GCC has various useful declarations that can be made with the
   661  //    `__attribute__' syntax.  All of the ways we use this do fine if
   662  //    they are omitted for compilers that don't understand it.
   663  
   664  // At some point during the gcc 2.96 development the `malloc' attribute
   665  //    for functions was introduced.  We don't want to use it unconditionally
   666  //    (although this would be possible) since it generates warnings.
   667  
   668  // Tell the compiler which arguments to an allocation function
   669  //    indicate the size of the allocation.
   670  
   671  // At some point during the gcc 2.96 development the `pure' attribute
   672  //    for functions was introduced.  We don't want to use it unconditionally
   673  //    (although this would be possible) since it generates warnings.
   674  
   675  // This declaration tells the compiler that the value is constant.
   676  
   677  // At some point during the gcc 3.1 development the `used' attribute
   678  //    for functions was introduced.  We don't want to use it unconditionally
   679  //    (although this would be possible) since it generates warnings.
   680  
   681  // Since version 3.2, gcc allows marking deprecated functions.
   682  
   683  // Since version 4.5, gcc also allows one to specify the message printed
   684  //    when a deprecated function is used.  clang claims to be gcc 4.2, but
   685  //    may also support this feature.
   686  
   687  // At some point during the gcc 2.8 development the `format_arg' attribute
   688  //    for functions was introduced.  We don't want to use it unconditionally
   689  //    (although this would be possible) since it generates warnings.
   690  //    If several `format_arg' attributes are given for the same function, in
   691  //    gcc-3.0 and older, all but the last one are ignored.  In newer gccs,
   692  //    all designated arguments are considered.
   693  
   694  // At some point during the gcc 2.97 development the `strfmon' format
   695  //    attribute for functions was introduced.  We don't want to use it
   696  //    unconditionally (although this would be possible) since it
   697  //    generates warnings.
   698  
   699  // The nonull function attribute allows to mark pointer parameters which
   700  //    must not be NULL.
   701  
   702  // If fortification mode, we warn about unused results of certain
   703  //    function calls which can lead to problems.
   704  
   705  // Forces a function to be always inlined.
   706  // The Linux kernel defines __always_inline in stddef.h (283d7573), and
   707  //    it conflicts with this definition.  Therefore undefine it first to
   708  //    allow either header to be included first.
   709  
   710  // Associate error messages with the source location of the call site rather
   711  //    than with the source location inside the function.
   712  
   713  // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
   714  //    inline semantics, unless -fgnu89-inline is used.  Using __GNUC_STDC_INLINE__
   715  //    or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
   716  //    older than 4.3 may define these macros and still not guarantee GNU inlining
   717  //    semantics.
   718  //
   719  //    clang++ identifies itself as gcc-4.2, but has support for GNU inlining
   720  //    semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
   721  //    __GNUC_GNU_INLINE__ macro definitions.
   722  
   723  // GCC 4.3 and above allow passing all anonymous arguments of an
   724  //    __extern_always_inline function to some other vararg function.
   725  
   726  // It is possible to compile containing GCC extensions even if GCC is
   727  //    run in pedantic mode if the uses are carefully marked using the
   728  //    `__extension__' keyword.  But this is not generally available before
   729  //    version 2.8.
   730  
   731  // __restrict is known in EGCS 1.2 and above.
   732  
   733  // ISO C99 also allows to declare arrays as non-overlapping.  The syntax is
   734  //      array_name[restrict]
   735  //    GCC 3.1 supports this.
   736  
   737  // Describes a char array whose address can safely be passed as the first
   738  //    argument to strncpy and strncat, as the char array is not necessarily
   739  //    a NUL-terminated string.
   740  
   741  // Undefine (also defined in libc-symbols.h).
   742  // Copies attributes from the declaration or type referenced by
   743  //    the argument.
   744  
   745  // Determine the wordsize from the preprocessor defines.
   746  //
   747  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
   748  //    This file is part of the GNU C Library.
   749  //
   750  //    The GNU C Library is free software; you can redistribute it and/or
   751  //    modify it under the terms of the GNU Lesser General Public
   752  //    License as published by the Free Software Foundation; either
   753  //    version 2.1 of the License, or (at your option) any later version.
   754  //
   755  //    The GNU C Library is distributed in the hope that it will be useful,
   756  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   757  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   758  //    Lesser General Public License for more details.
   759  //
   760  //    You should have received a copy of the GNU Lesser General Public
   761  //    License along with the GNU C Library; if not, see
   762  //    <https://www.gnu.org/licenses/>.
   763  
   764  // Properties of long double type.  ldbl-128 version.
   765  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
   766  //    This file is part of the GNU C Library.
   767  //
   768  //    The GNU C Library is free software; you can redistribute it and/or
   769  //    modify it under the terms of the GNU Lesser General Public
   770  //    License  published by the Free Software Foundation; either
   771  //    version 2.1 of the License, or (at your option) any later version.
   772  //
   773  //    The GNU C Library is distributed in the hope that it will be useful,
   774  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   775  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   776  //    Lesser General Public License for more details.
   777  //
   778  //    You should have received a copy of the GNU Lesser General Public
   779  //    License along with the GNU C Library; if not, see
   780  //    <https://www.gnu.org/licenses/>.
   781  
   782  // long double is distinct from double, so there is nothing to
   783  //    define here.
   784  
   785  // __glibc_macro_warning (MESSAGE) issues warning MESSAGE.  This is
   786  //    intended for use in preprocessor macros.
   787  //
   788  //    Note: MESSAGE must be a _single_ string; concatenation of string
   789  //    literals is not supported.
   790  
   791  // Generic selection (ISO C11) is a C-only feature, available in GCC
   792  //    since version 4.9.  Previous versions do not provide generic
   793  //    selection, even though they might set __STDC_VERSION__ to 201112L,
   794  //    when in -std=c11 mode.  Thus, we must check for !defined __GNUC__
   795  //    when testing __STDC_VERSION__ for generic selection support.
   796  //    On the other hand, Clang also defines __GNUC__, so a clang-specific
   797  //    check is required to enable the use of generic selection.
   798  
   799  // If we don't have __REDIRECT, prototypes will be missing if
   800  //    __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
   801  
   802  // Decide whether we can define 'extern inline' functions in headers.
   803  
   804  // This is here only because every header file already includes this one.
   805  //    Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
   806  //    <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
   807  //    that will always return failure (and set errno to ENOSYS).
   808  // This file is automatically generated.
   809  //    This file selects the right generated file of `__stub_FUNCTION' macros
   810  //    based on the architecture being compiled for.
   811  
   812  // Determine the wordsize from the preprocessor defines.
   813  //
   814  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
   815  //    This file is part of the GNU C Library.
   816  //
   817  //    The GNU C Library is free software; you can redistribute it and/or
   818  //    modify it under the terms of the GNU Lesser General Public
   819  //    License as published by the Free Software Foundation; either
   820  //    version 2.1 of the License, or (at your option) any later version.
   821  //
   822  //    The GNU C Library is distributed in the hope that it will be useful,
   823  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   824  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   825  //    Lesser General Public License for more details.
   826  //
   827  //    You should have received a copy of the GNU Lesser General Public
   828  //    License along with the GNU C Library; if not, see
   829  //    <https://www.gnu.org/licenses/>.
   830  
   831  // This file is automatically generated.
   832  //    It defines a symbol `__stub_FUNCTION' for each function
   833  //    in the C library which is a stub, meaning it will fail
   834  //    every time called, usually setting errno to ENOSYS.
   835  
   836  // bits/types.h -- definitions of __*_t types underlying *_t types.
   837  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   838  //    This file is part of the GNU C Library.
   839  //
   840  //    The GNU C Library is free software; you can redistribute it and/or
   841  //    modify it under the terms of the GNU Lesser General Public
   842  //    License as published by the Free Software Foundation; either
   843  //    version 2.1 of the License, or (at your option) any later version.
   844  //
   845  //    The GNU C Library is distributed in the hope that it will be useful,
   846  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   847  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   848  //    Lesser General Public License for more details.
   849  //
   850  //    You should have received a copy of the GNU Lesser General Public
   851  //    License along with the GNU C Library; if not, see
   852  //    <https://www.gnu.org/licenses/>.
   853  
   854  // Never include this file directly; use <sys/types.h> instead.
   855  
   856  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   857  //    This file is part of the GNU C Library.
   858  //
   859  //    The GNU C Library is free software; you can redistribute it and/or
   860  //    modify it under the terms of the GNU Lesser General Public
   861  //    License as published by the Free Software Foundation; either
   862  //    version 2.1 of the License, or (at your option) any later version.
   863  //
   864  //    The GNU C Library is distributed in the hope that it will be useful,
   865  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   866  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   867  //    Lesser General Public License for more details.
   868  //
   869  //    You should have received a copy of the GNU Lesser General Public
   870  //    License along with the GNU C Library; if not, see
   871  //    <https://www.gnu.org/licenses/>.
   872  
   873  // Determine the wordsize from the preprocessor defines.
   874  //
   875  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
   876  //    This file is part of the GNU C Library.
   877  //
   878  //    The GNU C Library is free software; you can redistribute it and/or
   879  //    modify it under the terms of the GNU Lesser General Public
   880  //    License as published by the Free Software Foundation; either
   881  //    version 2.1 of the License, or (at your option) any later version.
   882  //
   883  //    The GNU C Library is distributed in the hope that it will be useful,
   884  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   885  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   886  //    Lesser General Public License for more details.
   887  //
   888  //    You should have received a copy of the GNU Lesser General Public
   889  //    License along with the GNU C Library; if not, see
   890  //    <https://www.gnu.org/licenses/>.
   891  
   892  // Bit size of the time_t type at glibc build time, general case.
   893  //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
   894  //    This file is part of the GNU C Library.
   895  //
   896  //    The GNU C Library is free software; you can redistribute it and/or
   897  //    modify it under the terms of the GNU Lesser General Public
   898  //    License as published by the Free Software Foundation; either
   899  //    version 2.1 of the License, or (at your option) any later version.
   900  //
   901  //    The GNU C Library is distributed in the hope that it will be useful,
   902  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   903  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   904  //    Lesser General Public License for more details.
   905  //
   906  //    You should have received a copy of the GNU Lesser General Public
   907  //    License along with the GNU C Library; if not, see
   908  //    <https://www.gnu.org/licenses/>.
   909  
   910  // Determine the wordsize from the preprocessor defines.
   911  //
   912  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
   913  //    This file is part of the GNU C Library.
   914  //
   915  //    The GNU C Library is free software; you can redistribute it and/or
   916  //    modify it under the terms of the GNU Lesser General Public
   917  //    License as published by the Free Software Foundation; either
   918  //    version 2.1 of the License, or (at your option) any later version.
   919  //
   920  //    The GNU C Library is distributed in the hope that it will be useful,
   921  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   922  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   923  //    Lesser General Public License for more details.
   924  //
   925  //    You should have received a copy of the GNU Lesser General Public
   926  //    License along with the GNU C Library; if not, see
   927  //    <https://www.gnu.org/licenses/>.
   928  
   929  // Size in bits of the 'time_t' type of the default ABI.
   930  
   931  // Convenience types.
   932  type X__u_char = uint8   /* types.h:31:23 */
   933  type X__u_short = uint16 /* types.h:32:28 */
   934  type X__u_int = uint32   /* types.h:33:22 */
   935  type X__u_long = uint64  /* types.h:34:27 */
   936  
   937  // Fixed-size types, underlying types depend on word size and compiler.
   938  type X__int8_t = int8     /* types.h:37:21 */
   939  type X__uint8_t = uint8   /* types.h:38:23 */
   940  type X__int16_t = int16   /* types.h:39:26 */
   941  type X__uint16_t = uint16 /* types.h:40:28 */
   942  type X__int32_t = int32   /* types.h:41:20 */
   943  type X__uint32_t = uint32 /* types.h:42:22 */
   944  type X__int64_t = int64   /* types.h:44:25 */
   945  type X__uint64_t = uint64 /* types.h:45:27 */
   946  
   947  // Smallest types with at least a given width.
   948  type X__int_least8_t = X__int8_t     /* types.h:52:18 */
   949  type X__uint_least8_t = X__uint8_t   /* types.h:53:19 */
   950  type X__int_least16_t = X__int16_t   /* types.h:54:19 */
   951  type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
   952  type X__int_least32_t = X__int32_t   /* types.h:56:19 */
   953  type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
   954  type X__int_least64_t = X__int64_t   /* types.h:58:19 */
   955  type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
   956  
   957  // quad_t is also 64 bits.
   958  type X__quad_t = int64    /* types.h:63:18 */
   959  type X__u_quad_t = uint64 /* types.h:64:27 */
   960  
   961  // Largest integral types.
   962  type X__intmax_t = int64   /* types.h:72:18 */
   963  type X__uintmax_t = uint64 /* types.h:73:27 */
   964  
   965  // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
   966  //    macros for each of the OS types we define below.  The definitions
   967  //    of those macros must use the following macros for underlying types.
   968  //    We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
   969  //    variants of each of the following integer types on this machine.
   970  //
   971  // 	16		-- "natural" 16-bit type (always short)
   972  // 	32		-- "natural" 32-bit type (always int)
   973  // 	64		-- "natural" 64-bit type (long or long long)
   974  // 	LONG32		-- 32-bit type, traditionally long
   975  // 	QUAD		-- 64-bit type, traditionally long long
   976  // 	WORD		-- natural type of __WORDSIZE bits (int or long)
   977  // 	LONGWORD	-- type of __WORDSIZE bits, traditionally long
   978  //
   979  //    We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
   980  //    conventional uses of `long' or `long long' type modifiers match the
   981  //    types we define, even when a less-adorned type would be the same size.
   982  //    This matters for (somewhat) portably writing printf/scanf formats for
   983  //    these types, where using the appropriate l or ll format modifiers can
   984  //    make the typedefs and the formats match up across all GNU platforms.  If
   985  //    we used `long' when it's 64 bits where `long long' is expected, then the
   986  //    compiler would warn about the formats not matching the argument types,
   987  //    and the programmer changing them to shut up the compiler would break the
   988  //    program's portability.
   989  //
   990  //    Here we assume what is presently the case in all the GCC configurations
   991  //    we support: long long is always 64 bits, long is always word/address size,
   992  //    and int is always 32 bits.
   993  
   994  // No need to mark the typedef with __extension__.
   995  // bits/typesizes.h -- underlying types for *_t.  For the generic Linux ABI.
   996  //    Copyright (C) 2011-2020 Free Software Foundation, Inc.
   997  //    This file is part of the GNU C Library.
   998  //    Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
   999  //
  1000  //    The GNU C Library is free software; you can redistribute it and/or
  1001  //    modify it under the terms of the GNU Lesser General Public
  1002  //    License as published by the Free Software Foundation; either
  1003  //    version 2.1 of the License, or (at your option) any later version.
  1004  //
  1005  //    The GNU C Library is distributed in the hope that it will be useful,
  1006  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1007  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1008  //    Lesser General Public License for more details.
  1009  //
  1010  //    You should have received a copy of the GNU Lesser General Public
  1011  //    License along with the GNU C Library.  If not, see
  1012  //    <https://www.gnu.org/licenses/>.
  1013  
  1014  // See <bits/types.h> for the meaning of these macros.  This file exists so
  1015  //    that <bits/types.h> need not vary across different GNU platforms.
  1016  
  1017  // Tell the libc code that off_t and off64_t are actually the same type
  1018  //    for all ABI purposes, even if possibly expressed as different base types
  1019  //    for C type-checking purposes.
  1020  
  1021  // Same for ino_t and ino64_t.
  1022  
  1023  // And for __rlim_t and __rlim64_t.
  1024  
  1025  // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
  1026  // Number of descriptors that can fit in an `fd_set'.
  1027  
  1028  // bits/time64.h -- underlying types for __time64_t.  Generic version.
  1029  //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
  1030  //    This file is part of the GNU C Library.
  1031  //
  1032  //    The GNU C Library is free software; you can redistribute it and/or
  1033  //    modify it under the terms of the GNU Lesser General Public
  1034  //    License as published by the Free Software Foundation; either
  1035  //    version 2.1 of the License, or (at your option) any later version.
  1036  //
  1037  //    The GNU C Library is distributed in the hope that it will be useful,
  1038  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1039  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1040  //    Lesser General Public License for more details.
  1041  //
  1042  //    You should have received a copy of the GNU Lesser General Public
  1043  //    License along with the GNU C Library; if not, see
  1044  //    <https://www.gnu.org/licenses/>.
  1045  
  1046  // Define __TIME64_T_TYPE so that it is always a 64-bit type.
  1047  
  1048  // If we already have 64-bit time type then use it.
  1049  
  1050  type X__dev_t = uint64                     /* types.h:145:25 */ // Type of device numbers.
  1051  type X__uid_t = uint32                     /* types.h:146:25 */ // Type of user identifications.
  1052  type X__gid_t = uint32                     /* types.h:147:25 */ // Type of group identifications.
  1053  type X__ino_t = uint64                     /* types.h:148:25 */ // Type of file serial numbers.
  1054  type X__ino64_t = uint64                   /* types.h:149:27 */ // Type of file serial numbers (LFS).
  1055  type X__mode_t = uint32                    /* types.h:150:26 */ // Type of file attribute bitmasks.
  1056  type X__nlink_t = uint32                   /* types.h:151:27 */ // Type of file link counts.
  1057  type X__off_t = int64                      /* types.h:152:25 */ // Type of file sizes and offsets.
  1058  type X__off64_t = int64                    /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
  1059  type X__pid_t = int32                      /* types.h:154:25 */ // Type of process identifications.
  1060  type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
  1061  type X__clock_t = int64                    /* types.h:156:27 */ // Type of CPU usage counts.
  1062  type X__rlim_t = uint64                    /* types.h:157:26 */ // Type for resource measurement.
  1063  type X__rlim64_t = uint64                  /* types.h:158:28 */ // Type for resource measurement (LFS).
  1064  type X__id_t = uint32                      /* types.h:159:24 */ // General type for IDs.
  1065  type X__time_t = int64                     /* types.h:160:26 */ // Seconds since the Epoch.
  1066  type X__useconds_t = uint32                /* types.h:161:30 */ // Count of microseconds.
  1067  type X__suseconds_t = int64                /* types.h:162:31 */ // Signed count of microseconds.
  1068  
  1069  type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
  1070  type X__key_t = int32   /* types.h:165:25 */ // Type of an IPC key.
  1071  
  1072  // Clock ID used in clock and timer functions.
  1073  type X__clockid_t = int32 /* types.h:168:29 */
  1074  
  1075  // Timer ID returned by `timer_create'.
  1076  type X__timer_t = uintptr /* types.h:171:12 */
  1077  
  1078  // Type to represent block size.
  1079  type X__blksize_t = int32 /* types.h:174:29 */
  1080  
  1081  // Types from the Large File Support interface.
  1082  
  1083  // Type to count number of disk blocks.
  1084  type X__blkcnt_t = int64   /* types.h:179:28 */
  1085  type X__blkcnt64_t = int64 /* types.h:180:30 */
  1086  
  1087  // Type to count file system blocks.
  1088  type X__fsblkcnt_t = uint64   /* types.h:183:30 */
  1089  type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
  1090  
  1091  // Type to count file system nodes.
  1092  type X__fsfilcnt_t = uint64   /* types.h:187:30 */
  1093  type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
  1094  
  1095  // Type of miscellaneous file system fields.
  1096  type X__fsword_t = int64 /* types.h:191:28 */
  1097  
  1098  type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
  1099  
  1100  // Signed long type used in system calls.
  1101  type X__syscall_slong_t = int64 /* types.h:196:33 */
  1102  // Unsigned long type used in system calls.
  1103  type X__syscall_ulong_t = uint64 /* types.h:198:33 */
  1104  
  1105  // These few don't really vary by system, they always correspond
  1106  //
  1107  //	to one of the other defined types.
  1108  type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
  1109  type X__caddr_t = uintptr   /* types.h:203:14 */
  1110  
  1111  // Duplicates info from stdint.h but this is used in unistd.h.
  1112  type X__intptr_t = int64 /* types.h:206:25 */
  1113  
  1114  // Duplicate info from sys/socket.h.
  1115  type X__socklen_t = uint32 /* types.h:209:23 */
  1116  
  1117  // C99: An integer type that can be accessed as an atomic entity,
  1118  //
  1119  //	even in the presence of asynchronous interrupts.
  1120  //	It is not currently necessary for this to be machine-specific.
  1121  type X__sig_atomic_t = int32 /* types.h:214:13 */
  1122  
  1123  // Seconds since the Epoch, visible to user code when time_t is too
  1124  //    narrow only for consistency with the old way of widening too-narrow
  1125  //    types.  User code should never use __time64_t.
  1126  
  1127  // Signal number definitions.  Linux version.
  1128  //    Copyright (C) 1995-2020 Free Software Foundation, Inc.
  1129  //    This file is part of the GNU C Library.
  1130  //
  1131  //    The GNU C Library is free software; you can redistribute it and/or
  1132  //    modify it under the terms of the GNU Lesser General Public
  1133  //    License as published by the Free Software Foundation; either
  1134  //    version 2.1 of the License, or (at your option) any later version.
  1135  //
  1136  //    The GNU C Library is distributed in the hope that it will be useful,
  1137  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1138  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1139  //    Lesser General Public License for more details.
  1140  //
  1141  //    You should have received a copy of the GNU Lesser General Public
  1142  //    License along with the GNU C Library; if not, see
  1143  //    <https://www.gnu.org/licenses/>.
  1144  
  1145  // Signal number constants.  Generic template.
  1146  //    Copyright (C) 1991-2020 Free Software Foundation, Inc.
  1147  //    This file is part of the GNU C Library.
  1148  //
  1149  //    The GNU C Library is free software; you can redistribute it and/or
  1150  //    modify it under the terms of the GNU Lesser General Public
  1151  //    License as published by the Free Software Foundation; either
  1152  //    version 2.1 of the License, or (at your option) any later version.
  1153  //
  1154  //    The GNU C Library is distributed in the hope that it will be useful,
  1155  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1156  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1157  //    Lesser General Public License for more details.
  1158  //
  1159  //    You should have received a copy of the GNU Lesser General Public
  1160  //    License along with the GNU C Library; if not, see
  1161  //    <https://www.gnu.org/licenses/>.
  1162  
  1163  // Fake signal functions.
  1164  
  1165  // We define here all the signal names listed in POSIX (1003.1-2008);
  1166  //    as of 1003.1-2013, no additional signals have been added by POSIX.
  1167  //    We also define here signal names that historically exist in every
  1168  //    real-world POSIX variant (e.g. SIGWINCH).
  1169  //
  1170  //    Signals in the 1-15 range are defined with their historical numbers.
  1171  //    For other signals, we use the BSD numbers.
  1172  //    There are two unallocated signal numbers in the 1-31 range: 7 and 29.
  1173  //    Signal number 0 is reserved for use as kill(pid, 0), to test whether
  1174  //    a process exists without sending it a signal.
  1175  
  1176  // ISO C99 signals.
  1177  
  1178  // Historical signals specified by POSIX.
  1179  
  1180  // New(er) POSIX signals (1003.1-2008, 1003.1-2013).
  1181  
  1182  // Nonstandard signals found in all modern POSIX systems
  1183  //    (including both BSD and Linux).
  1184  
  1185  // Archaic names for compatibility.
  1186  
  1187  // Not all systems support real-time signals.  bits/signum.h indicates
  1188  //    that they are supported by overriding __SIGRTMAX to a value greater
  1189  //    than __SIGRTMIN.  These constants give the kernel-level hard limits,
  1190  //    but some real-time signals may be used internally by glibc.  Do not
  1191  //    use these constants in application code; use SIGRTMIN and SIGRTMAX
  1192  //    (defined in signal.h) instead.
  1193  
  1194  // Biggest signal number + 1 (including real-time signals).
  1195  
  1196  // Adjustments and additions to the signal number constants for
  1197  //    most Linux systems.
  1198  
  1199  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1200  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1201  //    This file is part of the GNU C Library.
  1202  //
  1203  //    The GNU C Library is free software; you can redistribute it and/or
  1204  //    modify it under the terms of the GNU Lesser General Public
  1205  //    License as published by the Free Software Foundation; either
  1206  //    version 2.1 of the License, or (at your option) any later version.
  1207  //
  1208  //    The GNU C Library is distributed in the hope that it will be useful,
  1209  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1210  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1211  //    Lesser General Public License for more details.
  1212  //
  1213  //    You should have received a copy of the GNU Lesser General Public
  1214  //    License along with the GNU C Library; if not, see
  1215  //    <https://www.gnu.org/licenses/>.
  1216  
  1217  // Never include this file directly; use <sys/types.h> instead.
  1218  
  1219  // An integral type that can be modified atomically, without the
  1220  //
  1221  //	possibility of a signal arriving in the middle of the operation.
  1222  type Sig_atomic_t = X__sig_atomic_t /* sig_atomic_t.h:8:24 */
  1223  
  1224  type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
  1225  
  1226  // A set of signals to be blocked, unblocked, or waited for.
  1227  type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
  1228  
  1229  type Pid_t = X__pid_t /* signal.h:40:17 */
  1230  type Uid_t = X__uid_t /* signal.h:46:17 */
  1231  
  1232  // We need `struct timespec' later on.
  1233  // NB: Include guard matches what <linux/time.h> uses.
  1234  
  1235  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1236  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1237  //    This file is part of the GNU C Library.
  1238  //
  1239  //    The GNU C Library is free software; you can redistribute it and/or
  1240  //    modify it under the terms of the GNU Lesser General Public
  1241  //    License as published by the Free Software Foundation; either
  1242  //    version 2.1 of the License, or (at your option) any later version.
  1243  //
  1244  //    The GNU C Library is distributed in the hope that it will be useful,
  1245  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1246  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1247  //    Lesser General Public License for more details.
  1248  //
  1249  //    You should have received a copy of the GNU Lesser General Public
  1250  //    License along with the GNU C Library; if not, see
  1251  //    <https://www.gnu.org/licenses/>.
  1252  
  1253  // Never include this file directly; use <sys/types.h> instead.
  1254  
  1255  // Endian macros for string.h functions
  1256  //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
  1257  //    This file is part of the GNU C Library.
  1258  //
  1259  //    The GNU C Library is free software; you can redistribute it and/or
  1260  //    modify it under the terms of the GNU Lesser General Public
  1261  //    License as published by the Free Software Foundation; either
  1262  //    version 2.1 of the License, or (at your option) any later version.
  1263  //
  1264  //    The GNU C Library is distributed in the hope that it will be useful,
  1265  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1266  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1267  //    Lesser General Public License for more details.
  1268  //
  1269  //    You should have received a copy of the GNU Lesser General Public
  1270  //    License along with the GNU C Library; if not, see
  1271  //    <http://www.gnu.org/licenses/>.
  1272  
  1273  // Definitions for byte order, according to significance of bytes,
  1274  //    from low addresses to high addresses.  The value is what you get by
  1275  //    putting '4' in the most significant byte, '3' in the second most
  1276  //    significant byte, '2' in the second least significant byte, and '1'
  1277  //    in the least significant byte, and then writing down one digit for
  1278  //    each byte, starting with the byte at the lowest address at the left,
  1279  //    and proceeding to the byte with the highest address at the right.
  1280  
  1281  // This file defines `__BYTE_ORDER' for the particular machine.
  1282  
  1283  // AArch64 has selectable endianness.
  1284  
  1285  // Some machines may need to use a different endianness for floating point
  1286  //    values.
  1287  
  1288  // POSIX.1b structure for a time value.  This is like a `struct timeval' but
  1289  //
  1290  //	has nanoseconds instead of microseconds.
  1291  type Timespec = struct {
  1292  	Ftv_sec  X__time_t
  1293  	Ftv_nsec X__syscall_slong_t
  1294  } /* struct_timespec.h:10:1 */
  1295  
  1296  // Determine the wordsize from the preprocessor defines.
  1297  //
  1298  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
  1299  //    This file is part of the GNU C Library.
  1300  //
  1301  //    The GNU C Library is free software; you can redistribute it and/or
  1302  //    modify it under the terms of the GNU Lesser General Public
  1303  //    License as published by the Free Software Foundation; either
  1304  //    version 2.1 of the License, or (at your option) any later version.
  1305  //
  1306  //    The GNU C Library is distributed in the hope that it will be useful,
  1307  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1308  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1309  //    Lesser General Public License for more details.
  1310  //
  1311  //    You should have received a copy of the GNU Lesser General Public
  1312  //    License along with the GNU C Library; if not, see
  1313  //    <https://www.gnu.org/licenses/>.
  1314  
  1315  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1316  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1317  //    This file is part of the GNU C Library.
  1318  //
  1319  //    The GNU C Library is free software; you can redistribute it and/or
  1320  //    modify it under the terms of the GNU Lesser General Public
  1321  //    License as published by the Free Software Foundation; either
  1322  //    version 2.1 of the License, or (at your option) any later version.
  1323  //
  1324  //    The GNU C Library is distributed in the hope that it will be useful,
  1325  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1326  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1327  //    Lesser General Public License for more details.
  1328  //
  1329  //    You should have received a copy of the GNU Lesser General Public
  1330  //    License along with the GNU C Library; if not, see
  1331  //    <https://www.gnu.org/licenses/>.
  1332  
  1333  // Never include this file directly; use <sys/types.h> instead.
  1334  
  1335  // Define __sigval_t.
  1336  //    Copyright (C) 1997-2020 Free Software Foundation, Inc.
  1337  //    This file is part of the GNU C Library.
  1338  //
  1339  //    The GNU C Library is free software; you can redistribute it and/or
  1340  //    modify it under the terms of the GNU Lesser General Public
  1341  //    License as published by the Free Software Foundation; either
  1342  //    version 2.1 of the License, or (at your option) any later version.
  1343  //
  1344  //    The GNU C Library is distributed in the hope that it will be useful,
  1345  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1346  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1347  //    Lesser General Public License for more details.
  1348  //
  1349  //    You should have received a copy of the GNU Lesser General Public
  1350  //    License along with the GNU C Library; if not, see
  1351  //    <https://www.gnu.org/licenses/>.
  1352  
  1353  // Type for data associated with a signal.
  1354  type Sigval = struct {
  1355  	F__ccgo_pad1 [0]uint64
  1356  	Fsival_int   int32
  1357  	F__ccgo_pad2 [4]byte
  1358  } /* __sigval_t.h:24:1 */
  1359  
  1360  type X__sigval_t = Sigval /* __sigval_t.h:30:22 */
  1361  
  1362  // Some fields of siginfo_t have architecture-specific variations.
  1363  // Architecture-specific adjustments to siginfo_t.
  1364  
  1365  // This architecture has no adjustments to make to siginfo_t.
  1366  
  1367  type Siginfo_t = struct {
  1368  	Fsi_signo  int32
  1369  	Fsi_errno  int32
  1370  	Fsi_code   int32
  1371  	F__pad0    int32
  1372  	F_sifields struct {
  1373  		F__ccgo_pad1 [0]uint64
  1374  		F_pad        [28]int32
  1375  	}
  1376  } /* siginfo_t.h:124:5 */
  1377  
  1378  // Architectures might also add architecture-specific constants.
  1379  //    These are all considered GNU extensions.
  1380  
  1381  // Define __sigval_t.
  1382  //    Copyright (C) 1997-2020 Free Software Foundation, Inc.
  1383  //    This file is part of the GNU C Library.
  1384  //
  1385  //    The GNU C Library is free software; you can redistribute it and/or
  1386  //    modify it under the terms of the GNU Lesser General Public
  1387  //    License as published by the Free Software Foundation; either
  1388  //    version 2.1 of the License, or (at your option) any later version.
  1389  //
  1390  //    The GNU C Library is distributed in the hope that it will be useful,
  1391  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1392  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1393  //    Lesser General Public License for more details.
  1394  //
  1395  //    You should have received a copy of the GNU Lesser General Public
  1396  //    License along with the GNU C Library; if not, see
  1397  //    <https://www.gnu.org/licenses/>.
  1398  
  1399  // To avoid sigval_t (not a standard type name) having C++ name
  1400  //    mangling depending on whether the selected standard includes union
  1401  //    sigval, it should not be defined at all when using a standard for
  1402  //    which the sigval name is not reserved; in that case, headers should
  1403  //    not include <bits/types/sigval_t.h> and should use only the
  1404  //    internal __sigval_t name.
  1405  
  1406  type Sigval_t = X__sigval_t /* sigval_t.h:16:20 */
  1407  
  1408  // Determine the wordsize from the preprocessor defines.
  1409  //
  1410  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
  1411  //    This file is part of the GNU C Library.
  1412  //
  1413  //    The GNU C Library is free software; you can redistribute it and/or
  1414  //    modify it under the terms of the GNU Lesser General Public
  1415  //    License as published by the Free Software Foundation; either
  1416  //    version 2.1 of the License, or (at your option) any later version.
  1417  //
  1418  //    The GNU C Library is distributed in the hope that it will be useful,
  1419  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1420  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1421  //    Lesser General Public License for more details.
  1422  //
  1423  //    You should have received a copy of the GNU Lesser General Public
  1424  //    License along with the GNU C Library; if not, see
  1425  //    <https://www.gnu.org/licenses/>.
  1426  
  1427  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1428  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1429  //    This file is part of the GNU C Library.
  1430  //
  1431  //    The GNU C Library is free software; you can redistribute it and/or
  1432  //    modify it under the terms of the GNU Lesser General Public
  1433  //    License as published by the Free Software Foundation; either
  1434  //    version 2.1 of the License, or (at your option) any later version.
  1435  //
  1436  //    The GNU C Library is distributed in the hope that it will be useful,
  1437  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1438  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1439  //    Lesser General Public License for more details.
  1440  //
  1441  //    You should have received a copy of the GNU Lesser General Public
  1442  //    License along with the GNU C Library; if not, see
  1443  //    <https://www.gnu.org/licenses/>.
  1444  
  1445  // Never include this file directly; use <sys/types.h> instead.
  1446  
  1447  // Define __sigval_t.
  1448  //    Copyright (C) 1997-2020 Free Software Foundation, Inc.
  1449  //    This file is part of the GNU C Library.
  1450  //
  1451  //    The GNU C Library is free software; you can redistribute it and/or
  1452  //    modify it under the terms of the GNU Lesser General Public
  1453  //    License as published by the Free Software Foundation; either
  1454  //    version 2.1 of the License, or (at your option) any later version.
  1455  //
  1456  //    The GNU C Library is distributed in the hope that it will be useful,
  1457  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1458  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1459  //    Lesser General Public License for more details.
  1460  //
  1461  //    You should have received a copy of the GNU Lesser General Public
  1462  //    License along with the GNU C Library; if not, see
  1463  //    <https://www.gnu.org/licenses/>.
  1464  
  1465  // Forward declaration.
  1466  type Pthread_attr_t1 = struct {
  1467  	F__ccgo_pad1 [0]uint64
  1468  	F__size      [64]uint8
  1469  } /* sigevent_t.h:17:9 */
  1470  
  1471  // Determine the wordsize from the preprocessor defines.
  1472  //
  1473  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
  1474  //    This file is part of the GNU C Library.
  1475  //
  1476  //    The GNU C Library is free software; you can redistribute it and/or
  1477  //    modify it under the terms of the GNU Lesser General Public
  1478  //    License as published by the Free Software Foundation; either
  1479  //    version 2.1 of the License, or (at your option) any later version.
  1480  //
  1481  //    The GNU C Library is distributed in the hope that it will be useful,
  1482  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1483  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1484  //    Lesser General Public License for more details.
  1485  //
  1486  //    You should have received a copy of the GNU Lesser General Public
  1487  //    License along with the GNU C Library; if not, see
  1488  //    <https://www.gnu.org/licenses/>.
  1489  
  1490  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1491  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1492  //    This file is part of the GNU C Library.
  1493  //
  1494  //    The GNU C Library is free software; you can redistribute it and/or
  1495  //    modify it under the terms of the GNU Lesser General Public
  1496  //    License as published by the Free Software Foundation; either
  1497  //    version 2.1 of the License, or (at your option) any later version.
  1498  //
  1499  //    The GNU C Library is distributed in the hope that it will be useful,
  1500  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1501  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1502  //    Lesser General Public License for more details.
  1503  //
  1504  //    You should have received a copy of the GNU Lesser General Public
  1505  //    License along with the GNU C Library; if not, see
  1506  //    <https://www.gnu.org/licenses/>.
  1507  
  1508  // Never include this file directly; use <sys/types.h> instead.
  1509  
  1510  // Define __sigval_t.
  1511  //    Copyright (C) 1997-2020 Free Software Foundation, Inc.
  1512  //    This file is part of the GNU C Library.
  1513  //
  1514  //    The GNU C Library is free software; you can redistribute it and/or
  1515  //    modify it under the terms of the GNU Lesser General Public
  1516  //    License as published by the Free Software Foundation; either
  1517  //    version 2.1 of the License, or (at your option) any later version.
  1518  //
  1519  //    The GNU C Library is distributed in the hope that it will be useful,
  1520  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1521  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1522  //    Lesser General Public License for more details.
  1523  //
  1524  //    You should have received a copy of the GNU Lesser General Public
  1525  //    License along with the GNU C Library; if not, see
  1526  //    <https://www.gnu.org/licenses/>.
  1527  
  1528  // Forward declaration.
  1529  type Pthread_attr_t = Pthread_attr_t1 /* sigevent_t.h:17:30 */
  1530  
  1531  // Structure to transport application-defined values with signals.
  1532  type Sigevent = struct {
  1533  	Fsigev_value  X__sigval_t
  1534  	Fsigev_signo  int32
  1535  	Fsigev_notify int32
  1536  	F_sigev_un    struct {
  1537  		F__ccgo_pad1 [0]uint64
  1538  		F_pad        [12]int32
  1539  	}
  1540  } /* sigevent_t.h:22:9 */
  1541  
  1542  // Structure to transport application-defined values with signals.
  1543  type Sigevent_t = Sigevent /* sigevent_t.h:42:5 */
  1544  
  1545  // Type of a signal handler.
  1546  type X__sighandler_t = uintptr /* signal.h:72:14 */
  1547  
  1548  // 4.4 BSD uses the name `sig_t' for this.
  1549  type Sig_t = X__sighandler_t /* signal.h:190:24 */
  1550  
  1551  // Get the system-specific definitions of `struct sigaction'
  1552  //    and the `SA_*' and `SIG_*'. constants.
  1553  // The proper definitions for Linux's sigaction.
  1554  //    Copyright (C) 1993-2020 Free Software Foundation, Inc.
  1555  //    This file is part of the GNU C Library.
  1556  //
  1557  //    The GNU C Library is free software; you can redistribute it and/or
  1558  //    modify it under the terms of the GNU Lesser General Public
  1559  //    License as published by the Free Software Foundation; either
  1560  //    version 2.1 of the License, or (at your option) any later version.
  1561  //
  1562  //    The GNU C Library is distributed in the hope that it will be useful,
  1563  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1564  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1565  //    Lesser General Public License for more details.
  1566  //
  1567  //    You should have received a copy of the GNU Lesser General Public
  1568  //    License along with the GNU C Library; if not, see
  1569  //    <https://www.gnu.org/licenses/>.
  1570  
  1571  // Structure describing the action to be taken when a signal arrives.
  1572  type Sigaction = struct {
  1573  	F__sigaction_handler struct{ Fsa_handler X__sighandler_t }
  1574  	Fsa_mask             X__sigset_t
  1575  	Fsa_flags            int32
  1576  	F__ccgo_pad1         [4]byte
  1577  	Fsa_restorer         uintptr
  1578  } /* sigaction.h:27:1 */
  1579  
  1580  // Get machine-dependent `struct sigcontext' and signal subcodes.
  1581  // Copyright (C) 1996-2020 Free Software Foundation, Inc.
  1582  //    This file is part of the GNU C Library.
  1583  //
  1584  //    The GNU C Library is free software; you can redistribute it and/or
  1585  //    modify it under the terms of the GNU Lesser General Public
  1586  //    License as published by the Free Software Foundation; either
  1587  //    version 2.1 of the License, or (at your option) any later version.
  1588  //
  1589  //    The GNU C Library is distributed in the hope that it will be useful,
  1590  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1591  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1592  //    Lesser General Public License for more details.
  1593  //
  1594  //    You should have received a copy of the GNU Lesser General Public
  1595  //    License along with the GNU C Library; if not, see
  1596  //    <https://www.gnu.org/licenses/>.
  1597  
  1598  // Kernel headers before 2.1.1 define a struct sigcontext_struct, but
  1599  //    we need sigcontext.
  1600  
  1601  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1602  // Copyright (C) 2012 ARM Ltd.
  1603  //
  1604  // This program is free software; you can redistribute it and/or modify
  1605  // it under the terms of the GNU General Public License version 2 as
  1606  // published by the Free Software Foundation.
  1607  //
  1608  // This program is distributed in the hope that it will be useful,
  1609  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1610  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1611  // GNU General Public License for more details.
  1612  //
  1613  // You should have received a copy of the GNU General Public License
  1614  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
  1615  
  1616  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1617  
  1618  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1619  // int-ll64 is used everywhere now.
  1620  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1621  // asm-generic/int-ll64.h
  1622  //
  1623  // Integer declarations for architectures which use "long long"
  1624  // for 64-bit types.
  1625  
  1626  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1627  // Copyright (C) 2012 ARM Ltd.
  1628  //
  1629  // This program is free software; you can redistribute it and/or modify
  1630  // it under the terms of the GNU General Public License version 2 as
  1631  // published by the Free Software Foundation.
  1632  //
  1633  // This program is distributed in the hope that it will be useful,
  1634  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1635  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1636  // GNU General Public License for more details.
  1637  //
  1638  // You should have received a copy of the GNU General Public License
  1639  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
  1640  
  1641  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1642  
  1643  // There seems to be no way of detecting this automatically from user
  1644  // space, so 64 bit architectures should override this in their
  1645  // bitsperlong.h. In particular, an architecture that supports
  1646  // both 32 and 64 bit user space must not rely on CONFIG_64BIT
  1647  // to decide it, but rather check a compiler provided macro.
  1648  
  1649  // __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  1650  // header files exported to user space
  1651  
  1652  type X__s8 = int8  /* int-ll64.h:20:25 */
  1653  type X__u8 = uint8 /* int-ll64.h:21:23 */
  1654  
  1655  type X__s16 = int16  /* int-ll64.h:23:26 */
  1656  type X__u16 = uint16 /* int-ll64.h:24:24 */
  1657  
  1658  type X__s32 = int32  /* int-ll64.h:26:24 */
  1659  type X__u32 = uint32 /* int-ll64.h:27:22 */
  1660  
  1661  type X__s64 = int64  /* int-ll64.h:30:44 */
  1662  type X__u64 = uint64 /* int-ll64.h:31:42 */
  1663  
  1664  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1665  
  1666  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1667  
  1668  // This allows for 1024 file descriptors: if NR_OPEN is ever grown
  1669  // beyond that you'll have to change this too. But 1024 fd's seem to be
  1670  // enough even for such "real" unices like OSF/1, so hopefully this is
  1671  // one limit that doesn't have to be changed [again].
  1672  //
  1673  // Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
  1674  // <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
  1675  // place for them. Solved by having dummy defines in <sys/time.h>.
  1676  
  1677  // This macro may have been defined in <gnu/types.h>. But we always
  1678  // use the one here.
  1679  
  1680  type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */
  1681  
  1682  // Type of a signal handler.
  1683  type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */
  1684  
  1685  // Type of a SYSV IPC key.
  1686  type X__kernel_key_t = int32 /* posix_types.h:33:13 */
  1687  type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
  1688  
  1689  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1690  
  1691  type X__kernel_old_uid_t = uint16 /* posix_types.h:5:24 */
  1692  type X__kernel_old_gid_t = uint16 /* posix_types.h:6:24 */
  1693  
  1694  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1695  
  1696  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1697  // Copyright (C) 2012 ARM Ltd.
  1698  //
  1699  // This program is free software; you can redistribute it and/or modify
  1700  // it under the terms of the GNU General Public License version 2 as
  1701  // published by the Free Software Foundation.
  1702  //
  1703  // This program is distributed in the hope that it will be useful,
  1704  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1705  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1706  // GNU General Public License for more details.
  1707  //
  1708  // You should have received a copy of the GNU General Public License
  1709  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
  1710  // This file is generally used by user-level software, so you need to
  1711  // be a little careful about namespace pollution etc.
  1712  //
  1713  // First the types that are often defined in different ways across
  1714  // architectures, so that you can override them.
  1715  
  1716  type X__kernel_long_t = int64   /* posix_types.h:15:15 */
  1717  type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */
  1718  
  1719  type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */
  1720  
  1721  type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */
  1722  
  1723  type X__kernel_pid_t = int32 /* posix_types.h:28:14 */
  1724  
  1725  type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */
  1726  
  1727  type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */
  1728  type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */
  1729  
  1730  type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */
  1731  
  1732  type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
  1733  
  1734  type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
  1735  type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
  1736  
  1737  type X__kernel_old_dev_t = uint32 /* posix_types.h:59:22 */
  1738  
  1739  // Most 32 bit architectures use "unsigned int" size_t,
  1740  // and all 64 bit architectures use "unsigned long" size_t.
  1741  type X__kernel_size_t = X__kernel_ulong_t   /* posix_types.h:72:26 */
  1742  type X__kernel_ssize_t = X__kernel_long_t   /* posix_types.h:73:25 */
  1743  type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */
  1744  
  1745  type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
  1746  
  1747  // anything below here should be completely generic
  1748  type X__kernel_off_t = X__kernel_long_t      /* posix_types.h:87:25 */
  1749  type X__kernel_loff_t = int64                /* posix_types.h:88:19 */
  1750  type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */
  1751  type X__kernel_time_t = X__kernel_long_t     /* posix_types.h:90:25 */
  1752  type X__kernel_time64_t = int64              /* posix_types.h:91:19 */
  1753  type X__kernel_clock_t = X__kernel_long_t    /* posix_types.h:92:25 */
  1754  type X__kernel_timer_t = int32               /* posix_types.h:93:14 */
  1755  type X__kernel_clockid_t = int32             /* posix_types.h:94:14 */
  1756  type X__kernel_caddr_t = uintptr             /* posix_types.h:95:14 */
  1757  type X__kernel_uid16_t = uint16              /* posix_types.h:96:24 */
  1758  type X__kernel_gid16_t = uint16              /* posix_types.h:97:24 */
  1759  
  1760  // Below are truly Linux-specific types that should never collide with
  1761  // any application/library that wants linux/types.h.
  1762  
  1763  type X__le16 = X__u16 /* types.h:24:25 */
  1764  type X__be16 = X__u16 /* types.h:25:25 */
  1765  type X__le32 = X__u32 /* types.h:26:25 */
  1766  type X__be32 = X__u32 /* types.h:27:25 */
  1767  type X__le64 = X__u64 /* types.h:28:25 */
  1768  type X__be64 = X__u64 /* types.h:29:25 */
  1769  
  1770  type X__sum16 = X__u16 /* types.h:31:25 */
  1771  type X__wsum = X__u32  /* types.h:32:25 */
  1772  
  1773  // aligned_u64 should be used in defining kernel<->userspace ABIs to avoid
  1774  // common 32/64-bit compat problems.
  1775  // 64-bit values align to 4-byte boundaries on x86_32 (and possibly other
  1776  // architectures) and to 8-byte boundaries on 64-bit architectures.  The new
  1777  // aligned_64 type enforces 8-byte alignment so that structs containing
  1778  // aligned_64 values have the same alignment on 32-bit and 64-bit architectures.
  1779  // No conversions are necessary between 32-bit user-space and a 64-bit kernel.
  1780  
  1781  type X__poll_t = uint32 /* types.h:47:28 */
  1782  
  1783  // Signal context structure - contains all info to do with the state
  1784  // before the signal handler was invoked.
  1785  type Sigcontext = struct {
  1786  	Ffault_address X__u64
  1787  	Fregs          [31]X__u64
  1788  	Fsp            X__u64
  1789  	Fpc            X__u64
  1790  	Fpstate        X__u64
  1791  	F__reserved    [4096]X__u8
  1792  } /* sigcontext.h:28:1 */
  1793  
  1794  // Allocation of __reserved[]:
  1795  // (Note: records do not necessarily occur in the order shown here.)
  1796  //
  1797  //	size		description
  1798  //
  1799  //	0x210		fpsimd_context
  1800  //	 0x10		esr_context
  1801  //	0x8a0		sve_context (vl <= 64) (optional)
  1802  //	 0x20		extra_context (optional)
  1803  //	 0x10		terminator (null _aarch64_ctx)
  1804  //
  1805  //	0x510		(reserved for future allocation)
  1806  //
  1807  // New records that can exceed this space need to be opt-in for userspace, so
  1808  // that an expanded signal frame is not generated unexpectedly.  The mechanism
  1809  // for opting in will depend on the extension that generates each new record.
  1810  // The above table documents the maximum set and sizes of records than can be
  1811  // generated when userspace does not opt in for any such extension.
  1812  
  1813  // Header to be used at the beginning of structures extending the user
  1814  // context. Such structures must be placed after the rt_sigframe on the stack
  1815  // and be 16-byte aligned. The last structure must be a dummy one with the
  1816  // magic and size set to 0.
  1817  type X_aarch64_ctx = struct {
  1818  	Fmagic X__u32
  1819  	Fsize  X__u32
  1820  } /* sigcontext.h:66:1 */
  1821  
  1822  type Fpsimd_context = struct {
  1823  	Fhead struct {
  1824  		Fmagic X__u32
  1825  		Fsize  X__u32
  1826  	}
  1827  	Ffpsr  X__u32
  1828  	Ffpcr  X__u32
  1829  	Fvregs [32]X__uint128_t
  1830  } /* sigcontext.h:73:1 */
  1831  
  1832  // Note: similarly to all other integer fields, each V-register is stored in an
  1833  // endianness-dependent format, with the byte at offset i from the start of the
  1834  // in-memory representation of the register value containing
  1835  //
  1836  //    bits [(7 + 8 * i) : (8 * i)] of the register on little-endian hosts; or
  1837  //    bits [(127 - 8 * i) : (120 - 8 * i)] on big-endian hosts.
  1838  
  1839  // ESR_EL1 context
  1840  
  1841  type Esr_context = struct {
  1842  	Fhead struct {
  1843  		Fmagic X__u32
  1844  		Fsize  X__u32
  1845  	}
  1846  	Fesr X__u64
  1847  } /* sigcontext.h:92:1 */
  1848  
  1849  // extra_context: describes extra space in the signal frame for
  1850  // additional structures that don't fit in sigcontext.__reserved[].
  1851  //
  1852  // Note:
  1853  //
  1854  // 1) fpsimd_context, esr_context and extra_context must be placed in
  1855  // sigcontext.__reserved[] if present.  They cannot be placed in the
  1856  // extra space.  Any other record can be placed either in the extra
  1857  // space or in sigcontext.__reserved[], unless otherwise specified in
  1858  // this file.
  1859  //
  1860  // 2) There must not be more than one extra_context.
  1861  //
  1862  // 3) If extra_context is present, it must be followed immediately in
  1863  // sigcontext.__reserved[] by the terminating null _aarch64_ctx.
  1864  //
  1865  // 4) The extra space to which datap points must start at the first
  1866  // 16-byte aligned address immediately after the terminating null
  1867  // _aarch64_ctx that follows the extra_context structure in
  1868  // __reserved[].  The extra space may overrun the end of __reserved[],
  1869  // as indicated by a sufficiently large value for the size field.
  1870  //
  1871  // 5) The extra space must itself be terminated with a null
  1872  // _aarch64_ctx.
  1873  
  1874  type Extra_context = struct {
  1875  	Fhead struct {
  1876  		Fmagic X__u32
  1877  		Fsize  X__u32
  1878  	}
  1879  	Fdatap      X__u64
  1880  	Fsize       X__u32
  1881  	F__reserved [3]X__u32
  1882  } /* sigcontext.h:125:1 */
  1883  
  1884  type Sve_context = struct {
  1885  	Fhead struct {
  1886  		Fmagic X__u32
  1887  		Fsize  X__u32
  1888  	}
  1889  	Fvl         X__u16
  1890  	F__reserved [3]X__u16
  1891  } /* sigcontext.h:134:1 */
  1892  
  1893  // Wide character type.
  1894  //    Locale-writers should change this as necessary to
  1895  //    be big enough to hold unique values not between 0 and 127,
  1896  //    and not (wchar_t) -1, for each defined multibyte character.
  1897  
  1898  // Define this type if we are doing the whole job,
  1899  //    or if we want this type in particular.
  1900  
  1901  // A null pointer constant.
  1902  
  1903  // Define stack_t.  Linux version.
  1904  //    Copyright (C) 1998-2020 Free Software Foundation, Inc.
  1905  //    This file is part of the GNU C Library.
  1906  //
  1907  //    The GNU C Library is free software; you can redistribute it and/or
  1908  //    modify it under the terms of the GNU Lesser General Public
  1909  //    License as published by the Free Software Foundation; either
  1910  //    version 2.1 of the License, or (at your option) any later version.
  1911  //
  1912  //    The GNU C Library is distributed in the hope that it will be useful,
  1913  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1914  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1915  //    Lesser General Public License for more details.
  1916  //
  1917  //    You should have received a copy of the GNU Lesser General Public
  1918  //    License along with the GNU C Library; if not, see
  1919  //    <https://www.gnu.org/licenses/>.
  1920  
  1921  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  1922  //
  1923  // This file is part of GCC.
  1924  //
  1925  // GCC is free software; you can redistribute it and/or modify
  1926  // it under the terms of the GNU General Public License as published by
  1927  // the Free Software Foundation; either version 3, or (at your option)
  1928  // any later version.
  1929  //
  1930  // GCC is distributed in the hope that it will be useful,
  1931  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1932  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1933  // GNU General Public License for more details.
  1934  //
  1935  // Under Section 7 of GPL version 3, you are granted additional
  1936  // permissions described in the GCC Runtime Library Exception, version
  1937  // 3.1, as published by the Free Software Foundation.
  1938  //
  1939  // You should have received a copy of the GNU General Public License and
  1940  // a copy of the GCC Runtime Library Exception along with this program;
  1941  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  1942  // <http://www.gnu.org/licenses/>.
  1943  
  1944  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  1945  
  1946  // Any one of these symbols __need_* means that GNU libc
  1947  //    wants us just to define one data type.  So don't define
  1948  //    the symbols that indicate this file's entire job has been done.
  1949  
  1950  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  1951  //    There's no way to win with the other order!  Sun lossage.
  1952  
  1953  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  1954  //    Just ignore it.
  1955  
  1956  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  1957  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  1958  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  1959  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  1960  //    If we find that the macros are still defined at this point, we must
  1961  //    invoke them so that the type is defined as expected.
  1962  
  1963  // In case nobody has defined these types, but we aren't running under
  1964  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  1965  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  1966  //    parts of GCC is compiled by an older compiler, that actually
  1967  //    include gstddef.h, such as collect2.
  1968  
  1969  // Signed type of difference of two pointers.
  1970  
  1971  // Define this type if we are doing the whole job,
  1972  //    or if we want this type in particular.
  1973  
  1974  // Unsigned type of `sizeof' something.
  1975  
  1976  // Define this type if we are doing the whole job,
  1977  //    or if we want this type in particular.
  1978  
  1979  // Wide character type.
  1980  //    Locale-writers should change this as necessary to
  1981  //    be big enough to hold unique values not between 0 and 127,
  1982  //    and not (wchar_t) -1, for each defined multibyte character.
  1983  
  1984  // Define this type if we are doing the whole job,
  1985  //    or if we want this type in particular.
  1986  
  1987  // A null pointer constant.
  1988  
  1989  // Structure describing a signal stack.
  1990  type Stack_t = struct {
  1991  	Fss_sp       uintptr
  1992  	Fss_flags    int32
  1993  	F__ccgo_pad1 [4]byte
  1994  	Fss_size     Size_t
  1995  } /* stack_t.h:31:5 */
  1996  
  1997  // This will define `ucontext_t' and `mcontext_t'.
  1998  // Copyright (C) 1998-2020 Free Software Foundation, Inc.
  1999  //
  2000  //    This file is part of the GNU C Library.
  2001  //
  2002  //    The GNU C Library is free software; you can redistribute it and/or
  2003  //    modify it under the terms of the GNU Lesser General Public
  2004  //    License as published by the Free Software Foundation; either
  2005  //    version 2.1 of the License, or (at your option) any later version.
  2006  //
  2007  //    The GNU C Library is distributed in the hope that it will be useful,
  2008  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2009  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2010  //    Lesser General Public License for more details.
  2011  //
  2012  //    You should have received a copy of the GNU Lesser General Public
  2013  //    License along with the GNU C Library; if not, see
  2014  //    <https://www.gnu.org/licenses/>.
  2015  
  2016  // System V/AArch64 ABI compliant context switching support.
  2017  
  2018  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2019  //    This file is part of the GNU C Library.
  2020  //
  2021  //    The GNU C Library is free software; you can redistribute it and/or
  2022  //    modify it under the terms of the GNU Lesser General Public
  2023  //    License as published by the Free Software Foundation; either
  2024  //    version 2.1 of the License, or (at your option) any later version.
  2025  //
  2026  //    The GNU C Library is distributed in the hope that it will be useful,
  2027  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2028  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2029  //    Lesser General Public License for more details.
  2030  //
  2031  //    You should have received a copy of the GNU Lesser General Public
  2032  //    License along with the GNU C Library; if not, see
  2033  //    <https://www.gnu.org/licenses/>.
  2034  
  2035  // Define stack_t.  Linux version.
  2036  //    Copyright (C) 1998-2020 Free Software Foundation, Inc.
  2037  //    This file is part of the GNU C Library.
  2038  //
  2039  //    The GNU C Library is free software; you can redistribute it and/or
  2040  //    modify it under the terms of the GNU Lesser General Public
  2041  //    License as published by the Free Software Foundation; either
  2042  //    version 2.1 of the License, or (at your option) any later version.
  2043  //
  2044  //    The GNU C Library is distributed in the hope that it will be useful,
  2045  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2046  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2047  //    Lesser General Public License for more details.
  2048  //
  2049  //    You should have received a copy of the GNU Lesser General Public
  2050  //    License along with the GNU C Library; if not, see
  2051  //    <https://www.gnu.org/licenses/>.
  2052  
  2053  // Definitions for core files and libthread_db.  Generic Linux version.
  2054  //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
  2055  //
  2056  //    This file is part of the GNU C Library.
  2057  //
  2058  //    The GNU C Library is free software; you can redistribute it and/or
  2059  //    modify it under the terms of the GNU Lesser General Public
  2060  //    License as published by the Free Software Foundation; either
  2061  //    version 2.1 of the License, or (at your option) any later version.
  2062  //
  2063  //    The GNU C Library is distributed in the hope that it will be useful,
  2064  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2065  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2066  //    Lesser General Public License for more details.
  2067  //
  2068  //    You should have received a copy of the GNU Lesser General Public
  2069  //    License along with the GNU C Library; if not, see
  2070  //    <https://www.gnu.org/licenses/>.
  2071  
  2072  // This is somewhat modelled after the file of the same name on SVR4
  2073  //    systems.  It provides a definition of the core file format for ELF
  2074  //    used on Linux.  It doesn't have anything to do with the /proc file
  2075  //    system, even though Linux has one.
  2076  //
  2077  //    Anyway, the whole purpose of this file is for GDB and GDB only.
  2078  //    Don't read too much into it.  Don't use it for anything other than
  2079  //    GDB unless you know what you are doing.
  2080  
  2081  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2082  //    This file is part of the GNU C Library.
  2083  //
  2084  //    The GNU C Library is free software; you can redistribute it and/or
  2085  //    modify it under the terms of the GNU Lesser General Public
  2086  //    License as published by the Free Software Foundation; either
  2087  //    version 2.1 of the License, or (at your option) any later version.
  2088  //
  2089  //    The GNU C Library is distributed in the hope that it will be useful,
  2090  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2091  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2092  //    Lesser General Public License for more details.
  2093  //
  2094  //    You should have received a copy of the GNU Lesser General Public
  2095  //    License along with the GNU C Library; if not, see
  2096  //    <https://www.gnu.org/licenses/>.
  2097  
  2098  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2099  //    This file is part of the GNU C Library.
  2100  //
  2101  //    The GNU C Library is free software; you can redistribute it and/or
  2102  //    modify it under the terms of the GNU Lesser General Public
  2103  //    License as published by the Free Software Foundation; either
  2104  //    version 2.1 of the License, or (at your option) any later version.
  2105  //
  2106  //    The GNU C Library is distributed in the hope that it will be useful,
  2107  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2108  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2109  //    Lesser General Public License for more details.
  2110  //
  2111  //    You should have received a copy of the GNU Lesser General Public
  2112  //    License along with the GNU C Library; if not, see
  2113  //    <https://www.gnu.org/licenses/>.
  2114  
  2115  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2116  //    This file is part of the GNU C Library.
  2117  //
  2118  //    The GNU C Library is free software; you can redistribute it and/or
  2119  //    modify it under the terms of the GNU Lesser General Public
  2120  //    License as published by the Free Software Foundation; either
  2121  //    version 2.1 of the License, or (at your option) any later version.
  2122  //
  2123  //    The GNU C Library is distributed in the hope that it will be useful,
  2124  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2125  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2126  //    Lesser General Public License for more details.
  2127  //
  2128  //    You should have received a copy of the GNU Lesser General Public
  2129  //    License along with the GNU C Library; if not, see
  2130  //    <https://www.gnu.org/licenses/>.
  2131  
  2132  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2133  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2134  //    This file is part of the GNU C Library.
  2135  //
  2136  //    The GNU C Library is free software; you can redistribute it and/or
  2137  //    modify it under the terms of the GNU Lesser General Public
  2138  //    License as published by the Free Software Foundation; either
  2139  //    version 2.1 of the License, or (at your option) any later version.
  2140  //
  2141  //    The GNU C Library is distributed in the hope that it will be useful,
  2142  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2143  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2144  //    Lesser General Public License for more details.
  2145  //
  2146  //    You should have received a copy of the GNU Lesser General Public
  2147  //    License along with the GNU C Library; if not, see
  2148  //    <https://www.gnu.org/licenses/>.
  2149  
  2150  // Never include this file directly; use <sys/types.h> instead.
  2151  
  2152  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2153  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2154  //    This file is part of the GNU C Library.
  2155  //
  2156  //    The GNU C Library is free software; you can redistribute it and/or
  2157  //    modify it under the terms of the GNU Lesser General Public
  2158  //    License as published by the Free Software Foundation; either
  2159  //    version 2.1 of the License, or (at your option) any later version.
  2160  //
  2161  //    The GNU C Library is distributed in the hope that it will be useful,
  2162  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2163  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2164  //    Lesser General Public License for more details.
  2165  //
  2166  //    You should have received a copy of the GNU Lesser General Public
  2167  //    License along with the GNU C Library; if not, see
  2168  //    <https://www.gnu.org/licenses/>.
  2169  
  2170  // Never include this file directly; use <sys/types.h> instead.
  2171  
  2172  // Returned by `time'.
  2173  type Time_t = X__time_t /* time_t.h:7:18 */
  2174  
  2175  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2176  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2177  //    This file is part of the GNU C Library.
  2178  //
  2179  //    The GNU C Library is free software; you can redistribute it and/or
  2180  //    modify it under the terms of the GNU Lesser General Public
  2181  //    License as published by the Free Software Foundation; either
  2182  //    version 2.1 of the License, or (at your option) any later version.
  2183  //
  2184  //    The GNU C Library is distributed in the hope that it will be useful,
  2185  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2186  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2187  //    Lesser General Public License for more details.
  2188  //
  2189  //    You should have received a copy of the GNU Lesser General Public
  2190  //    License along with the GNU C Library; if not, see
  2191  //    <https://www.gnu.org/licenses/>.
  2192  
  2193  // Never include this file directly; use <sys/types.h> instead.
  2194  
  2195  // A time value that is accurate to the nearest
  2196  //
  2197  //	microsecond but also has a range of years.
  2198  type Timeval = struct {
  2199  	Ftv_sec  X__time_t
  2200  	Ftv_usec X__suseconds_t
  2201  } /* struct_timeval.h:8:1 */
  2202  
  2203  type Suseconds_t = X__suseconds_t /* time.h:28:23 */
  2204  
  2205  // `fd_set' type and related macros, and `select'/`pselect' declarations.
  2206  //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
  2207  //    This file is part of the GNU C Library.
  2208  //
  2209  //    The GNU C Library is free software; you can redistribute it and/or
  2210  //    modify it under the terms of the GNU Lesser General Public
  2211  //    License as published by the Free Software Foundation; either
  2212  //    version 2.1 of the License, or (at your option) any later version.
  2213  //
  2214  //    The GNU C Library is distributed in the hope that it will be useful,
  2215  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2216  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2217  //    Lesser General Public License for more details.
  2218  //
  2219  //    You should have received a copy of the GNU Lesser General Public
  2220  //    License along with the GNU C Library; if not, see
  2221  //    <https://www.gnu.org/licenses/>.
  2222  
  2223  //	POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
  2224  
  2225  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2226  //    This file is part of the GNU C Library.
  2227  //
  2228  //    The GNU C Library is free software; you can redistribute it and/or
  2229  //    modify it under the terms of the GNU Lesser General Public
  2230  //    License as published by the Free Software Foundation; either
  2231  //    version 2.1 of the License, or (at your option) any later version.
  2232  //
  2233  //    The GNU C Library is distributed in the hope that it will be useful,
  2234  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2235  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2236  //    Lesser General Public License for more details.
  2237  //
  2238  //    You should have received a copy of the GNU Lesser General Public
  2239  //    License along with the GNU C Library; if not, see
  2240  //    <https://www.gnu.org/licenses/>.
  2241  
  2242  // Get definition of needed basic types.
  2243  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2244  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2245  //    This file is part of the GNU C Library.
  2246  //
  2247  //    The GNU C Library is free software; you can redistribute it and/or
  2248  //    modify it under the terms of the GNU Lesser General Public
  2249  //    License as published by the Free Software Foundation; either
  2250  //    version 2.1 of the License, or (at your option) any later version.
  2251  //
  2252  //    The GNU C Library is distributed in the hope that it will be useful,
  2253  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2254  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2255  //    Lesser General Public License for more details.
  2256  //
  2257  //    You should have received a copy of the GNU Lesser General Public
  2258  //    License along with the GNU C Library; if not, see
  2259  //    <https://www.gnu.org/licenses/>.
  2260  
  2261  // Never include this file directly; use <sys/types.h> instead.
  2262  
  2263  // Get __FD_* definitions.
  2264  // Copyright (C) 1997-2020 Free Software Foundation, Inc.
  2265  //    This file is part of the GNU C Library.
  2266  //
  2267  //    The GNU C Library is free software; you can redistribute it and/or
  2268  //    modify it under the terms of the GNU Lesser General Public
  2269  //    License as published by the Free Software Foundation; either
  2270  //    version 2.1 of the License, or (at your option) any later version.
  2271  //
  2272  //    The GNU C Library is distributed in the hope that it will be useful,
  2273  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2274  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2275  //    Lesser General Public License for more details.
  2276  //
  2277  //    You should have received a copy of the GNU Lesser General Public
  2278  //    License along with the GNU C Library; if not, see
  2279  //    <https://www.gnu.org/licenses/>.
  2280  
  2281  // We don't use `memset' because this would require a prototype and
  2282  //    the array isn't too big.
  2283  
  2284  // Get sigset_t.
  2285  
  2286  // Get definition of timer specification structures.
  2287  // NB: Include guard matches what <linux/time.h> uses.
  2288  
  2289  // The fd_set member is required to be an array of longs.
  2290  type X__fd_mask = int64 /* select.h:49:18 */
  2291  
  2292  // Some versions of <linux/posix_types.h> define this macros.
  2293  // It's easier to assume 8-bit bytes than to get CHAR_BIT.
  2294  
  2295  // fd_set for select and pselect.
  2296  type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
  2297  
  2298  // Maximum number of file descriptors in `fd_set'.
  2299  
  2300  // Sometimes the fd_set member is assumed to have this type.
  2301  type Fd_mask = X__fd_mask /* select.h:77:19 */
  2302  
  2303  // Define some inlines helping to catch common problems.
  2304  
  2305  // Structure crudely representing a timezone.
  2306  //
  2307  //	This is obsolete and should never be used.
  2308  type Timezone = struct {
  2309  	Ftz_minuteswest int32
  2310  	Ftz_dsttime     int32
  2311  } /* time.h:52:1 */
  2312  
  2313  // Type of the second argument to `getitimer' and
  2314  //
  2315  //	the second and third arguments `setitimer'.
  2316  type Itimerval = struct {
  2317  	Fit_interval struct {
  2318  		Ftv_sec  X__time_t
  2319  		Ftv_usec X__suseconds_t
  2320  	}
  2321  	Fit_value struct {
  2322  		Ftv_sec  X__time_t
  2323  		Ftv_usec X__suseconds_t
  2324  	}
  2325  } /* time.h:105:1 */
  2326  
  2327  type X__itimer_which_t = int32 /* time.h:118:13 */
  2328  
  2329  // Convenience macros for operations on timevals.
  2330  //    NOTE: `timercmp' does not work for >= or <=.
  2331  
  2332  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2333  //    This file is part of the GNU C Library.
  2334  //
  2335  //    The GNU C Library is free software; you can redistribute it and/or
  2336  //    modify it under the terms of the GNU Lesser General Public
  2337  //    License as published by the Free Software Foundation; either
  2338  //    version 2.1 of the License, or (at your option) any later version.
  2339  //
  2340  //    The GNU C Library is distributed in the hope that it will be useful,
  2341  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2342  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2343  //    Lesser General Public License for more details.
  2344  //
  2345  //    You should have received a copy of the GNU Lesser General Public
  2346  //    License along with the GNU C Library; if not, see
  2347  //    <https://www.gnu.org/licenses/>.
  2348  
  2349  //	POSIX Standard: 2.6 Primitive System Data Types	<sys/types.h>
  2350  
  2351  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2352  //    This file is part of the GNU C Library.
  2353  //
  2354  //    The GNU C Library is free software; you can redistribute it and/or
  2355  //    modify it under the terms of the GNU Lesser General Public
  2356  //    License as published by the Free Software Foundation; either
  2357  //    version 2.1 of the License, or (at your option) any later version.
  2358  //
  2359  //    The GNU C Library is distributed in the hope that it will be useful,
  2360  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2361  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2362  //    Lesser General Public License for more details.
  2363  //
  2364  //    You should have received a copy of the GNU Lesser General Public
  2365  //    License along with the GNU C Library; if not, see
  2366  //    <https://www.gnu.org/licenses/>.
  2367  
  2368  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2369  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2370  //    This file is part of the GNU C Library.
  2371  //
  2372  //    The GNU C Library is free software; you can redistribute it and/or
  2373  //    modify it under the terms of the GNU Lesser General Public
  2374  //    License as published by the Free Software Foundation; either
  2375  //    version 2.1 of the License, or (at your option) any later version.
  2376  //
  2377  //    The GNU C Library is distributed in the hope that it will be useful,
  2378  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2379  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2380  //    Lesser General Public License for more details.
  2381  //
  2382  //    You should have received a copy of the GNU Lesser General Public
  2383  //    License along with the GNU C Library; if not, see
  2384  //    <https://www.gnu.org/licenses/>.
  2385  
  2386  // Never include this file directly; use <sys/types.h> instead.
  2387  
  2388  type U_char = X__u_char     /* types.h:33:18 */
  2389  type U_short = X__u_short   /* types.h:34:19 */
  2390  type U_int = X__u_int       /* types.h:35:17 */
  2391  type U_long = X__u_long     /* types.h:36:18 */
  2392  type Quad_t = X__quad_t     /* types.h:37:18 */
  2393  type U_quad_t = X__u_quad_t /* types.h:38:20 */
  2394  type Fsid_t = X__fsid_t     /* types.h:39:18 */
  2395  type Loff_t = X__loff_t     /* types.h:42:18 */
  2396  
  2397  type Ino_t = X__ino64_t /* types.h:49:19 */
  2398  
  2399  type Dev_t = X__dev_t /* types.h:59:17 */
  2400  
  2401  type Gid_t = X__gid_t /* types.h:64:17 */
  2402  
  2403  type Mode_t = X__mode_t /* types.h:69:18 */
  2404  
  2405  type Nlink_t = X__nlink_t /* types.h:74:19 */
  2406  
  2407  type Off_t = X__off64_t /* types.h:87:19 */
  2408  
  2409  type Id_t = X__id_t /* types.h:103:16 */
  2410  
  2411  type Ssize_t = X__ssize_t /* types.h:108:19 */
  2412  
  2413  type Daddr_t = X__daddr_t /* types.h:114:19 */
  2414  type Caddr_t = X__caddr_t /* types.h:115:19 */
  2415  
  2416  type Key_t = X__key_t /* types.h:121:17 */
  2417  
  2418  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2419  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2420  //    This file is part of the GNU C Library.
  2421  //
  2422  //    The GNU C Library is free software; you can redistribute it and/or
  2423  //    modify it under the terms of the GNU Lesser General Public
  2424  //    License as published by the Free Software Foundation; either
  2425  //    version 2.1 of the License, or (at your option) any later version.
  2426  //
  2427  //    The GNU C Library is distributed in the hope that it will be useful,
  2428  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2429  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2430  //    Lesser General Public License for more details.
  2431  //
  2432  //    You should have received a copy of the GNU Lesser General Public
  2433  //    License along with the GNU C Library; if not, see
  2434  //    <https://www.gnu.org/licenses/>.
  2435  
  2436  // Never include this file directly; use <sys/types.h> instead.
  2437  
  2438  // Returned by `clock'.
  2439  type Clock_t = X__clock_t /* clock_t.h:7:19 */
  2440  
  2441  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2442  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2443  //    This file is part of the GNU C Library.
  2444  //
  2445  //    The GNU C Library is free software; you can redistribute it and/or
  2446  //    modify it under the terms of the GNU Lesser General Public
  2447  //    License as published by the Free Software Foundation; either
  2448  //    version 2.1 of the License, or (at your option) any later version.
  2449  //
  2450  //    The GNU C Library is distributed in the hope that it will be useful,
  2451  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2452  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2453  //    Lesser General Public License for more details.
  2454  //
  2455  //    You should have received a copy of the GNU Lesser General Public
  2456  //    License along with the GNU C Library; if not, see
  2457  //    <https://www.gnu.org/licenses/>.
  2458  
  2459  // Never include this file directly; use <sys/types.h> instead.
  2460  
  2461  // Clock ID used in clock and timer functions.
  2462  type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
  2463  
  2464  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2465  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2466  //    This file is part of the GNU C Library.
  2467  //
  2468  //    The GNU C Library is free software; you can redistribute it and/or
  2469  //    modify it under the terms of the GNU Lesser General Public
  2470  //    License as published by the Free Software Foundation; either
  2471  //    version 2.1 of the License, or (at your option) any later version.
  2472  //
  2473  //    The GNU C Library is distributed in the hope that it will be useful,
  2474  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2475  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2476  //    Lesser General Public License for more details.
  2477  //
  2478  //    You should have received a copy of the GNU Lesser General Public
  2479  //    License along with the GNU C Library; if not, see
  2480  //    <https://www.gnu.org/licenses/>.
  2481  
  2482  // Never include this file directly; use <sys/types.h> instead.
  2483  
  2484  // Timer ID returned by `timer_create'.
  2485  type Timer_t = X__timer_t /* timer_t.h:7:19 */
  2486  
  2487  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  2488  //
  2489  // This file is part of GCC.
  2490  //
  2491  // GCC is free software; you can redistribute it and/or modify
  2492  // it under the terms of the GNU General Public License as published by
  2493  // the Free Software Foundation; either version 3, or (at your option)
  2494  // any later version.
  2495  //
  2496  // GCC is distributed in the hope that it will be useful,
  2497  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2498  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2499  // GNU General Public License for more details.
  2500  //
  2501  // Under Section 7 of GPL version 3, you are granted additional
  2502  // permissions described in the GCC Runtime Library Exception, version
  2503  // 3.1, as published by the Free Software Foundation.
  2504  //
  2505  // You should have received a copy of the GNU General Public License and
  2506  // a copy of the GCC Runtime Library Exception along with this program;
  2507  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  2508  // <http://www.gnu.org/licenses/>.
  2509  
  2510  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  2511  
  2512  // Any one of these symbols __need_* means that GNU libc
  2513  //    wants us just to define one data type.  So don't define
  2514  //    the symbols that indicate this file's entire job has been done.
  2515  
  2516  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  2517  //    There's no way to win with the other order!  Sun lossage.
  2518  
  2519  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  2520  //    Just ignore it.
  2521  
  2522  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  2523  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  2524  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  2525  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  2526  //    If we find that the macros are still defined at this point, we must
  2527  //    invoke them so that the type is defined as expected.
  2528  
  2529  // In case nobody has defined these types, but we aren't running under
  2530  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  2531  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  2532  //    parts of GCC is compiled by an older compiler, that actually
  2533  //    include gstddef.h, such as collect2.
  2534  
  2535  // Signed type of difference of two pointers.
  2536  
  2537  // Define this type if we are doing the whole job,
  2538  //    or if we want this type in particular.
  2539  
  2540  // Unsigned type of `sizeof' something.
  2541  
  2542  // Define this type if we are doing the whole job,
  2543  //    or if we want this type in particular.
  2544  
  2545  // Wide character type.
  2546  //    Locale-writers should change this as necessary to
  2547  //    be big enough to hold unique values not between 0 and 127,
  2548  //    and not (wchar_t) -1, for each defined multibyte character.
  2549  
  2550  // Define this type if we are doing the whole job,
  2551  //    or if we want this type in particular.
  2552  
  2553  // A null pointer constant.
  2554  
  2555  // Old compatibility names for C types.
  2556  type Ulong = uint64  /* types.h:148:27 */
  2557  type Ushort = uint16 /* types.h:149:28 */
  2558  type Uint = uint32   /* types.h:150:22 */
  2559  
  2560  // These size-specific names are used by some of the inet code.
  2561  
  2562  // Define intN_t types.
  2563  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2564  //    This file is part of the GNU C Library.
  2565  //
  2566  //    The GNU C Library is free software; you can redistribute it and/or
  2567  //    modify it under the terms of the GNU Lesser General Public
  2568  //    License as published by the Free Software Foundation; either
  2569  //    version 2.1 of the License, or (at your option) any later version.
  2570  //
  2571  //    The GNU C Library is distributed in the hope that it will be useful,
  2572  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2573  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2574  //    Lesser General Public License for more details.
  2575  //
  2576  //    You should have received a copy of the GNU Lesser General Public
  2577  //    License along with the GNU C Library; if not, see
  2578  //    <https://www.gnu.org/licenses/>.
  2579  
  2580  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2581  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2582  //    This file is part of the GNU C Library.
  2583  //
  2584  //    The GNU C Library is free software; you can redistribute it and/or
  2585  //    modify it under the terms of the GNU Lesser General Public
  2586  //    License as published by the Free Software Foundation; either
  2587  //    version 2.1 of the License, or (at your option) any later version.
  2588  //
  2589  //    The GNU C Library is distributed in the hope that it will be useful,
  2590  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2591  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2592  //    Lesser General Public License for more details.
  2593  //
  2594  //    You should have received a copy of the GNU Lesser General Public
  2595  //    License along with the GNU C Library; if not, see
  2596  //    <https://www.gnu.org/licenses/>.
  2597  
  2598  // Never include this file directly; use <sys/types.h> instead.
  2599  
  2600  type Int8_t = X__int8_t   /* stdint-intn.h:24:18 */
  2601  type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
  2602  type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
  2603  type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
  2604  
  2605  // These were defined by ISO C without the first `_'.
  2606  type U_int8_t = X__uint8_t   /* types.h:158:19 */
  2607  type U_int16_t = X__uint16_t /* types.h:159:20 */
  2608  type U_int32_t = X__uint32_t /* types.h:160:20 */
  2609  type U_int64_t = X__uint64_t /* types.h:161:20 */
  2610  
  2611  type Register_t = int32 /* types.h:164:13 */
  2612  
  2613  // It also defines `fd_set' and the FD_* macros for `select'.
  2614  // `fd_set' type and related macros, and `select'/`pselect' declarations.
  2615  //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
  2616  //    This file is part of the GNU C Library.
  2617  //
  2618  //    The GNU C Library is free software; you can redistribute it and/or
  2619  //    modify it under the terms of the GNU Lesser General Public
  2620  //    License as published by the Free Software Foundation; either
  2621  //    version 2.1 of the License, or (at your option) any later version.
  2622  //
  2623  //    The GNU C Library is distributed in the hope that it will be useful,
  2624  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2625  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2626  //    Lesser General Public License for more details.
  2627  //
  2628  //    You should have received a copy of the GNU Lesser General Public
  2629  //    License along with the GNU C Library; if not, see
  2630  //    <https://www.gnu.org/licenses/>.
  2631  
  2632  //	POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
  2633  
  2634  type Blksize_t = X__blksize_t /* types.h:185:21 */
  2635  
  2636  // Types from the Large File Support interface.
  2637  type Blkcnt_t = X__blkcnt64_t     /* types.h:205:22 */ // Type to count number of disk blocks.
  2638  type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
  2639  type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
  2640  
  2641  // Now add the thread types.
  2642  // Declaration of common pthread types for all architectures.
  2643  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2644  //    This file is part of the GNU C Library.
  2645  //
  2646  //    The GNU C Library is free software; you can redistribute it and/or
  2647  //    modify it under the terms of the GNU Lesser General Public
  2648  //    License as published by the Free Software Foundation; either
  2649  //    version 2.1 of the License, or (at your option) any later version.
  2650  //
  2651  //    The GNU C Library is distributed in the hope that it will be useful,
  2652  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2653  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2654  //    Lesser General Public License for more details.
  2655  //
  2656  //    You should have received a copy of the GNU Lesser General Public
  2657  //    License along with the GNU C Library; if not, see
  2658  //    <https://www.gnu.org/licenses/>.
  2659  
  2660  // For internal mutex and condition variable definitions.
  2661  // Common threading primitives definitions for both POSIX and C11.
  2662  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2663  //    This file is part of the GNU C Library.
  2664  //
  2665  //    The GNU C Library is free software; you can redistribute it and/or
  2666  //    modify it under the terms of the GNU Lesser General Public
  2667  //    License as published by the Free Software Foundation; either
  2668  //    version 2.1 of the License, or (at your option) any later version.
  2669  //
  2670  //    The GNU C Library is distributed in the hope that it will be useful,
  2671  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2672  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2673  //    Lesser General Public License for more details.
  2674  //
  2675  //    You should have received a copy of the GNU Lesser General Public
  2676  //    License along with the GNU C Library; if not, see
  2677  //    <https://www.gnu.org/licenses/>.
  2678  
  2679  // Arch-specific definitions.  Each architecture must define the following
  2680  //    macros to define the expected sizes of pthread data types:
  2681  //
  2682  //    __SIZEOF_PTHREAD_ATTR_T        - size of pthread_attr_t.
  2683  //    __SIZEOF_PTHREAD_MUTEX_T       - size of pthread_mutex_t.
  2684  //    __SIZEOF_PTHREAD_MUTEXATTR_T   - size of pthread_mutexattr_t.
  2685  //    __SIZEOF_PTHREAD_COND_T        - size of pthread_cond_t.
  2686  //    __SIZEOF_PTHREAD_CONDATTR_T    - size of pthread_condattr_t.
  2687  //    __SIZEOF_PTHREAD_RWLOCK_T      - size of pthread_rwlock_t.
  2688  //    __SIZEOF_PTHREAD_RWLOCKATTR_T  - size of pthread_rwlockattr_t.
  2689  //    __SIZEOF_PTHREAD_BARRIER_T     - size of pthread_barrier_t.
  2690  //    __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  2691  //
  2692  //    The additional macro defines any constraint for the lock alignment
  2693  //    inside the thread structures:
  2694  //
  2695  //    __LOCK_ALIGNMENT - for internal lock/futex usage.
  2696  //
  2697  //    Same idea but for the once locking primitive:
  2698  //
  2699  //    __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  2700  
  2701  // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2702  //
  2703  //    This file is part of the GNU C Library.
  2704  //
  2705  //    The GNU C Library is free software; you can redistribute it and/or
  2706  //    modify it under the terms of the GNU Lesser General Public
  2707  //    License as published by the Free Software Foundation; either
  2708  //    version 2.1 of the License, or (at your option) any later version.
  2709  //
  2710  //    The GNU C Library is distributed in the hope that it will be useful,
  2711  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2712  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2713  //    Lesser General Public License for more details.
  2714  //
  2715  //    You should have received a copy of the GNU Lesser General Public
  2716  //    License along with the GNU C Library; if not, see
  2717  //    <https://www.gnu.org/licenses/>.
  2718  
  2719  // Endian macros for string.h functions
  2720  //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
  2721  //    This file is part of the GNU C Library.
  2722  //
  2723  //    The GNU C Library is free software; you can redistribute it and/or
  2724  //    modify it under the terms of the GNU Lesser General Public
  2725  //    License as published by the Free Software Foundation; either
  2726  //    version 2.1 of the License, or (at your option) any later version.
  2727  //
  2728  //    The GNU C Library is distributed in the hope that it will be useful,
  2729  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2730  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2731  //    Lesser General Public License for more details.
  2732  //
  2733  //    You should have received a copy of the GNU Lesser General Public
  2734  //    License along with the GNU C Library; if not, see
  2735  //    <http://www.gnu.org/licenses/>.
  2736  
  2737  // Common definition of pthread_mutex_t.
  2738  
  2739  type X__pthread_internal_list = struct {
  2740  	F__prev uintptr
  2741  	F__next uintptr
  2742  } /* thread-shared-types.h:49:9 */
  2743  
  2744  // Type to count file system inodes.
  2745  
  2746  // Now add the thread types.
  2747  // Declaration of common pthread types for all architectures.
  2748  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2749  //    This file is part of the GNU C Library.
  2750  //
  2751  //    The GNU C Library is free software; you can redistribute it and/or
  2752  //    modify it under the terms of the GNU Lesser General Public
  2753  //    License as published by the Free Software Foundation; either
  2754  //    version 2.1 of the License, or (at your option) any later version.
  2755  //
  2756  //    The GNU C Library is distributed in the hope that it will be useful,
  2757  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2758  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2759  //    Lesser General Public License for more details.
  2760  //
  2761  //    You should have received a copy of the GNU Lesser General Public
  2762  //    License along with the GNU C Library; if not, see
  2763  //    <https://www.gnu.org/licenses/>.
  2764  
  2765  // For internal mutex and condition variable definitions.
  2766  // Common threading primitives definitions for both POSIX and C11.
  2767  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2768  //    This file is part of the GNU C Library.
  2769  //
  2770  //    The GNU C Library is free software; you can redistribute it and/or
  2771  //    modify it under the terms of the GNU Lesser General Public
  2772  //    License as published by the Free Software Foundation; either
  2773  //    version 2.1 of the License, or (at your option) any later version.
  2774  //
  2775  //    The GNU C Library is distributed in the hope that it will be useful,
  2776  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2777  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2778  //    Lesser General Public License for more details.
  2779  //
  2780  //    You should have received a copy of the GNU Lesser General Public
  2781  //    License along with the GNU C Library; if not, see
  2782  //    <https://www.gnu.org/licenses/>.
  2783  
  2784  // Arch-specific definitions.  Each architecture must define the following
  2785  //    macros to define the expected sizes of pthread data types:
  2786  //
  2787  //    __SIZEOF_PTHREAD_ATTR_T        - size of pthread_attr_t.
  2788  //    __SIZEOF_PTHREAD_MUTEX_T       - size of pthread_mutex_t.
  2789  //    __SIZEOF_PTHREAD_MUTEXATTR_T   - size of pthread_mutexattr_t.
  2790  //    __SIZEOF_PTHREAD_COND_T        - size of pthread_cond_t.
  2791  //    __SIZEOF_PTHREAD_CONDATTR_T    - size of pthread_condattr_t.
  2792  //    __SIZEOF_PTHREAD_RWLOCK_T      - size of pthread_rwlock_t.
  2793  //    __SIZEOF_PTHREAD_RWLOCKATTR_T  - size of pthread_rwlockattr_t.
  2794  //    __SIZEOF_PTHREAD_BARRIER_T     - size of pthread_barrier_t.
  2795  //    __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  2796  //
  2797  //    The additional macro defines any constraint for the lock alignment
  2798  //    inside the thread structures:
  2799  //
  2800  //    __LOCK_ALIGNMENT - for internal lock/futex usage.
  2801  //
  2802  //    Same idea but for the once locking primitive:
  2803  //
  2804  //    __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  2805  
  2806  // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2807  //
  2808  //    This file is part of the GNU C Library.
  2809  //
  2810  //    The GNU C Library is free software; you can redistribute it and/or
  2811  //    modify it under the terms of the GNU Lesser General Public
  2812  //    License as published by the Free Software Foundation; either
  2813  //    version 2.1 of the License, or (at your option) any later version.
  2814  //
  2815  //    The GNU C Library is distributed in the hope that it will be useful,
  2816  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2817  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2818  //    Lesser General Public License for more details.
  2819  //
  2820  //    You should have received a copy of the GNU Lesser General Public
  2821  //    License along with the GNU C Library; if not, see
  2822  //    <https://www.gnu.org/licenses/>.
  2823  
  2824  // Endian macros for string.h functions
  2825  //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
  2826  //    This file is part of the GNU C Library.
  2827  //
  2828  //    The GNU C Library is free software; you can redistribute it and/or
  2829  //    modify it under the terms of the GNU Lesser General Public
  2830  //    License as published by the Free Software Foundation; either
  2831  //    version 2.1 of the License, or (at your option) any later version.
  2832  //
  2833  //    The GNU C Library is distributed in the hope that it will be useful,
  2834  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2835  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2836  //    Lesser General Public License for more details.
  2837  //
  2838  //    You should have received a copy of the GNU Lesser General Public
  2839  //    License along with the GNU C Library; if not, see
  2840  //    <http://www.gnu.org/licenses/>.
  2841  
  2842  // Common definition of pthread_mutex_t.
  2843  
  2844  type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
  2845  
  2846  type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
  2847  
  2848  type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
  2849  
  2850  // Arch-specific mutex definitions.  A generic implementation is provided
  2851  //    by sysdeps/nptl/bits/struct_mutex.h.  If required, an architecture
  2852  //    can override it by defining:
  2853  //
  2854  //    1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
  2855  //       definition).  It should contains at least the internal members
  2856  //       defined in the generic version.
  2857  //
  2858  //    2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
  2859  //       atomic operations.
  2860  //
  2861  //    3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
  2862  //       It should initialize the mutex internal flag.
  2863  
  2864  // Default mutex implementation struct definitions.
  2865  //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
  2866  //    This file is part of the GNU C Library.
  2867  //
  2868  //    The GNU C Library is free software; you can redistribute it and/or
  2869  //    modify it under the terms of the GNU Lesser General Public
  2870  //    License as published by the Free Software Foundation; either
  2871  //    version 2.1 of the License, or (at your option) any later version.
  2872  //
  2873  //    The GNU C Library is distributed in the hope that it will be useful,
  2874  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2875  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2876  //    Lesser General Public License for more details.
  2877  //
  2878  //    You should have received a copy of the GNU Lesser General Public
  2879  //    License along with the GNU C Library; if not, see
  2880  //    <http://www.gnu.org/licenses/>.
  2881  
  2882  // Generic struct for both POSIX and C11 mutexes.  New ports are expected
  2883  //    to use the default layout, however architecture can redefine it to
  2884  //    add arch-specific extension (such as lock-elision).  The struct have
  2885  //    a size of 32 bytes on LP32 and 40 bytes on LP64 architectures.
  2886  
  2887  type X__pthread_mutex_s = struct {
  2888  	F__lock   int32
  2889  	F__count  uint32
  2890  	F__owner  int32
  2891  	F__nusers uint32
  2892  	F__kind   int32
  2893  	F__spins  int32
  2894  	F__list   X__pthread_list_t
  2895  } /* struct_mutex.h:27:1 */
  2896  
  2897  // Arch-sepecific read-write lock definitions.  A generic implementation is
  2898  //    provided by struct_rwlock.h.  If required, an architecture can override it
  2899  //    by defining:
  2900  //
  2901  //    1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
  2902  //       It should contain at least the internal members defined in the
  2903  //       generic version.
  2904  //
  2905  //    2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
  2906  //       It should initialize the rwlock internal type.
  2907  
  2908  // AArch64 internal rwlock struct definitions.
  2909  //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
  2910  //
  2911  //    This file is part of the GNU C Library.
  2912  //
  2913  //    The GNU C Library is free software; you can redistribute it and/or
  2914  //    modify it under the terms of the GNU Lesser General Public
  2915  //    License as published by the Free Software Foundation; either
  2916  //    version 2.1 of the License, or (at your option) any later version.
  2917  //
  2918  //    The GNU C Library is distributed in the hope that it will be useful,
  2919  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2920  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2921  //    Lesser General Public License for more details.
  2922  //
  2923  //    You should have received a copy of the GNU Lesser General Public
  2924  //    License along with the GNU C Library; if not, see
  2925  //    <http://www.gnu.org/licenses/>.
  2926  
  2927  type X__pthread_rwlock_arch_t = struct {
  2928  	F__readers       uint32
  2929  	F__writers       uint32
  2930  	F__wrphase_futex uint32
  2931  	F__writers_futex uint32
  2932  	F__pad3          uint32
  2933  	F__pad4          uint32
  2934  	F__cur_writer    int32
  2935  	F__shared        int32
  2936  	F__pad1          uint64
  2937  	F__pad2          uint64
  2938  	F__flags         uint32
  2939  	F__ccgo_pad1     [4]byte
  2940  } /* struct_rwlock.h:23:1 */
  2941  
  2942  // Common definition of pthread_cond_t.
  2943  
  2944  type X__pthread_cond_s = struct {
  2945  	F__0            struct{ F__wseq uint64 }
  2946  	F__8            struct{ F__g1_start uint64 }
  2947  	F__g_refs       [2]uint32
  2948  	F__g_size       [2]uint32
  2949  	F__g1_orig_size uint32
  2950  	F__wrefs        uint32
  2951  	F__g_signals    [2]uint32
  2952  } /* thread-shared-types.h:92:1 */
  2953  
  2954  // Thread identifiers.  The structure of the attribute type is not
  2955  //
  2956  //	exposed on purpose.
  2957  type Pthread_t = uint64 /* pthreadtypes.h:27:27 */
  2958  
  2959  // Data structures for mutex handling.  The structure of the attribute
  2960  //
  2961  //	type is not exposed on purpose.
  2962  type Pthread_mutexattr_t = struct {
  2963  	F__ccgo_pad1 [0]uint32
  2964  	F__size      [8]uint8
  2965  } /* pthreadtypes.h:36:3 */
  2966  
  2967  // Data structure for condition variable handling.  The structure of
  2968  //
  2969  //	the attribute type is not exposed on purpose.
  2970  type Pthread_condattr_t = struct {
  2971  	F__ccgo_pad1 [0]uint32
  2972  	F__size      [8]uint8
  2973  } /* pthreadtypes.h:45:3 */
  2974  
  2975  // Keys for thread-specific data
  2976  type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
  2977  
  2978  // Once-only execution
  2979  type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
  2980  
  2981  type Pthread_mutex_t = struct {
  2982  	F__data      X__pthread_mutex_s
  2983  	F__ccgo_pad1 [8]byte
  2984  } /* pthreadtypes.h:72:3 */
  2985  
  2986  type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */
  2987  
  2988  // Data structure for reader-writer lock variable handling.  The
  2989  //
  2990  //	structure of the attribute type is deliberately not exposed.
  2991  type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
  2992  
  2993  type Pthread_rwlockattr_t = struct {
  2994  	F__ccgo_pad1 [0]uint64
  2995  	F__size      [8]uint8
  2996  } /* pthreadtypes.h:97:3 */
  2997  
  2998  // POSIX spinlock data type.
  2999  type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
  3000  
  3001  // POSIX barriers data type.  The structure of the type is
  3002  //
  3003  //	deliberately not exposed.
  3004  type Pthread_barrier_t = struct {
  3005  	F__ccgo_pad1 [0]uint64
  3006  	F__size      [32]uint8
  3007  } /* pthreadtypes.h:112:3 */
  3008  
  3009  type Pthread_barrierattr_t = struct {
  3010  	F__ccgo_pad1 [0]uint32
  3011  	F__size      [8]uint8
  3012  } /* pthreadtypes.h:118:3 */
  3013  
  3014  // Copyright (C) 2009-2020 Free Software Foundation, Inc.
  3015  //
  3016  //    This file is part of the GNU C Library.
  3017  //
  3018  //    The GNU C Library is free software; you can redistribute it and/or
  3019  //    modify it under the terms of the GNU Lesser General Public License as
  3020  //    published by the Free Software Foundation; either version 2.1 of the
  3021  //    License, or (at your option) any later version.
  3022  //
  3023  //    The GNU C Library is distributed in the hope that it will be useful,
  3024  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3025  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3026  //    Lesser General Public License for more details.
  3027  //
  3028  //    You should have received a copy of the GNU Lesser General Public
  3029  //    License along with the GNU C Library; if not, see
  3030  //    <https://www.gnu.org/licenses/>.
  3031  
  3032  type User_regs_struct = struct {
  3033  	Fregs   [31]uint64
  3034  	Fsp     uint64
  3035  	Fpc     uint64
  3036  	Fpstate uint64
  3037  } /* user.h:22:1 */
  3038  
  3039  type User_fpsimd_struct = struct {
  3040  	Fvregs [32]X__uint128_t
  3041  	Ffpsr  uint32
  3042  	Ffpcr  uint32
  3043  } /* user.h:30:1 */
  3044  
  3045  // bits/procfs.h, provided by each architecture, must define
  3046  //    elf_gregset_t, elf_fpregset_t and any other architecture-specific
  3047  //    types needed.
  3048  // Types for registers for sys/procfs.h.  AArch64 version.
  3049  //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
  3050  //
  3051  //    This file is part of the GNU C Library.
  3052  //
  3053  //    The GNU C Library is free software; you can redistribute it and/or
  3054  //    modify it under the terms of the GNU Lesser General Public
  3055  //    License as published by the Free Software Foundation; either
  3056  //    version 2.1 of the License, or (at your option) any later version.
  3057  //
  3058  //    The GNU C Library is distributed in the hope that it will be useful,
  3059  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3060  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3061  //    Lesser General Public License for more details.
  3062  //
  3063  //    You should have received a copy of the GNU Lesser General Public
  3064  //    License along with the GNU C Library; if not, see
  3065  //    <https://www.gnu.org/licenses/>.
  3066  
  3067  // Type for a general-purpose register.
  3068  type Elf_greg_t = X__uint64_t /* procfs.h:25:20 */
  3069  
  3070  // And the whole bunch of them.  We could have used `struct
  3071  //
  3072  //	pt_regs' directly in the typedef, but tradition says that
  3073  //	the register set is an array, which does have some peculiar
  3074  //	semantics, so leave it that way.
  3075  type Elf_gregset_t = [34]Elf_greg_t /* procfs.h:32:20 */
  3076  
  3077  // Register set for the floating-point registers.
  3078  type Elf_fpregset_t = User_fpsimd_struct /* procfs.h:35:35 */
  3079  
  3080  // bits/procfs-id.h must define __pr_uid_t and __pr_gid_t, the types
  3081  //    of pr_uid and pr_gid.
  3082  // Types of pr_uid and pr_gid in struct elf_prpsinfo.  Generic Linux version.
  3083  //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
  3084  //
  3085  //    This file is part of the GNU C Library.
  3086  //
  3087  //    The GNU C Library is free software; you can redistribute it and/or
  3088  //    modify it under the terms of the GNU Lesser General Public
  3089  //    License as published by the Free Software Foundation; either
  3090  //    version 2.1 of the License, or (at your option) any later version.
  3091  //
  3092  //    The GNU C Library is distributed in the hope that it will be useful,
  3093  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3094  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3095  //    Lesser General Public License for more details.
  3096  //
  3097  //    You should have received a copy of the GNU Lesser General Public
  3098  //    License along with the GNU C Library; if not, see
  3099  //    <https://www.gnu.org/licenses/>.
  3100  
  3101  type X__pr_uid_t = uint32 /* procfs-id.h:24:22 */
  3102  type X__pr_gid_t = uint32 /* procfs-id.h:25:22 */
  3103  
  3104  // Signal info.
  3105  type Elf_siginfo = struct {
  3106  	Fsi_signo int32
  3107  	Fsi_code  int32
  3108  	Fsi_errno int32
  3109  } /* procfs.h:49:1 */
  3110  
  3111  // Definitions to generate Intel SVR4-like core files.  These mostly
  3112  //    have the same names as the SVR4 types with "elf_" tacked on the
  3113  //    front to prevent clashes with Linux definitions, and the typedef
  3114  //    forms have been avoided.  This is mostly like the SVR4 structure,
  3115  //    but more Linuxy, with things that Linux does not support and which
  3116  //    GDB doesn't really use excluded.
  3117  
  3118  type Elf_prstatus = struct {
  3119  	Fpr_info struct {
  3120  		Fsi_signo int32
  3121  		Fsi_code  int32
  3122  		Fsi_errno int32
  3123  	}
  3124  	Fpr_cursig   int16
  3125  	F__ccgo_pad1 [2]byte
  3126  	Fpr_sigpend  uint64
  3127  	Fpr_sighold  uint64
  3128  	Fpr_pid      X__pid_t
  3129  	Fpr_ppid     X__pid_t
  3130  	Fpr_pgrp     X__pid_t
  3131  	Fpr_sid      X__pid_t
  3132  	Fpr_utime    struct {
  3133  		Ftv_sec  X__time_t
  3134  		Ftv_usec X__suseconds_t
  3135  	}
  3136  	Fpr_stime struct {
  3137  		Ftv_sec  X__time_t
  3138  		Ftv_usec X__suseconds_t
  3139  	}
  3140  	Fpr_cutime struct {
  3141  		Ftv_sec  X__time_t
  3142  		Ftv_usec X__suseconds_t
  3143  	}
  3144  	Fpr_cstime struct {
  3145  		Ftv_sec  X__time_t
  3146  		Ftv_usec X__suseconds_t
  3147  	}
  3148  	Fpr_reg      Elf_gregset_t
  3149  	Fpr_fpvalid  int32
  3150  	F__ccgo_pad2 [4]byte
  3151  } /* procfs.h:63:1 */
  3152  
  3153  type Elf_prpsinfo = struct {
  3154  	Fpr_state    uint8
  3155  	Fpr_sname    uint8
  3156  	Fpr_zomb     uint8
  3157  	Fpr_nice     uint8
  3158  	F__ccgo_pad1 [4]byte
  3159  	Fpr_flag     uint64
  3160  	Fpr_uid      X__pr_uid_t
  3161  	Fpr_gid      X__pr_gid_t
  3162  	Fpr_pid      int32
  3163  	Fpr_ppid     int32
  3164  	Fpr_pgrp     int32
  3165  	Fpr_sid      int32
  3166  	Fpr_fname    [16]uint8
  3167  	Fpr_psargs   [80]uint8
  3168  } /* procfs.h:84:1 */
  3169  
  3170  // The rest of this file provides the types for emulation of the
  3171  //    Solaris <proc_service.h> interfaces that should be implemented by
  3172  //    users of libthread_db.
  3173  
  3174  // Addresses.
  3175  type Psaddr_t = uintptr /* procfs.h:104:14 */
  3176  
  3177  // Types of prgregset_t and prfpregset_t.  Generic Linux version.
  3178  //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
  3179  //
  3180  //    This file is part of the GNU C Library.
  3181  //
  3182  //    The GNU C Library is free software; you can redistribute it and/or
  3183  //    modify it under the terms of the GNU Lesser General Public
  3184  //    License as published by the Free Software Foundation; either
  3185  //    version 2.1 of the License, or (at your option) any later version.
  3186  //
  3187  //    The GNU C Library is distributed in the hope that it will be useful,
  3188  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3189  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3190  //    Lesser General Public License for more details.
  3191  //
  3192  //    You should have received a copy of the GNU Lesser General Public
  3193  //    License along with the GNU C Library; if not, see
  3194  //    <https://www.gnu.org/licenses/>.
  3195  
  3196  type X__prgregset_t = Elf_gregset_t   /* procfs-prregset.h:24:23 */
  3197  type X__prfpregset_t = Elf_fpregset_t /* procfs-prregset.h:25:24 */
  3198  
  3199  // Register sets.  Linux has different names.
  3200  type Prgregset_t = X__prgregset_t   /* procfs.h:109:23 */
  3201  type Prfpregset_t = X__prfpregset_t /* procfs.h:110:24 */
  3202  
  3203  // We don't have any differences between processes and threads,
  3204  //
  3205  //	therefore have only one PID type.
  3206  type Lwpid_t = X__pid_t /* procfs.h:114:17 */
  3207  
  3208  // Process status and info.  In the end we do provide typedefs for them.
  3209  type Prstatus_t = Elf_prstatus /* procfs.h:117:29 */
  3210  type Prpsinfo_t = Elf_prpsinfo /* procfs.h:118:29 */
  3211  
  3212  // On some architectures, provide other-ABI variants of the above
  3213  //    types.
  3214  // Extra sys/procfs.h definitions.  Generic Linux version.
  3215  //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
  3216  //
  3217  //    This file is part of the GNU C Library.
  3218  //
  3219  //    The GNU C Library is free software; you can redistribute it and/or
  3220  //    modify it under the terms of the GNU Lesser General Public
  3221  //    License as published by the Free Software Foundation; either
  3222  //    version 2.1 of the License, or (at your option) any later version.
  3223  //
  3224  //    The GNU C Library is distributed in the hope that it will be useful,
  3225  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3226  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3227  //    Lesser General Public License for more details.
  3228  //
  3229  //    You should have received a copy of the GNU Lesser General Public
  3230  //    License along with the GNU C Library; if not, see
  3231  //    <https://www.gnu.org/licenses/>.
  3232  
  3233  type Greg_t = Elf_greg_t /* ucontext.h:39:20 */
  3234  
  3235  // Container for all general registers.
  3236  type Gregset_t = Elf_gregset_t /* ucontext.h:42:23 */
  3237  
  3238  // Structure to describe FPU registers.
  3239  type Fpregset_t = Elf_fpregset_t /* ucontext.h:45:24 */
  3240  
  3241  // Context to describe whole processor state.  This only describes
  3242  //
  3243  //	the core registers; coprocessor registers get saved elsewhere
  3244  //	(e.g. in uc_regspace, or somewhere unspecified on the stack
  3245  //	during non-RT signal handlers).
  3246  type Mcontext_t = struct {
  3247  	Ffault_address uint64
  3248  	Fregs          [31]uint64
  3249  	Fsp            uint64
  3250  	Fpc            uint64
  3251  	Fpstate        uint64
  3252  	F__reserved    [4096]uint8
  3253  } /* ucontext.h:64:5 */
  3254  
  3255  // Userlevel context.
  3256  type Ucontext_t1 = struct {
  3257  	Fuc_flags    uint64
  3258  	Fuc_link     uintptr
  3259  	Fuc_stack    Stack_t
  3260  	Fuc_sigmask  Sigset_t
  3261  	Fuc_mcontext Mcontext_t
  3262  } /* ucontext.h:67:9 */
  3263  
  3264  // Userlevel context.
  3265  type Ucontext_t = Ucontext_t1 /* ucontext.h:74:5 */
  3266  
  3267  // Define struct sigstack.
  3268  //    Copyright (C) 1998-2020 Free Software Foundation, Inc.
  3269  //    This file is part of the GNU C Library.
  3270  //
  3271  //    The GNU C Library is free software; you can redistribute it and/or
  3272  //    modify it under the terms of the GNU Lesser General Public
  3273  //    License as published by the Free Software Foundation; either
  3274  //    version 2.1 of the License, or (at your option) any later version.
  3275  //
  3276  //    The GNU C Library is distributed in the hope that it will be useful,
  3277  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3278  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3279  //    Lesser General Public License for more details.
  3280  //
  3281  //    You should have received a copy of the GNU Lesser General Public
  3282  //    License along with the GNU C Library; if not, see
  3283  //    <https://www.gnu.org/licenses/>.
  3284  
  3285  // Structure describing a signal stack (obsolete).
  3286  type Sigstack = struct {
  3287  	Fss_sp       uintptr
  3288  	Fss_onstack  int32
  3289  	F__ccgo_pad1 [4]byte
  3290  } /* struct_sigstack.h:23:1 */
  3291  
  3292  // System-specific extensions.
  3293  // System-specific extensions of <signal.h>, Linux version.
  3294  //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
  3295  //    This file is part of the GNU C Library.
  3296  //
  3297  //    The GNU C Library is free software; you can redistribute it and/or
  3298  //    modify it under the terms of the GNU Lesser General Public
  3299  //    License as published by the Free Software Foundation; either
  3300  //    version 2.1 of the License, or (at your option) any later version.
  3301  //
  3302  //    The GNU C Library is distributed in the hope that it will be useful,
  3303  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3304  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3305  //    Lesser General Public License for more details.
  3306  //
  3307  //    You should have received a copy of the GNU Lesser General Public
  3308  //    License along with the GNU C Library; if not, see
  3309  //    <https://www.gnu.org/licenses/>.
  3310  
  3311  var _ uint8 /* gen.c:2:13: */