signal_linux_riscv64.go (102721B)
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_riscv64.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 MINSIGSTKSZ = 2048 19 NGREG = 32 20 NSIG = 65 21 REG_A0 = 10 22 REG_NARGS = 8 23 REG_PC = 0 24 REG_RA = 1 25 REG_S0 = 8 26 REG_S1 = 9 27 REG_S2 = 18 28 REG_SP = 2 29 REG_TP = 4 30 SA_INTERRUPT = 0x20000000 31 SA_NOCLDSTOP = 1 32 SA_NOCLDWAIT = 2 33 SA_NODEFER = 0x40000000 34 SA_NOMASK = 1073741824 35 SA_ONESHOT = 2147483648 36 SA_ONSTACK = 0x08000000 37 SA_RESETHAND = 0x80000000 38 SA_RESTART = 0x10000000 39 SA_SIGINFO = 4 40 SA_STACK = 134217728 41 SIGABRT = 6 42 SIGALRM = 14 43 SIGBUS = 7 44 SIGCHLD = 17 45 SIGCLD = 17 46 SIGCONT = 18 47 SIGFPE = 8 48 SIGHUP = 1 49 SIGILL = 4 50 SIGINT = 2 51 SIGIO = 29 52 SIGIOT = 6 53 SIGKILL = 9 54 SIGPIPE = 13 55 SIGPOLL = 29 56 SIGPROF = 27 57 SIGPWR = 30 58 SIGQUIT = 3 59 SIGSEGV = 11 60 SIGSTKFLT = 16 61 SIGSTKSZ = 8192 62 SIGSTOP = 19 63 SIGSYS = 31 64 SIGTERM = 15 65 SIGTRAP = 5 66 SIGTSTP = 20 67 SIGTTIN = 21 68 SIGTTOU = 22 69 SIGURG = 23 70 SIGUSR1 = 10 71 SIGUSR2 = 12 72 SIGVTALRM = 26 73 SIGWINCH = 28 74 SIGXCPU = 24 75 SIGXFSZ = 25 76 SIG_BLOCK = 0 77 SIG_SETMASK = 2 78 SIG_UNBLOCK = 1 79 X_ATFILE_SOURCE = 1 80 X_BITS_ENDIANNESS_H = 1 81 X_BITS_ENDIAN_H = 1 82 X_BITS_PTHREADTYPES_ARCH_H = 1 83 X_BITS_PTHREADTYPES_COMMON_H = 1 84 X_BITS_SIGACTION_H = 1 85 X_BITS_SIGCONTEXT_H = 1 86 X_BITS_SIGEVENT_CONSTS_H = 1 87 X_BITS_SIGINFO_ARCH_H = 1 88 X_BITS_SIGINFO_CONSTS_H = 1 89 X_BITS_SIGNUM_ARCH_H = 1 90 X_BITS_SIGNUM_GENERIC_H = 1 91 X_BITS_SIGSTACK_H = 1 92 X_BITS_SIGTHREAD_H = 1 93 X_BITS_SS_FLAGS_H = 1 94 X_BITS_TIME64_H = 1 95 X_BITS_TYPESIZES_H = 1 96 X_BITS_TYPES_H = 1 97 X_BSD_SIZE_T_ = 0 98 X_BSD_SIZE_T_DEFINED_ = 0 99 X_DEFAULT_SOURCE = 1 100 X_FEATURES_H = 1 101 X_FILE_OFFSET_BITS = 64 102 X_GCC_SIZE_T = 0 103 X_LP64 = 1 104 X_NSIG = 65 105 X_POSIX_C_SOURCE = 200809 106 X_POSIX_SOURCE = 1 107 X_RWLOCK_INTERNAL_H = 0 108 X_SIGNAL_H = 0 109 X_SIZET_ = 0 110 X_SIZE_T = 0 111 X_SIZE_T_ = 0 112 X_SIZE_T_DECLARED = 0 113 X_SIZE_T_DEFINED = 0 114 X_SIZE_T_DEFINED_ = 0 115 X_STDC_PREDEF_H = 1 116 X_STRUCT_TIMESPEC = 1 117 X_SYS_CDEFS_H = 1 118 X_SYS_SIZE_T_H = 0 119 X_SYS_UCONTEXT_H = 1 120 X_THREAD_MUTEX_INTERNAL_H = 1 121 X_THREAD_SHARED_TYPES_H = 1 122 X_T_SIZE = 0 123 X_T_SIZE_ = 0 124 Linux = 1 125 Unix = 1 126 ) 127 128 // POSIX names to access some of the members. 129 130 // sigevent constants. Linux version. 131 // Copyright (C) 1997-2021 Free Software Foundation, Inc. 132 // This file is part of the GNU C Library. 133 // 134 // The GNU C Library is free software; you can redistribute it and/or 135 // modify it under the terms of the GNU Lesser General Public 136 // License as published by the Free Software Foundation; either 137 // version 2.1 of the License, or (at your option) any later version. 138 // 139 // The GNU C Library is distributed in the hope that it will be useful, 140 // but WITHOUT ANY WARRANTY; without even the implied warranty of 141 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 142 // Lesser General Public License for more details. 143 // 144 // You should have received a copy of the GNU Lesser General Public 145 // License along with the GNU C Library; if not, see 146 // <https://www.gnu.org/licenses/>. 147 148 // `sigev_notify' values. 149 const ( /* sigevent-consts.h:27:1: */ 150 SIGEV_SIGNAL = 0 // Notify via signal. 151 SIGEV_NONE = 1 // Other notification: meaningless. 152 SIGEV_THREAD = 2 // Deliver via thread creation. 153 154 SIGEV_THREAD_ID = 4 155 ) 156 157 // `si_code' values for SIGSEGV signal. 158 const ( /* siginfo-consts.h:119:1: */ 159 SEGV_MAPERR = 1 // Address not mapped to object. 160 SEGV_ACCERR = 2 // Invalid permissions for mapped object. 161 SEGV_BNDERR = 3 // Bounds checking failure. 162 SEGV_PKUERR = 4 // Protection key checking failure. 163 SEGV_ACCADI = 5 // ADI not enabled for mapped object. 164 SEGV_ADIDERR = 6 // Disrupting MCD error. 165 SEGV_ADIPERR = 7 // Precise MCD exception. 166 SEGV_MTEAERR = 8 // Asynchronous ARM MTE error. 167 SEGV_MTESERR = 9 168 ) 169 170 // `si_code' values for SIGBUS signal. 171 const ( /* siginfo-consts.h:142:1: */ 172 BUS_ADRALN = 1 // Invalid address alignment. 173 BUS_ADRERR = 2 // Non-existant physical address. 174 BUS_OBJERR = 3 // Object specific hardware error. 175 BUS_MCEERR_AR = 4 // Hardware memory error: action required. 176 BUS_MCEERR_AO = 5 177 ) 178 179 // `si_code' values for SIGCHLD signal. 180 const ( /* siginfo-consts.h:176:1: */ 181 CLD_EXITED = 1 // Child has exited. 182 CLD_KILLED = 2 // Child was killed. 183 CLD_DUMPED = 3 // Child terminated abnormally. 184 CLD_TRAPPED = 4 // Traced child has trapped. 185 CLD_STOPPED = 5 // Child has stopped. 186 CLD_CONTINUED = 6 187 ) 188 189 // `si_code' values for SIGPOLL signal. 190 const ( /* siginfo-consts.h:193:1: */ 191 POLL_IN = 1 // Data input available. 192 POLL_OUT = 2 // Output buffers available. 193 POLL_MSG = 3 // Input message available. 194 POLL_ERR = 4 // I/O error. 195 POLL_PRI = 5 // High priority input available. 196 POLL_HUP = 6 197 ) 198 199 // X/Open requires some more fields with fixed names. 200 201 // siginfo constants. Linux version. 202 // Copyright (C) 1997-2021 Free Software Foundation, Inc. 203 // This file is part of the GNU C Library. 204 // 205 // The GNU C Library is free software; you can redistribute it and/or 206 // modify it under the terms of the GNU Lesser General Public 207 // License as published by the Free Software Foundation; either 208 // version 2.1 of the License, or (at your option) any later version. 209 // 210 // The GNU C Library is distributed in the hope that it will be useful, 211 // but WITHOUT ANY WARRANTY; without even the implied warranty of 212 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 213 // Lesser General Public License for more details. 214 // 215 // You should have received a copy of the GNU Lesser General Public 216 // License along with the GNU C Library; if not, see 217 // <https://www.gnu.org/licenses/>. 218 219 // Most of these constants are uniform across all architectures, but there 220 // is one exception. 221 // Architecture-specific adjustments to siginfo_t. 222 223 // Values for `si_code'. Positive values are reserved for kernel-generated 224 // 225 // signals. 226 const ( /* siginfo-consts.h:35:1: */ 227 SI_ASYNCNL = -60 // Sent by asynch name lookup completion. 228 SI_DETHREAD = -7 // Sent by execve killing subsidiary 229 // threads. 230 SI_TKILL = -6 // Sent by tkill. 231 SI_SIGIO = -5 // Sent by queued SIGIO. 232 SI_ASYNCIO = -4 // Sent by AIO completion. 233 SI_MESGQ = -3 // Sent by real time mesq state change. 234 SI_TIMER = -2 // Sent by timer expiration. 235 SI_QUEUE = -1 // Sent by sigqueue. 236 SI_USER = 0 // Sent by kill, sigsend. 237 SI_KERNEL = 128 238 ) 239 240 // `si_code' values for SIGILL signal. 241 const ( /* siginfo-consts.h:71:1: */ 242 ILL_ILLOPC = 1 // Illegal opcode. 243 ILL_ILLOPN = 2 // Illegal operand. 244 ILL_ILLADR = 3 // Illegal addressing mode. 245 ILL_ILLTRP = 4 // Illegal trap. 246 ILL_PRVOPC = 5 // Privileged opcode. 247 ILL_PRVREG = 6 // Privileged register. 248 ILL_COPROC = 7 // Coprocessor error. 249 ILL_BADSTK = 8 // Internal stack error. 250 ILL_BADIADDR = 9 251 ) 252 253 // `si_code' values for SIGFPE signal. 254 const ( /* siginfo-consts.h:94:1: */ 255 FPE_INTDIV = 1 // Integer divide by zero. 256 FPE_INTOVF = 2 // Integer overflow. 257 FPE_FLTDIV = 3 // Floating point divide by zero. 258 FPE_FLTOVF = 4 // Floating point overflow. 259 FPE_FLTUND = 5 // Floating point underflow. 260 FPE_FLTRES = 6 // Floating point inexact result. 261 FPE_FLTINV = 7 // Floating point invalid operation. 262 FPE_FLTSUB = 8 // Subscript out of range. 263 FPE_FLTUNK = 14 // Undiagnosed floating-point exception. 264 FPE_CONDTRAP = 15 265 ) 266 267 // sigstack, sigaltstack definitions. 268 // Copyright (C) 1998-2021 Free Software Foundation, Inc. 269 // This file is part of the GNU C Library. 270 // 271 // The GNU C Library is free software; you can redistribute it and/or 272 // modify it under the terms of the GNU Lesser General Public 273 // License as published by the Free Software Foundation; either 274 // version 2.1 of the License, or (at your option) any later version. 275 // 276 // The GNU C Library is distributed in the hope that it will be useful, 277 // but WITHOUT ANY WARRANTY; without even the implied warranty of 278 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 279 // Lesser General Public License for more details. 280 // 281 // You should have received a copy of the GNU Lesser General Public 282 // License along with the GNU C Library; if not, see 283 // <https://www.gnu.org/licenses/>. 284 285 // Minimum stack size for a signal handler. 286 287 // System default stack size. 288 289 // Definition of MINSIGSTKSZ and SIGSTKSZ. Linux version. 290 // Copyright (C) 2020 Free Software Foundation, Inc. 291 // This file is part of the GNU C Library. 292 // 293 // The GNU C Library is free software; you can redistribute it and/or 294 // modify it under the terms of the GNU Lesser General Public 295 // License as published by the Free Software Foundation; either 296 // version 2.1 of the License, or (at your option) any later version. 297 // 298 // The GNU C Library is distributed in the hope that it will be useful, 299 // but WITHOUT ANY WARRANTY; without even the implied warranty of 300 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 301 // Lesser General Public License for more details. 302 // 303 // You should have received a copy of the GNU Lesser General Public 304 // License along with the GNU C Library; if not, see 305 // <https://www.gnu.org/licenses/>. 306 307 // ss_flags values for stack_t. Linux version. 308 // Copyright (C) 1998-2021 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 type Ptrdiff_t = int64 /* <builtin>:3:26 */ 332 333 type Size_t = uint64 /* <builtin>:9:23 */ 334 335 type Wchar_t = int32 /* <builtin>:15:24 */ 336 337 type X__int128_t = struct { 338 Flo int64 339 Fhi int64 340 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 341 type X__uint128_t = struct { 342 Flo uint64 343 Fhi uint64 344 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 345 346 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 347 type X__float128 = float64 /* <builtin>:47:21 */ 348 349 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 350 // This file is part of the GNU C Library. 351 // 352 // The GNU C Library is free software; you can redistribute it and/or 353 // modify it under the terms of the GNU Lesser General Public 354 // License as published by the Free Software Foundation; either 355 // version 2.1 of the License, or (at your option) any later version. 356 // 357 // The GNU C Library is distributed in the hope that it will be useful, 358 // but WITHOUT ANY WARRANTY; without even the implied warranty of 359 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 360 // Lesser General Public License for more details. 361 // 362 // You should have received a copy of the GNU Lesser General Public 363 // License along with the GNU C Library; if not, see 364 // <https://www.gnu.org/licenses/>. 365 366 // ISO C99 Standard: 7.14 Signal handling <signal.h> 367 368 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 369 // This file is part of the GNU C Library. 370 // 371 // The GNU C Library is free software; you can redistribute it and/or 372 // modify it under the terms of the GNU Lesser General Public 373 // License as published by the Free Software Foundation; either 374 // version 2.1 of the License, or (at your option) any later version. 375 // 376 // The GNU C Library is distributed in the hope that it will be useful, 377 // but WITHOUT ANY WARRANTY; without even the implied warranty of 378 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 379 // Lesser General Public License for more details. 380 // 381 // You should have received a copy of the GNU Lesser General Public 382 // License along with the GNU C Library; if not, see 383 // <https://www.gnu.org/licenses/>. 384 385 // These are defined by the user (or the compiler) 386 // to specify the desired environment: 387 // 388 // __STRICT_ANSI__ ISO Standard C. 389 // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. 390 // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. 391 // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. 392 // __STDC_WANT_LIB_EXT2__ 393 // Extensions to ISO C99 from TR 27431-2:2010. 394 // __STDC_WANT_IEC_60559_BFP_EXT__ 395 // Extensions to ISO C11 from TS 18661-1:2014. 396 // __STDC_WANT_IEC_60559_FUNCS_EXT__ 397 // Extensions to ISO C11 from TS 18661-4:2015. 398 // __STDC_WANT_IEC_60559_TYPES_EXT__ 399 // Extensions to ISO C11 from TS 18661-3:2015. 400 // __STDC_WANT_IEC_60559_EXT__ 401 // ISO C2X interfaces defined only in Annex F. 402 // 403 // _POSIX_SOURCE IEEE Std 1003.1. 404 // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; 405 // if >=199309L, add IEEE Std 1003.1b-1993; 406 // if >=199506L, add IEEE Std 1003.1c-1995; 407 // if >=200112L, all of IEEE 1003.1-2004 408 // if >=200809L, all of IEEE 1003.1-2008 409 // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if 410 // Single Unix conformance is wanted, to 600 for the 411 // sixth revision, to 700 for the seventh revision. 412 // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. 413 // _LARGEFILE_SOURCE Some more functions for correct standard I/O. 414 // _LARGEFILE64_SOURCE Additional functionality from LFS for large files. 415 // _FILE_OFFSET_BITS=N Select default filesystem interface. 416 // _ATFILE_SOURCE Additional *at interfaces. 417 // _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) 418 // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. 419 // _GNU_SOURCE All of the above, plus GNU extensions. 420 // _DEFAULT_SOURCE The default set of features (taking precedence over 421 // __STRICT_ANSI__). 422 // 423 // _FORTIFY_SOURCE Add security hardening to many library functions. 424 // Set to 1 or 2; 2 performs stricter checks than 1. 425 // 426 // _REENTRANT, _THREAD_SAFE 427 // Obsolete; equivalent to _POSIX_C_SOURCE=199506L. 428 // 429 // The `-ansi' switch to the GNU C compiler, and standards conformance 430 // options such as `-std=c99', define __STRICT_ANSI__. If none of 431 // these are defined, or if _DEFAULT_SOURCE is defined, the default is 432 // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to 433 // 200809L, as well as enabling miscellaneous functions from BSD and 434 // SVID. If more than one of these are defined, they accumulate. For 435 // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together 436 // give you ISO C, 1003.1, and 1003.2, but nothing else. 437 // 438 // These are defined by this file and are used by the 439 // header files to decide what to declare or define: 440 // 441 // __GLIBC_USE (F) Define things from feature set F. This is defined 442 // to 1 or 0; the subsequent macros are either defined 443 // or undefined, and those tests should be moved to 444 // __GLIBC_USE. 445 // __USE_ISOC11 Define ISO C11 things. 446 // __USE_ISOC99 Define ISO C99 things. 447 // __USE_ISOC95 Define ISO C90 AMD1 (C95) things. 448 // __USE_ISOCXX11 Define ISO C++11 things. 449 // __USE_POSIX Define IEEE Std 1003.1 things. 450 // __USE_POSIX2 Define IEEE Std 1003.2 things. 451 // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. 452 // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. 453 // __USE_XOPEN Define XPG things. 454 // __USE_XOPEN_EXTENDED Define X/Open Unix things. 455 // __USE_UNIX98 Define Single Unix V2 things. 456 // __USE_XOPEN2K Define XPG6 things. 457 // __USE_XOPEN2KXSI Define XPG6 XSI things. 458 // __USE_XOPEN2K8 Define XPG7 things. 459 // __USE_XOPEN2K8XSI Define XPG7 XSI things. 460 // __USE_LARGEFILE Define correct standard I/O things. 461 // __USE_LARGEFILE64 Define LFS things with separate names. 462 // __USE_FILE_OFFSET64 Define 64bit interface as default. 463 // __USE_MISC Define things from 4.3BSD or System V Unix. 464 // __USE_ATFILE Define *at interfaces and AT_* constants for them. 465 // __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant) 466 // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. 467 // __USE_GNU Define GNU extensions. 468 // __USE_FORTIFY_LEVEL Additional security measures used, according to level. 469 // 470 // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are 471 // defined by this file unconditionally. `__GNU_LIBRARY__' is provided 472 // only for compatibility. All new code should use the other symbols 473 // to test for features. 474 // 475 // All macros listed above as possibly being defined by this file are 476 // explicitly undefined if they are not explicitly defined. 477 // Feature-test macros that are not defined by the user or compiler 478 // but are implied by the other feature-test macros defined (or by the 479 // lack of any definitions) are defined by the file. 480 // 481 // ISO C feature test macros depend on the definition of the macro 482 // when an affected header is included, not when the first system 483 // header is included, and so they are handled in 484 // <bits/libc-header-start.h>, which does not have a multiple include 485 // guard. Feature test macros that can be handled from the first 486 // system header included are handled here. 487 488 // Undefine everything, so we get a clean slate. 489 490 // Suppress kernel-name space pollution unless user expressedly asks 491 // for it. 492 493 // Convenience macro to test the version of gcc. 494 // Use like this: 495 // #if __GNUC_PREREQ (2,8) 496 // ... code requiring gcc 2.8 or later ... 497 // #endif 498 // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was 499 // added in 2.0. 500 501 // Similarly for clang. Features added to GCC after version 4.2 may 502 // or may not also be available in clang, and clang's definitions of 503 // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such 504 // features can be queried via __has_extension/__has_feature. 505 506 // Whether to use feature set F. 507 508 // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for 509 // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not 510 // issue a warning; the expectation is that the source is being 511 // transitioned to use the new macro. 512 513 // If _GNU_SOURCE was defined by the user, turn on all the other features. 514 515 // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, 516 // define _DEFAULT_SOURCE. 517 518 // This is to enable the ISO C2X extension. 519 520 // This is to enable the ISO C11 extension. 521 522 // This is to enable the ISO C99 extension. 523 524 // This is to enable the ISO C90 Amendment 1:1995 extension. 525 526 // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE 527 // is defined, use POSIX.1-2008 (or another version depending on 528 // _XOPEN_SOURCE). 529 530 // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be 531 // defined in all multithreaded code. GNU libc has not required this 532 // for many years. We now treat them as compatibility synonyms for 533 // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with 534 // comprehensive support for multithreaded code. Using them never 535 // lowers the selected level of POSIX conformance, only raises it. 536 537 // Features part to handle 64-bit time_t support. 538 // Copyright (C) 2021 Free Software Foundation, Inc. 539 // This file is part of the GNU C Library. 540 // 541 // The GNU C Library is free software; you can redistribute it and/or 542 // modify it under the terms of the GNU Lesser General Public 543 // License as published by the Free Software Foundation; either 544 // version 2.1 of the License, or (at your option) any later version. 545 // 546 // The GNU C Library is distributed in the hope that it will be useful, 547 // but WITHOUT ANY WARRANTY; without even the implied warranty of 548 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 549 // Lesser General Public License for more details. 550 // 551 // You should have received a copy of the GNU Lesser General Public 552 // License along with the GNU C Library; if not, see 553 // <https://www.gnu.org/licenses/>. 554 555 // We need to know the word size in order to check the time size. 556 // Determine the wordsize from the preprocessor defines. RISC-V version. 557 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 558 // This file is part of the GNU C Library. 559 // 560 // The GNU C Library is free software; you can redistribute it and/or 561 // modify it under the terms of the GNU Lesser General Public 562 // License as published by the Free Software Foundation; either 563 // version 2.1 of the License, or (at your option) any later version. 564 // 565 // The GNU C Library is distributed in the hope that it will be useful, 566 // but WITHOUT ANY WARRANTY; without even the implied warranty of 567 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 568 // Lesser General Public License for more details. 569 // 570 // You should have received a copy of the GNU Lesser General Public 571 // License along with the GNU C Library. If not, see 572 // <https://www.gnu.org/licenses/>. 573 574 // Bit size of the time_t type at glibc build time, RISC-V case. 575 // Copyright (C) 2020-2021 Free Software Foundation, Inc. 576 // This file is part of the GNU C Library. 577 // 578 // The GNU C Library is free software; you can redistribute it and/or 579 // modify it under the terms of the GNU Lesser General Public 580 // License as published by the Free Software Foundation; either 581 // version 2.1 of the License, or (at your option) any later version. 582 // 583 // The GNU C Library is distributed in the hope that it will be useful, 584 // but WITHOUT ANY WARRANTY; without even the implied warranty of 585 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 586 // Lesser General Public License for more details. 587 // 588 // You should have received a copy of the GNU Lesser General Public 589 // License along with the GNU C Library; if not, see 590 // <https://www.gnu.org/licenses/>. 591 592 // Determine the wordsize from the preprocessor defines. RISC-V version. 593 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 594 // This file is part of the GNU C Library. 595 // 596 // The GNU C Library is free software; you can redistribute it and/or 597 // modify it under the terms of the GNU Lesser General Public 598 // License as published by the Free Software Foundation; either 599 // version 2.1 of the License, or (at your option) any later version. 600 // 601 // The GNU C Library is distributed in the hope that it will be useful, 602 // but WITHOUT ANY WARRANTY; without even the implied warranty of 603 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 604 // Lesser General Public License for more details. 605 // 606 // You should have received a copy of the GNU Lesser General Public 607 // License along with the GNU C Library. If not, see 608 // <https://www.gnu.org/licenses/>. 609 610 // RV32 and RV64 both use 64-bit time_t 611 612 // The function 'gets' existed in C89, but is impossible to use 613 // safely. It has been removed from ISO C11 and ISO C++14. Note: for 614 // compatibility with various implementations of <cstdio>, this test 615 // must consider only the value of __cplusplus when compiling C++. 616 617 // GNU formerly extended the scanf functions with modified format 618 // specifiers %as, %aS, and %a[...] that allocate a buffer for the 619 // input using malloc. This extension conflicts with ISO C99, which 620 // defines %a as a standalone format specifier that reads a floating- 621 // point number; moreover, POSIX.1-2008 provides the same feature 622 // using the modifier letter 'm' instead (%ms, %mS, %m[...]). 623 // 624 // We now follow C99 unless GNU extensions are active and the compiler 625 // is specifically in C89 or C++98 mode (strict or not). For 626 // instance, with GCC, -std=gnu11 will have C99-compliant scanf with 627 // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the 628 // old extension. 629 630 // Get definitions of __STDC_* predefined macros, if the compiler has 631 // not preincluded this header automatically. 632 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 633 // This file is part of the GNU C Library. 634 // 635 // The GNU C Library is free software; you can redistribute it and/or 636 // modify it under the terms of the GNU Lesser General Public 637 // License as published by the Free Software Foundation; either 638 // version 2.1 of the License, or (at your option) any later version. 639 // 640 // The GNU C Library is distributed in the hope that it will be useful, 641 // but WITHOUT ANY WARRANTY; without even the implied warranty of 642 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 643 // Lesser General Public License for more details. 644 // 645 // You should have received a copy of the GNU Lesser General Public 646 // License along with the GNU C Library; if not, see 647 // <https://www.gnu.org/licenses/>. 648 649 // This macro indicates that the installed library is the GNU C Library. 650 // For historic reasons the value now is 6 and this will stay from now 651 // on. The use of this variable is deprecated. Use __GLIBC__ and 652 // __GLIBC_MINOR__ now (see below) when you want to test for a specific 653 // GNU C library version and use the values in <gnu/lib-names.h> to get 654 // the sonames of the shared libraries. 655 656 // Major and minor version number of the GNU C library package. Use 657 // these macros to test for features in specific releases. 658 659 // This is here only because every header file already includes this one. 660 // Copyright (C) 1992-2021 Free Software Foundation, Inc. 661 // This file is part of the GNU C Library. 662 // 663 // The GNU C Library is free software; you can redistribute it and/or 664 // modify it under the terms of the GNU Lesser General Public 665 // License as published by the Free Software Foundation; either 666 // version 2.1 of the License, or (at your option) any later version. 667 // 668 // The GNU C Library is distributed in the hope that it will be useful, 669 // but WITHOUT ANY WARRANTY; without even the implied warranty of 670 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 671 // Lesser General Public License for more details. 672 // 673 // You should have received a copy of the GNU Lesser General Public 674 // License along with the GNU C Library; if not, see 675 // <https://www.gnu.org/licenses/>. 676 677 // We are almost always included from features.h. 678 679 // The GNU libc does not support any K&R compilers or the traditional mode 680 // of ISO C compilers anymore. Check for some of the combinations not 681 // supported anymore. 682 683 // Some user header file might have defined this before. 684 685 // Compilers that lack __has_attribute may object to 686 // #if defined __has_attribute && __has_attribute (...) 687 // even though they do not need to evaluate the right-hand side of the &&. 688 // Similarly for __has_builtin, etc. 689 690 // All functions, except those with callbacks or those that 691 // synchronize memory, are leaf functions. 692 693 // GCC can always grok prototypes. For C++ programs we add throw() 694 // to help it optimize the function calls. But this only works with 695 // gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions 696 // as non-throwing using a function attribute since programs can use 697 // the -fexceptions options for C code as well. 698 699 // These two macros are not used in glibc anymore. They are kept here 700 // only because some other projects expect the macros to be defined. 701 702 // For these things, GCC behaves the ANSI way normally, 703 // and the non-ANSI way under -traditional. 704 705 // This is not a typedef so `const __ptr_t' does the right thing. 706 707 // C++ needs to know that types and declarations are C, not C++. 708 709 // Fortify support. 710 711 // Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. 712 713 // Support for flexible arrays. 714 // Headers that should use flexible arrays only if they're "real" 715 // (e.g. only if they won't affect sizeof()) should test 716 // #if __glibc_c99_flexarr_available. 717 718 // __asm__ ("xyz") is used throughout the headers to rename functions 719 // at the assembly language level. This is wrapped by the __REDIRECT 720 // macro, in order to support compilers that can do this some other 721 // way. When compilers don't support asm-names at all, we have to do 722 // preprocessor tricks instead (which don't have exactly the right 723 // semantics, but it's the best we can do). 724 // 725 // Example: 726 // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); 727 728 // 729 // #elif __SOME_OTHER_COMPILER__ 730 // 731 // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) 732 733 // GCC and clang have various useful declarations that can be made with 734 // the '__attribute__' syntax. All of the ways we use this do fine if 735 // they are omitted for compilers that don't understand it. 736 737 // At some point during the gcc 2.96 development the `malloc' attribute 738 // for functions was introduced. We don't want to use it unconditionally 739 // (although this would be possible) since it generates warnings. 740 741 // Tell the compiler which arguments to an allocation function 742 // indicate the size of the allocation. 743 744 // At some point during the gcc 2.96 development the `pure' attribute 745 // for functions was introduced. We don't want to use it unconditionally 746 // (although this would be possible) since it generates warnings. 747 748 // This declaration tells the compiler that the value is constant. 749 750 // At some point during the gcc 3.1 development the `used' attribute 751 // for functions was introduced. We don't want to use it unconditionally 752 // (although this would be possible) since it generates warnings. 753 754 // Since version 3.2, gcc allows marking deprecated functions. 755 756 // Since version 4.5, gcc also allows one to specify the message printed 757 // when a deprecated function is used. clang claims to be gcc 4.2, but 758 // may also support this feature. 759 760 // At some point during the gcc 2.8 development the `format_arg' attribute 761 // for functions was introduced. We don't want to use it unconditionally 762 // (although this would be possible) since it generates warnings. 763 // If several `format_arg' attributes are given for the same function, in 764 // gcc-3.0 and older, all but the last one are ignored. In newer gccs, 765 // all designated arguments are considered. 766 767 // At some point during the gcc 2.97 development the `strfmon' format 768 // attribute for functions was introduced. We don't want to use it 769 // unconditionally (although this would be possible) since it 770 // generates warnings. 771 772 // The nonnull function attribute marks pointer parameters that 773 // must not be NULL. 774 775 // The returns_nonnull function attribute marks the return type of the function 776 // as always being non-null. 777 778 // If fortification mode, we warn about unused results of certain 779 // function calls which can lead to problems. 780 781 // Forces a function to be always inlined. 782 // The Linux kernel defines __always_inline in stddef.h (283d7573), and 783 // it conflicts with this definition. Therefore undefine it first to 784 // allow either header to be included first. 785 786 // Associate error messages with the source location of the call site rather 787 // than with the source location inside the function. 788 789 // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 790 // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ 791 // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions 792 // older than 4.3 may define these macros and still not guarantee GNU inlining 793 // semantics. 794 // 795 // clang++ identifies itself as gcc-4.2, but has support for GNU inlining 796 // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and 797 // __GNUC_GNU_INLINE__ macro definitions. 798 799 // GCC 4.3 and above allow passing all anonymous arguments of an 800 // __extern_always_inline function to some other vararg function. 801 802 // It is possible to compile containing GCC extensions even if GCC is 803 // run in pedantic mode if the uses are carefully marked using the 804 // `__extension__' keyword. But this is not generally available before 805 // version 2.8. 806 807 // __restrict is known in EGCS 1.2 and above, and in clang. 808 // It works also in C++ mode (outside of arrays), but only when spelled 809 // as '__restrict', not 'restrict'. 810 811 // ISO C99 also allows to declare arrays as non-overlapping. The syntax is 812 // array_name[restrict] 813 // GCC 3.1 and clang support this. 814 // This syntax is not usable in C++ mode. 815 816 // Describes a char array whose address can safely be passed as the first 817 // argument to strncpy and strncat, as the char array is not necessarily 818 // a NUL-terminated string. 819 820 // Undefine (also defined in libc-symbols.h). 821 // Copies attributes from the declaration or type referenced by 822 // the argument. 823 824 // The #ifndef lets Gnulib avoid including these on non-glibc 825 // platforms, where the includes typically do not exist. 826 // Determine the wordsize from the preprocessor defines. RISC-V version. 827 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 828 // This file is part of the GNU C Library. 829 // 830 // The GNU C Library is free software; you can redistribute it and/or 831 // modify it under the terms of the GNU Lesser General Public 832 // License as published by the Free Software Foundation; either 833 // version 2.1 of the License, or (at your option) any later version. 834 // 835 // The GNU C Library is distributed in the hope that it will be useful, 836 // but WITHOUT ANY WARRANTY; without even the implied warranty of 837 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 838 // Lesser General Public License for more details. 839 // 840 // You should have received a copy of the GNU Lesser General Public 841 // License along with the GNU C Library. If not, see 842 // <https://www.gnu.org/licenses/>. 843 844 // Properties of long double type. ldbl-128 version. 845 // Copyright (C) 2016-2021 Free Software Foundation, Inc. 846 // This file is part of the GNU C Library. 847 // 848 // The GNU C Library is free software; you can redistribute it and/or 849 // modify it under the terms of the GNU Lesser General Public 850 // License published by the Free Software Foundation; either 851 // version 2.1 of the License, or (at your option) any later version. 852 // 853 // The GNU C Library is distributed in the hope that it will be useful, 854 // but WITHOUT ANY WARRANTY; without even the implied warranty of 855 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 856 // Lesser General Public License for more details. 857 // 858 // You should have received a copy of the GNU Lesser General Public 859 // License along with the GNU C Library; if not, see 860 // <https://www.gnu.org/licenses/>. 861 862 // long double is distinct from double, so there is nothing to 863 // define here. 864 865 // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is 866 // intended for use in preprocessor macros. 867 // 868 // Note: MESSAGE must be a _single_ string; concatenation of string 869 // literals is not supported. 870 871 // Generic selection (ISO C11) is a C-only feature, available in GCC 872 // since version 4.9. Previous versions do not provide generic 873 // selection, even though they might set __STDC_VERSION__ to 201112L, 874 // when in -std=c11 mode. Thus, we must check for !defined __GNUC__ 875 // when testing __STDC_VERSION__ for generic selection support. 876 // On the other hand, Clang also defines __GNUC__, so a clang-specific 877 // check is required to enable the use of generic selection. 878 879 // Designates a 1-based positional argument ref-index of pointer type 880 // that can be used to access size-index elements of the pointed-to 881 // array according to access mode, or at least one element when 882 // size-index is not provided: 883 // access (access-mode, <ref-index> [, <size-index>]) 884 885 // Designates dealloc as a function to call to deallocate objects 886 // allocated by the declared function. 887 888 // Specify that a function such as setjmp or vfork may return 889 // twice. 890 891 // If we don't have __REDIRECT, prototypes will be missing if 892 // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. 893 894 // Decide whether we can define 'extern inline' functions in headers. 895 896 // This is here only because every header file already includes this one. 897 // Get the definitions of all the appropriate `__stub_FUNCTION' symbols. 898 // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub 899 // that will always return failure (and set errno to ENOSYS). 900 // This file is automatically generated. 901 // This file selects the right generated file of `__stub_FUNCTION' macros 902 // based on the architecture being compiled for. 903 904 // Determine the wordsize from the preprocessor defines. RISC-V version. 905 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 906 // This file is part of the GNU C Library. 907 // 908 // The GNU C Library is free software; you can redistribute it and/or 909 // modify it under the terms of the GNU Lesser General Public 910 // License as published by the Free Software Foundation; either 911 // version 2.1 of the License, or (at your option) any later version. 912 // 913 // The GNU C Library is distributed in the hope that it will be useful, 914 // but WITHOUT ANY WARRANTY; without even the implied warranty of 915 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 916 // Lesser General Public License for more details. 917 // 918 // You should have received a copy of the GNU Lesser General Public 919 // License along with the GNU C Library. If not, see 920 // <https://www.gnu.org/licenses/>. 921 922 // This file is automatically generated. 923 // It defines a symbol `__stub_FUNCTION' for each function 924 // in the C library which is a stub, meaning it will fail 925 // every time called, usually setting errno to ENOSYS. 926 927 // bits/types.h -- definitions of __*_t types underlying *_t types. 928 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 929 // This file is part of the GNU C Library. 930 // 931 // The GNU C Library is free software; you can redistribute it and/or 932 // modify it under the terms of the GNU Lesser General Public 933 // License as published by the Free Software Foundation; either 934 // version 2.1 of the License, or (at your option) any later version. 935 // 936 // The GNU C Library is distributed in the hope that it will be useful, 937 // but WITHOUT ANY WARRANTY; without even the implied warranty of 938 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 939 // Lesser General Public License for more details. 940 // 941 // You should have received a copy of the GNU Lesser General Public 942 // License along with the GNU C Library; if not, see 943 // <https://www.gnu.org/licenses/>. 944 945 // Never include this file directly; use <sys/types.h> instead. 946 947 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 948 // This file is part of the GNU C Library. 949 // 950 // The GNU C Library is free software; you can redistribute it and/or 951 // modify it under the terms of the GNU Lesser General Public 952 // License as published by the Free Software Foundation; either 953 // version 2.1 of the License, or (at your option) any later version. 954 // 955 // The GNU C Library is distributed in the hope that it will be useful, 956 // but WITHOUT ANY WARRANTY; without even the implied warranty of 957 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 958 // Lesser General Public License for more details. 959 // 960 // You should have received a copy of the GNU Lesser General Public 961 // License along with the GNU C Library; if not, see 962 // <https://www.gnu.org/licenses/>. 963 964 // Determine the wordsize from the preprocessor defines. RISC-V version. 965 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 966 // This file is part of the GNU C Library. 967 // 968 // The GNU C Library is free software; you can redistribute it and/or 969 // modify it under the terms of the GNU Lesser General Public 970 // License as published by the Free Software Foundation; either 971 // version 2.1 of the License, or (at your option) any later version. 972 // 973 // The GNU C Library is distributed in the hope that it will be useful, 974 // but WITHOUT ANY WARRANTY; without even the implied warranty of 975 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 976 // Lesser General Public License for more details. 977 // 978 // You should have received a copy of the GNU Lesser General Public 979 // License along with the GNU C Library. If not, see 980 // <https://www.gnu.org/licenses/>. 981 982 // Bit size of the time_t type at glibc build time, RISC-V case. 983 // Copyright (C) 2020-2021 Free Software Foundation, Inc. 984 // This file is part of the GNU C Library. 985 // 986 // The GNU C Library is free software; you can redistribute it and/or 987 // modify it under the terms of the GNU Lesser General Public 988 // License as published by the Free Software Foundation; either 989 // version 2.1 of the License, or (at your option) any later version. 990 // 991 // The GNU C Library is distributed in the hope that it will be useful, 992 // but WITHOUT ANY WARRANTY; without even the implied warranty of 993 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 994 // Lesser General Public License for more details. 995 // 996 // You should have received a copy of the GNU Lesser General Public 997 // License along with the GNU C Library; if not, see 998 // <https://www.gnu.org/licenses/>. 999 1000 // Determine the wordsize from the preprocessor defines. RISC-V version. 1001 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1002 // This file is part of the GNU C Library. 1003 // 1004 // The GNU C Library is free software; you can redistribute it and/or 1005 // modify it under the terms of the GNU Lesser General Public 1006 // License as published by the Free Software Foundation; either 1007 // version 2.1 of the License, or (at your option) any later version. 1008 // 1009 // The GNU C Library is distributed in the hope that it will be useful, 1010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1012 // Lesser General Public License for more details. 1013 // 1014 // You should have received a copy of the GNU Lesser General Public 1015 // License along with the GNU C Library. If not, see 1016 // <https://www.gnu.org/licenses/>. 1017 1018 // RV32 and RV64 both use 64-bit time_t 1019 1020 // Convenience types. 1021 type X__u_char = uint8 /* types.h:31:23 */ 1022 type X__u_short = uint16 /* types.h:32:28 */ 1023 type X__u_int = uint32 /* types.h:33:22 */ 1024 type X__u_long = uint64 /* types.h:34:27 */ 1025 1026 // Fixed-size types, underlying types depend on word size and compiler. 1027 type X__int8_t = int8 /* types.h:37:21 */ 1028 type X__uint8_t = uint8 /* types.h:38:23 */ 1029 type X__int16_t = int16 /* types.h:39:26 */ 1030 type X__uint16_t = uint16 /* types.h:40:28 */ 1031 type X__int32_t = int32 /* types.h:41:20 */ 1032 type X__uint32_t = uint32 /* types.h:42:22 */ 1033 type X__int64_t = int64 /* types.h:44:25 */ 1034 type X__uint64_t = uint64 /* types.h:45:27 */ 1035 1036 // Smallest types with at least a given width. 1037 type X__int_least8_t = X__int8_t /* types.h:52:18 */ 1038 type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ 1039 type X__int_least16_t = X__int16_t /* types.h:54:19 */ 1040 type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ 1041 type X__int_least32_t = X__int32_t /* types.h:56:19 */ 1042 type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ 1043 type X__int_least64_t = X__int64_t /* types.h:58:19 */ 1044 type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ 1045 1046 // quad_t is also 64 bits. 1047 type X__quad_t = int64 /* types.h:63:18 */ 1048 type X__u_quad_t = uint64 /* types.h:64:27 */ 1049 1050 // Largest integral types. 1051 type X__intmax_t = int64 /* types.h:72:18 */ 1052 type X__uintmax_t = uint64 /* types.h:73:27 */ 1053 1054 // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE 1055 // macros for each of the OS types we define below. The definitions 1056 // of those macros must use the following macros for underlying types. 1057 // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned 1058 // variants of each of the following integer types on this machine. 1059 // 1060 // 16 -- "natural" 16-bit type (always short) 1061 // 32 -- "natural" 32-bit type (always int) 1062 // 64 -- "natural" 64-bit type (long or long long) 1063 // LONG32 -- 32-bit type, traditionally long 1064 // QUAD -- 64-bit type, traditionally long long 1065 // WORD -- natural type of __WORDSIZE bits (int or long) 1066 // LONGWORD -- type of __WORDSIZE bits, traditionally long 1067 // 1068 // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the 1069 // conventional uses of `long' or `long long' type modifiers match the 1070 // types we define, even when a less-adorned type would be the same size. 1071 // This matters for (somewhat) portably writing printf/scanf formats for 1072 // these types, where using the appropriate l or ll format modifiers can 1073 // make the typedefs and the formats match up across all GNU platforms. If 1074 // we used `long' when it's 64 bits where `long long' is expected, then the 1075 // compiler would warn about the formats not matching the argument types, 1076 // and the programmer changing them to shut up the compiler would break the 1077 // program's portability. 1078 // 1079 // Here we assume what is presently the case in all the GCC configurations 1080 // we support: long long is always 64 bits, long is always word/address size, 1081 // and int is always 32 bits. 1082 1083 // No need to mark the typedef with __extension__. 1084 // bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. 1085 // Copyright (C) 2011-2021 Free Software Foundation, Inc. 1086 // This file is part of the GNU C Library. 1087 // Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011. 1088 // 1089 // The GNU C Library is free software; you can redistribute it and/or 1090 // modify it under the terms of the GNU Lesser General Public 1091 // License as published by the Free Software Foundation; either 1092 // version 2.1 of the License, or (at your option) any later version. 1093 // 1094 // The GNU C Library is distributed in the hope that it will be useful, 1095 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1096 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1097 // Lesser General Public License for more details. 1098 // 1099 // You should have received a copy of the GNU Lesser General Public 1100 // License along with the GNU C Library. If not, see 1101 // <https://www.gnu.org/licenses/>. 1102 1103 // See <bits/types.h> for the meaning of these macros. This file exists so 1104 // that <bits/types.h> need not vary across different GNU platforms. 1105 1106 // Tell the libc code that off_t and off64_t are actually the same type 1107 // for all ABI purposes, even if possibly expressed as different base types 1108 // for C type-checking purposes. 1109 1110 // Same for ino_t and ino64_t. 1111 1112 // And for __rlim_t and __rlim64_t. 1113 1114 // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. 1115 1116 // And for getitimer, setitimer and rusage 1117 1118 // Number of descriptors that can fit in an `fd_set'. 1119 1120 // bits/time64.h -- underlying types for __time64_t. RISC-V version. 1121 // Copyright (C) 2020-2021 Free Software Foundation, Inc. 1122 // This file is part of the GNU C Library. 1123 // 1124 // The GNU C Library is free software; you can redistribute it and/or 1125 // modify it under the terms of the GNU Lesser General Public 1126 // License as published by the Free Software Foundation; either 1127 // version 2.1 of the License, or (at your option) any later version. 1128 // 1129 // The GNU C Library is distributed in the hope that it will be useful, 1130 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1131 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1132 // Lesser General Public License for more details. 1133 // 1134 // You should have received a copy of the GNU Lesser General Public 1135 // License along with the GNU C Library; if not, see 1136 // <https://www.gnu.org/licenses/>. 1137 1138 // Define __TIME64_T_TYPE so that it is always a 64-bit type. 1139 1140 // If we already have 64-bit time type then use it. 1141 1142 type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. 1143 type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. 1144 type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. 1145 type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. 1146 type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). 1147 type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. 1148 type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. 1149 type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. 1150 type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). 1151 type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. 1152 type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. 1153 type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. 1154 type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. 1155 type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). 1156 type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. 1157 type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. 1158 type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. 1159 type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. 1160 type X__suseconds64_t = int64 /* types.h:163:33 */ 1161 1162 type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. 1163 type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. 1164 1165 // Clock ID used in clock and timer functions. 1166 type X__clockid_t = int32 /* types.h:169:29 */ 1167 1168 // Timer ID returned by `timer_create'. 1169 type X__timer_t = uintptr /* types.h:172:12 */ 1170 1171 // Type to represent block size. 1172 type X__blksize_t = int32 /* types.h:175:29 */ 1173 1174 // Types from the Large File Support interface. 1175 1176 // Type to count number of disk blocks. 1177 type X__blkcnt_t = int64 /* types.h:180:28 */ 1178 type X__blkcnt64_t = int64 /* types.h:181:30 */ 1179 1180 // Type to count file system blocks. 1181 type X__fsblkcnt_t = uint64 /* types.h:184:30 */ 1182 type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ 1183 1184 // Type to count file system nodes. 1185 type X__fsfilcnt_t = uint64 /* types.h:188:30 */ 1186 type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ 1187 1188 // Type of miscellaneous file system fields. 1189 type X__fsword_t = int64 /* types.h:192:28 */ 1190 1191 type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. 1192 1193 // Signed long type used in system calls. 1194 type X__syscall_slong_t = int64 /* types.h:197:33 */ 1195 // Unsigned long type used in system calls. 1196 type X__syscall_ulong_t = uint64 /* types.h:199:33 */ 1197 1198 // These few don't really vary by system, they always correspond 1199 // 1200 // to one of the other defined types. 1201 type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). 1202 type X__caddr_t = uintptr /* types.h:204:14 */ 1203 1204 // Duplicates info from stdint.h but this is used in unistd.h. 1205 type X__intptr_t = int64 /* types.h:207:25 */ 1206 1207 // Duplicate info from sys/socket.h. 1208 type X__socklen_t = uint32 /* types.h:210:23 */ 1209 1210 // C99: An integer type that can be accessed as an atomic entity, 1211 // 1212 // even in the presence of asynchronous interrupts. 1213 // It is not currently necessary for this to be machine-specific. 1214 type X__sig_atomic_t = int32 /* types.h:215:13 */ 1215 1216 // Seconds since the Epoch, visible to user code when time_t is too 1217 // narrow only for consistency with the old way of widening too-narrow 1218 // types. User code should never use __time64_t. 1219 1220 // Signal number constants. Generic template. 1221 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 1222 // This file is part of the GNU C Library. 1223 // 1224 // The GNU C Library is free software; you can redistribute it and/or 1225 // modify it under the terms of the GNU Lesser General Public 1226 // License as published by the Free Software Foundation; either 1227 // version 2.1 of the License, or (at your option) any later version. 1228 // 1229 // The GNU C Library is distributed in the hope that it will be useful, 1230 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1231 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1232 // Lesser General Public License for more details. 1233 // 1234 // You should have received a copy of the GNU Lesser General Public 1235 // License along with the GNU C Library; if not, see 1236 // <https://www.gnu.org/licenses/>. 1237 1238 // Fake signal functions. 1239 1240 // We define here all the signal names listed in POSIX (1003.1-2008); 1241 // as of 1003.1-2013, no additional signals have been added by POSIX. 1242 // We also define here signal names that historically exist in every 1243 // real-world POSIX variant (e.g. SIGWINCH). 1244 // 1245 // Signals in the 1-15 range are defined with their historical numbers. 1246 // For other signals, we use the BSD numbers. 1247 // There are two unallocated signal numbers in the 1-31 range: 7 and 29. 1248 // Signal number 0 is reserved for use as kill(pid, 0), to test whether 1249 // a process exists without sending it a signal. 1250 1251 // ISO C99 signals. 1252 1253 // Historical signals specified by POSIX. 1254 1255 // Archaic names for compatibility. 1256 1257 // Not all systems support real-time signals. bits/signum.h indicates 1258 // that they are supported by overriding __SIGRTMAX to a value greater 1259 // than __SIGRTMIN. These constants give the kernel-level hard limits, 1260 // but some real-time signals may be used internally by glibc. Do not 1261 // use these constants in application code; use SIGRTMIN and SIGRTMAX 1262 // (defined in signal.h) instead. 1263 1264 // Include system specific bits. 1265 // Signal number definitions. Linux version. 1266 // Copyright (C) 1995-2021 Free Software Foundation, Inc. 1267 // This file is part of the GNU C Library. 1268 // 1269 // The GNU C Library is free software; you can redistribute it and/or 1270 // modify it under the terms of the GNU Lesser General Public 1271 // License as published by the Free Software Foundation; either 1272 // version 2.1 of the License, or (at your option) any later version. 1273 // 1274 // The GNU C Library is distributed in the hope that it will be useful, 1275 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1276 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1277 // Lesser General Public License for more details. 1278 // 1279 // You should have received a copy of the GNU Lesser General Public 1280 // License along with the GNU C Library; if not, see 1281 // <https://www.gnu.org/licenses/>. 1282 1283 // Adjustments and additions to the signal number constants for 1284 // most Linux systems. 1285 1286 // Historical signals specified by POSIX. 1287 1288 // New(er) POSIX signals (1003.1-2008, 1003.1-2013). 1289 1290 // Nonstandard signals found in all modern POSIX systems 1291 // (including both BSD and Linux). 1292 1293 // Archaic names for compatibility. 1294 1295 // Biggest signal number + 1 (including real-time signals). 1296 1297 // bits/types.h -- definitions of __*_t types underlying *_t types. 1298 // Copyright (C) 2002-2021 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 // Never include this file directly; use <sys/types.h> instead. 1316 1317 // An integral type that can be modified atomically, without the 1318 // 1319 // possibility of a signal arriving in the middle of the operation. 1320 type Sig_atomic_t = X__sig_atomic_t /* sig_atomic_t.h:8:24 */ 1321 1322 type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ 1323 1324 // A set of signals to be blocked, unblocked, or waited for. 1325 type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ 1326 1327 type Pid_t = X__pid_t /* signal.h:40:17 */ 1328 type Uid_t = X__uid_t /* signal.h:46:17 */ 1329 1330 // We need `struct timespec' later on. 1331 // NB: Include guard matches what <linux/time.h> uses. 1332 1333 // bits/types.h -- definitions of __*_t types underlying *_t types. 1334 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1335 // This file is part of the GNU C Library. 1336 // 1337 // The GNU C Library is free software; you can redistribute it and/or 1338 // modify it under the terms of the GNU Lesser General Public 1339 // License as published by the Free Software Foundation; either 1340 // version 2.1 of the License, or (at your option) any later version. 1341 // 1342 // The GNU C Library is distributed in the hope that it will be useful, 1343 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1344 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1345 // Lesser General Public License for more details. 1346 // 1347 // You should have received a copy of the GNU Lesser General Public 1348 // License along with the GNU C Library; if not, see 1349 // <https://www.gnu.org/licenses/>. 1350 1351 // Never include this file directly; use <sys/types.h> instead. 1352 1353 // Endian macros for string.h functions 1354 // Copyright (C) 1992-2021 Free Software Foundation, Inc. 1355 // This file is part of the GNU C Library. 1356 // 1357 // The GNU C Library is free software; you can redistribute it and/or 1358 // modify it under the terms of the GNU Lesser General Public 1359 // License as published by the Free Software Foundation; either 1360 // version 2.1 of the License, or (at your option) any later version. 1361 // 1362 // The GNU C Library is distributed in the hope that it will be useful, 1363 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1364 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1365 // Lesser General Public License for more details. 1366 // 1367 // You should have received a copy of the GNU Lesser General Public 1368 // License along with the GNU C Library; if not, see 1369 // <http://www.gnu.org/licenses/>. 1370 1371 // Definitions for byte order, according to significance of bytes, 1372 // from low addresses to high addresses. The value is what you get by 1373 // putting '4' in the most significant byte, '3' in the second most 1374 // significant byte, '2' in the second least significant byte, and '1' 1375 // in the least significant byte, and then writing down one digit for 1376 // each byte, starting with the byte at the lowest address at the left, 1377 // and proceeding to the byte with the highest address at the right. 1378 1379 // This file defines `__BYTE_ORDER' for the particular machine. 1380 1381 // RISC-V is little-endian. 1382 1383 // Some machines may need to use a different endianness for floating point 1384 // values. 1385 1386 // bits/types.h -- definitions of __*_t types underlying *_t types. 1387 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1388 // This file is part of the GNU C Library. 1389 // 1390 // The GNU C Library is free software; you can redistribute it and/or 1391 // modify it under the terms of the GNU Lesser General Public 1392 // License as published by the Free Software Foundation; either 1393 // version 2.1 of the License, or (at your option) any later version. 1394 // 1395 // The GNU C Library is distributed in the hope that it will be useful, 1396 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1397 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1398 // Lesser General Public License for more details. 1399 // 1400 // You should have received a copy of the GNU Lesser General Public 1401 // License along with the GNU C Library; if not, see 1402 // <https://www.gnu.org/licenses/>. 1403 1404 // Never include this file directly; use <sys/types.h> instead. 1405 1406 // Returned by `time'. 1407 type Time_t = X__time_t /* time_t.h:10:18 */ 1408 1409 // POSIX.1b structure for a time value. This is like a `struct timeval' but 1410 // 1411 // has nanoseconds instead of microseconds. 1412 type Timespec = struct { 1413 Ftv_sec X__time_t 1414 Ftv_nsec X__syscall_slong_t 1415 } /* struct_timespec.h:11:1 */ 1416 1417 // Determine the wordsize from the preprocessor defines. RISC-V version. 1418 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1419 // This file is part of the GNU C Library. 1420 // 1421 // The GNU C Library is free software; you can redistribute it and/or 1422 // modify it under the terms of the GNU Lesser General Public 1423 // License as published by the Free Software Foundation; either 1424 // version 2.1 of the License, or (at your option) any later version. 1425 // 1426 // The GNU C Library is distributed in the hope that it will be useful, 1427 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1428 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1429 // Lesser General Public License for more details. 1430 // 1431 // You should have received a copy of the GNU Lesser General Public 1432 // License along with the GNU C Library. If not, see 1433 // <https://www.gnu.org/licenses/>. 1434 1435 // bits/types.h -- definitions of __*_t types underlying *_t types. 1436 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1437 // This file is part of the GNU C Library. 1438 // 1439 // The GNU C Library is free software; you can redistribute it and/or 1440 // modify it under the terms of the GNU Lesser General Public 1441 // License as published by the Free Software Foundation; either 1442 // version 2.1 of the License, or (at your option) any later version. 1443 // 1444 // The GNU C Library is distributed in the hope that it will be useful, 1445 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1446 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1447 // Lesser General Public License for more details. 1448 // 1449 // You should have received a copy of the GNU Lesser General Public 1450 // License along with the GNU C Library; if not, see 1451 // <https://www.gnu.org/licenses/>. 1452 1453 // Never include this file directly; use <sys/types.h> instead. 1454 1455 // Define __sigval_t. 1456 // Copyright (C) 1997-2021 Free Software Foundation, Inc. 1457 // This file is part of the GNU C Library. 1458 // 1459 // The GNU C Library is free software; you can redistribute it and/or 1460 // modify it under the terms of the GNU Lesser General Public 1461 // License as published by the Free Software Foundation; either 1462 // version 2.1 of the License, or (at your option) any later version. 1463 // 1464 // The GNU C Library is distributed in the hope that it will be useful, 1465 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1466 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1467 // Lesser General Public License for more details. 1468 // 1469 // You should have received a copy of the GNU Lesser General Public 1470 // License along with the GNU C Library; if not, see 1471 // <https://www.gnu.org/licenses/>. 1472 1473 // Type for data associated with a signal. 1474 type Sigval = struct { 1475 F__ccgo_pad1 [0]uint64 1476 Fsival_int int32 1477 F__ccgo_pad2 [4]byte 1478 } /* __sigval_t.h:24:1 */ 1479 1480 type X__sigval_t = Sigval /* __sigval_t.h:30:22 */ 1481 1482 // Some fields of siginfo_t have architecture-specific variations. 1483 // Architecture-specific adjustments to siginfo_t. 1484 1485 // This architecture has no adjustments to make to siginfo_t. 1486 1487 type Siginfo_t = struct { 1488 Fsi_signo int32 1489 Fsi_errno int32 1490 Fsi_code int32 1491 F__pad0 int32 1492 F_sifields struct { 1493 F__ccgo_pad1 [0]uint64 1494 F_pad [28]int32 1495 } 1496 } /* siginfo_t.h:124:5 */ 1497 1498 // Architectures might also add architecture-specific constants. 1499 // These are all considered GNU extensions. 1500 1501 // Define __sigval_t. 1502 // Copyright (C) 1997-2021 Free Software Foundation, Inc. 1503 // This file is part of the GNU C Library. 1504 // 1505 // The GNU C Library is free software; you can redistribute it and/or 1506 // modify it under the terms of the GNU Lesser General Public 1507 // License as published by the Free Software Foundation; either 1508 // version 2.1 of the License, or (at your option) any later version. 1509 // 1510 // The GNU C Library is distributed in the hope that it will be useful, 1511 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1512 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1513 // Lesser General Public License for more details. 1514 // 1515 // You should have received a copy of the GNU Lesser General Public 1516 // License along with the GNU C Library; if not, see 1517 // <https://www.gnu.org/licenses/>. 1518 1519 // To avoid sigval_t (not a standard type name) having C++ name 1520 // mangling depending on whether the selected standard includes union 1521 // sigval, it should not be defined at all when using a standard for 1522 // which the sigval name is not reserved; in that case, headers should 1523 // not include <bits/types/sigval_t.h> and should use only the 1524 // internal __sigval_t name. 1525 1526 type Sigval_t = X__sigval_t /* sigval_t.h:16:20 */ 1527 1528 // Determine the wordsize from the preprocessor defines. RISC-V version. 1529 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1530 // This file is part of the GNU C Library. 1531 // 1532 // The GNU C Library is free software; you can redistribute it and/or 1533 // modify it under the terms of the GNU Lesser General Public 1534 // License as published by the Free Software Foundation; either 1535 // version 2.1 of the License, or (at your option) any later version. 1536 // 1537 // The GNU C Library is distributed in the hope that it will be useful, 1538 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1539 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1540 // Lesser General Public License for more details. 1541 // 1542 // You should have received a copy of the GNU Lesser General Public 1543 // License along with the GNU C Library. If not, see 1544 // <https://www.gnu.org/licenses/>. 1545 1546 // bits/types.h -- definitions of __*_t types underlying *_t types. 1547 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1548 // This file is part of the GNU C Library. 1549 // 1550 // The GNU C Library is free software; you can redistribute it and/or 1551 // modify it under the terms of the GNU Lesser General Public 1552 // License as published by the Free Software Foundation; either 1553 // version 2.1 of the License, or (at your option) any later version. 1554 // 1555 // The GNU C Library is distributed in the hope that it will be useful, 1556 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1557 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1558 // Lesser General Public License for more details. 1559 // 1560 // You should have received a copy of the GNU Lesser General Public 1561 // License along with the GNU C Library; if not, see 1562 // <https://www.gnu.org/licenses/>. 1563 1564 // Never include this file directly; use <sys/types.h> instead. 1565 1566 // Define __sigval_t. 1567 // Copyright (C) 1997-2021 Free Software Foundation, Inc. 1568 // This file is part of the GNU C Library. 1569 // 1570 // The GNU C Library is free software; you can redistribute it and/or 1571 // modify it under the terms of the GNU Lesser General Public 1572 // License as published by the Free Software Foundation; either 1573 // version 2.1 of the License, or (at your option) any later version. 1574 // 1575 // The GNU C Library is distributed in the hope that it will be useful, 1576 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1577 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1578 // Lesser General Public License for more details. 1579 // 1580 // You should have received a copy of the GNU Lesser General Public 1581 // License along with the GNU C Library; if not, see 1582 // <https://www.gnu.org/licenses/>. 1583 1584 // Forward declaration. 1585 type Pthread_attr_t1 = struct { 1586 F__ccgo_pad1 [0]uint64 1587 F__size [56]uint8 1588 } /* sigevent_t.h:17:9 */ 1589 1590 // Determine the wordsize from the preprocessor defines. RISC-V version. 1591 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1592 // This file is part of the GNU C Library. 1593 // 1594 // The GNU C Library is free software; you can redistribute it and/or 1595 // modify it under the terms of the GNU Lesser General Public 1596 // License as published by the Free Software Foundation; either 1597 // version 2.1 of the License, or (at your option) any later version. 1598 // 1599 // The GNU C Library is distributed in the hope that it will be useful, 1600 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1601 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1602 // Lesser General Public License for more details. 1603 // 1604 // You should have received a copy of the GNU Lesser General Public 1605 // License along with the GNU C Library. If not, see 1606 // <https://www.gnu.org/licenses/>. 1607 1608 // bits/types.h -- definitions of __*_t types underlying *_t types. 1609 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1610 // This file is part of the GNU C Library. 1611 // 1612 // The GNU C Library is free software; you can redistribute it and/or 1613 // modify it under the terms of the GNU Lesser General Public 1614 // License as published by the Free Software Foundation; either 1615 // version 2.1 of the License, or (at your option) any later version. 1616 // 1617 // The GNU C Library is distributed in the hope that it will be useful, 1618 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1619 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1620 // Lesser General Public License for more details. 1621 // 1622 // You should have received a copy of the GNU Lesser General Public 1623 // License along with the GNU C Library; if not, see 1624 // <https://www.gnu.org/licenses/>. 1625 1626 // Never include this file directly; use <sys/types.h> instead. 1627 1628 // Define __sigval_t. 1629 // Copyright (C) 1997-2021 Free Software Foundation, Inc. 1630 // This file is part of the GNU C Library. 1631 // 1632 // The GNU C Library is free software; you can redistribute it and/or 1633 // modify it under the terms of the GNU Lesser General Public 1634 // License as published by the Free Software Foundation; either 1635 // version 2.1 of the License, or (at your option) any later version. 1636 // 1637 // The GNU C Library is distributed in the hope that it will be useful, 1638 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1639 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1640 // Lesser General Public License for more details. 1641 // 1642 // You should have received a copy of the GNU Lesser General Public 1643 // License along with the GNU C Library; if not, see 1644 // <https://www.gnu.org/licenses/>. 1645 1646 // Forward declaration. 1647 type Pthread_attr_t = Pthread_attr_t1 /* sigevent_t.h:17:30 */ 1648 1649 // Structure to transport application-defined values with signals. 1650 type Sigevent = struct { 1651 Fsigev_value X__sigval_t 1652 Fsigev_signo int32 1653 Fsigev_notify int32 1654 F_sigev_un struct { 1655 F__ccgo_pad1 [0]uint64 1656 F_pad [12]int32 1657 } 1658 } /* sigevent_t.h:22:9 */ 1659 1660 // Structure to transport application-defined values with signals. 1661 type Sigevent_t = Sigevent /* sigevent_t.h:42:5 */ 1662 1663 // Type of a signal handler. 1664 type X__sighandler_t = uintptr /* signal.h:72:14 */ 1665 1666 // 4.4 BSD uses the name `sig_t' for this. 1667 type Sig_t = X__sighandler_t /* signal.h:193:24 */ 1668 1669 // Get the system-specific definitions of `struct sigaction' 1670 // and the `SA_*' and `SIG_*'. constants. 1671 // The proper definitions for Linux's sigaction. 1672 // Copyright (C) 1993-2021 Free Software Foundation, Inc. 1673 // This file is part of the GNU C Library. 1674 // 1675 // The GNU C Library is free software; you can redistribute it and/or 1676 // modify it under the terms of the GNU Lesser General Public 1677 // License as published by the Free Software Foundation; either 1678 // version 2.1 of the License, or (at your option) any later version. 1679 // 1680 // The GNU C Library is distributed in the hope that it will be useful, 1681 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1682 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1683 // Lesser General Public License for more details. 1684 // 1685 // You should have received a copy of the GNU Lesser General Public 1686 // License along with the GNU C Library; if not, see 1687 // <https://www.gnu.org/licenses/>. 1688 1689 // Structure describing the action to be taken when a signal arrives. 1690 type Sigaction = struct { 1691 F__sigaction_handler struct{ Fsa_handler X__sighandler_t } 1692 Fsa_mask X__sigset_t 1693 Fsa_flags int32 1694 F__ccgo_pad1 [4]byte 1695 Fsa_restorer uintptr 1696 } /* sigaction.h:27:1 */ 1697 1698 // Get machine-dependent `struct sigcontext' and signal subcodes. 1699 // Machine-dependent signal context structure for Linux. RISC-V version. 1700 // Copyright (C) 1996-2021 Free Software Foundation, Inc. This file is part of the GNU C Library. 1701 // 1702 // The GNU C Library is free software; you can redistribute it and/or 1703 // modify it under the terms of the GNU Lesser General Public 1704 // License as published by the Free Software Foundation; either 1705 // version 2.1 of the License, or (at your option) any later version. 1706 // 1707 // The GNU C Library is distributed in the hope that it will be useful, 1708 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1709 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1710 // Lesser General Public License for more details. 1711 // 1712 // You should have received a copy of the GNU Lesser General Public 1713 // License along with the GNU C Library. If not, see 1714 // <https://www.gnu.org/licenses/>. 1715 1716 type Sigcontext = struct { 1717 Fgregs [32]uint64 1718 Ffpregs [66]uint64 1719 } /* sigcontext.h:25:1 */ 1720 1721 // Wide character type. 1722 // Locale-writers should change this as necessary to 1723 // be big enough to hold unique values not between 0 and 127, 1724 // and not (wchar_t) -1, for each defined multibyte character. 1725 1726 // Define this type if we are doing the whole job, 1727 // or if we want this type in particular. 1728 1729 // A null pointer constant. 1730 1731 // Define stack_t. Linux version. 1732 // Copyright (C) 1998-2021 Free Software Foundation, Inc. 1733 // This file is part of the GNU C Library. 1734 // 1735 // The GNU C Library is free software; you can redistribute it and/or 1736 // modify it under the terms of the GNU Lesser General Public 1737 // License as published by the Free Software Foundation; either 1738 // version 2.1 of the License, or (at your option) any later version. 1739 // 1740 // The GNU C Library is distributed in the hope that it will be useful, 1741 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1742 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1743 // Lesser General Public License for more details. 1744 // 1745 // You should have received a copy of the GNU Lesser General Public 1746 // License along with the GNU C Library; if not, see 1747 // <https://www.gnu.org/licenses/>. 1748 1749 // Copyright (C) 1989-2021 Free Software Foundation, Inc. 1750 // 1751 // This file is part of GCC. 1752 // 1753 // GCC is free software; you can redistribute it and/or modify 1754 // it under the terms of the GNU General Public License as published by 1755 // the Free Software Foundation; either version 3, or (at your option) 1756 // any later version. 1757 // 1758 // GCC is distributed in the hope that it will be useful, 1759 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1760 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1761 // GNU General Public License for more details. 1762 // 1763 // Under Section 7 of GPL version 3, you are granted additional 1764 // permissions described in the GCC Runtime Library Exception, version 1765 // 3.1, as published by the Free Software Foundation. 1766 // 1767 // You should have received a copy of the GNU General Public License and 1768 // a copy of the GCC Runtime Library Exception along with this program; 1769 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 1770 // <http://www.gnu.org/licenses/>. 1771 1772 // ISO C Standard: 7.17 Common definitions <stddef.h> 1773 1774 // Any one of these symbols __need_* means that GNU libc 1775 // wants us just to define one data type. So don't define 1776 // the symbols that indicate this file's entire job has been done. 1777 1778 // This avoids lossage on SunOS but only if stdtypes.h comes first. 1779 // There's no way to win with the other order! Sun lossage. 1780 1781 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 1782 // Just ignore it. 1783 1784 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 1785 // _TYPE_size_t which will typedef size_t. fixincludes patched the 1786 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 1787 // not defined, and so that defining this macro defines _GCC_SIZE_T. 1788 // If we find that the macros are still defined at this point, we must 1789 // invoke them so that the type is defined as expected. 1790 1791 // In case nobody has defined these types, but we aren't running under 1792 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 1793 // __WCHAR_TYPE__ have reasonable values. This can happen if the 1794 // parts of GCC is compiled by an older compiler, that actually 1795 // include gstddef.h, such as collect2. 1796 1797 // Signed type of difference of two pointers. 1798 1799 // Define this type if we are doing the whole job, 1800 // or if we want this type in particular. 1801 1802 // Unsigned type of `sizeof' something. 1803 1804 // Define this type if we are doing the whole job, 1805 // or if we want this type in particular. 1806 1807 // Wide character type. 1808 // Locale-writers should change this as necessary to 1809 // be big enough to hold unique values not between 0 and 127, 1810 // and not (wchar_t) -1, for each defined multibyte character. 1811 1812 // Define this type if we are doing the whole job, 1813 // or if we want this type in particular. 1814 1815 // A null pointer constant. 1816 1817 // Structure describing a signal stack. 1818 type Stack_t = struct { 1819 Fss_sp uintptr 1820 Fss_flags int32 1821 F__ccgo_pad1 [4]byte 1822 Fss_size Size_t 1823 } /* stack_t.h:31:5 */ 1824 1825 // This will define `ucontext_t' and `mcontext_t'. 1826 // struct ucontext definition, RISC-V version. 1827 // Copyright (C) 1997-2021 Free Software Foundation, Inc. 1828 // This file is part of the GNU C Library. 1829 // 1830 // The GNU C Library is free software; you can redistribute it and/or 1831 // modify it under the terms of the GNU Lesser General Public 1832 // License as published by the Free Software Foundation; either 1833 // version 2.1 of the License, or (at your option) any later version. 1834 // 1835 // The GNU C Library is distributed in the hope that it will be useful, 1836 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1837 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1838 // Lesser General Public License for more details. 1839 // 1840 // You should have received a copy of the GNU Lesser General Public 1841 // License along with the GNU C Library. If not, see 1842 // <https://www.gnu.org/licenses/>. 1843 1844 // Don't rely on this, the interface is currently messed up and may need to 1845 // be broken to be fixed. 1846 1847 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 1848 // This file is part of the GNU C Library. 1849 // 1850 // The GNU C Library is free software; you can redistribute it and/or 1851 // modify it under the terms of the GNU Lesser General Public 1852 // License as published by the Free Software Foundation; either 1853 // version 2.1 of the License, or (at your option) any later version. 1854 // 1855 // The GNU C Library is distributed in the hope that it will be useful, 1856 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1857 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1858 // Lesser General Public License for more details. 1859 // 1860 // You should have received a copy of the GNU Lesser General Public 1861 // License along with the GNU C Library; if not, see 1862 // <https://www.gnu.org/licenses/>. 1863 1864 // Define stack_t. Linux version. 1865 // Copyright (C) 1998-2021 Free Software Foundation, Inc. 1866 // This file is part of the GNU C Library. 1867 // 1868 // The GNU C Library is free software; you can redistribute it and/or 1869 // modify it under the terms of the GNU Lesser General Public 1870 // License as published by the Free Software Foundation; either 1871 // version 2.1 of the License, or (at your option) any later version. 1872 // 1873 // The GNU C Library is distributed in the hope that it will be useful, 1874 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1875 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1876 // Lesser General Public License for more details. 1877 // 1878 // You should have received a copy of the GNU Lesser General Public 1879 // License along with the GNU C Library; if not, see 1880 // <https://www.gnu.org/licenses/>. 1881 1882 type X__riscv_mc_gp_state = [32]uint64 /* ucontext.h:29:27 */ 1883 1884 type Greg_t = uint64 /* ucontext.h:44:27 */ 1885 1886 // Container for all general registers. 1887 type Gregset_t = X__riscv_mc_gp_state /* ucontext.h:47:29 */ 1888 1889 // Container for floating-point state. 1890 type X__riscv_mc_fp_state = struct { 1891 F__ccgo_pad1 [0]uint64 1892 F__f struct { 1893 F__f [32]uint32 1894 F__fcsr uint32 1895 } 1896 F__ccgo_pad2 [396]byte 1897 } /* ucontext.h:50:9 */ 1898 1899 // Container for floating-point state. 1900 type Fpregset_t = X__riscv_mc_fp_state /* ucontext.h:50:35 */ 1901 1902 type X__riscv_mc_f_ext_state = struct { 1903 F__f [32]uint32 1904 F__fcsr uint32 1905 } /* ucontext.h:50:9 */ 1906 1907 type X__riscv_mc_d_ext_state = struct { 1908 F__f [32]uint64 1909 F__fcsr uint32 1910 F__ccgo_pad1 [4]byte 1911 } /* ucontext.h:50:9 */ 1912 1913 type X__riscv_mc_q_ext_state = struct { 1914 F__f [64]uint64 1915 F__fcsr uint32 1916 F__glibc_reserved [3]uint32 1917 } /* ucontext.h:50:9 */ 1918 1919 type Mcontext_t1 = struct { 1920 F__gregs X__riscv_mc_gp_state 1921 F__fpregs struct { 1922 F__ccgo_pad1 [0]uint64 1923 F__f struct { 1924 F__f [32]uint32 1925 F__fcsr uint32 1926 } 1927 F__ccgo_pad2 [396]byte 1928 } 1929 } /* ucontext.h:81:9 */ 1930 1931 type Mcontext_t = Mcontext_t1 /* ucontext.h:85:5 */ 1932 1933 // Userlevel context. 1934 type Ucontext_t1 = struct { 1935 F__ccgo_pad1 [0]uint64 1936 F__uc_flags uint64 1937 Fuc_link uintptr 1938 Fuc_stack Stack_t 1939 Fuc_sigmask Sigset_t 1940 F__ccgo_pad2 [784]byte 1941 } /* ucontext.h:88:9 */ 1942 1943 // Userlevel context. 1944 type Ucontext_t = Ucontext_t1 /* ucontext.h:108:5 */ 1945 1946 // Define struct sigstack. 1947 // Copyright (C) 1998-2021 Free Software Foundation, Inc. 1948 // This file is part of the GNU C Library. 1949 // 1950 // The GNU C Library is free software; you can redistribute it and/or 1951 // modify it under the terms of the GNU Lesser General Public 1952 // License as published by the Free Software Foundation; either 1953 // version 2.1 of the License, or (at your option) any later version. 1954 // 1955 // The GNU C Library is distributed in the hope that it will be useful, 1956 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1957 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1958 // Lesser General Public License for more details. 1959 // 1960 // You should have received a copy of the GNU Lesser General Public 1961 // License along with the GNU C Library; if not, see 1962 // <https://www.gnu.org/licenses/>. 1963 1964 // Structure describing a signal stack (obsolete). 1965 type Sigstack = struct { 1966 Fss_sp uintptr 1967 Fss_onstack int32 1968 F__ccgo_pad1 [4]byte 1969 } /* struct_sigstack.h:23:1 */ 1970 1971 // Some of the functions for handling signals in threaded programs must 1972 // be defined here. 1973 // Declaration of common pthread types for all architectures. 1974 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 1975 // This file is part of the GNU C Library. 1976 // 1977 // The GNU C Library is free software; you can redistribute it and/or 1978 // modify it under the terms of the GNU Lesser General Public 1979 // License as published by the Free Software Foundation; either 1980 // version 2.1 of the License, or (at your option) any later version. 1981 // 1982 // The GNU C Library is distributed in the hope that it will be useful, 1983 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1984 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1985 // Lesser General Public License for more details. 1986 // 1987 // You should have received a copy of the GNU Lesser General Public 1988 // License along with the GNU C Library; if not, see 1989 // <https://www.gnu.org/licenses/>. 1990 1991 // For internal mutex and condition variable definitions. 1992 // Common threading primitives definitions for both POSIX and C11. 1993 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 1994 // This file is part of the GNU C Library. 1995 // 1996 // The GNU C Library is free software; you can redistribute it and/or 1997 // modify it under the terms of the GNU Lesser General Public 1998 // License as published by the Free Software Foundation; either 1999 // version 2.1 of the License, or (at your option) any later version. 2000 // 2001 // The GNU C Library is distributed in the hope that it will be useful, 2002 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2003 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2004 // Lesser General Public License for more details. 2005 // 2006 // You should have received a copy of the GNU Lesser General Public 2007 // License along with the GNU C Library; if not, see 2008 // <https://www.gnu.org/licenses/>. 2009 2010 // Arch-specific definitions. Each architecture must define the following 2011 // macros to define the expected sizes of pthread data types: 2012 // 2013 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 2014 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 2015 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 2016 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 2017 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 2018 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 2019 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 2020 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 2021 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 2022 // 2023 // The additional macro defines any constraint for the lock alignment 2024 // inside the thread structures: 2025 // 2026 // __LOCK_ALIGNMENT - for internal lock/futex usage. 2027 // 2028 // Same idea but for the once locking primitive: 2029 // 2030 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 2031 2032 // Machine-specific pthread type layouts. RISC-V version. 2033 // Copyright (C) 2011-2021 Free Software Foundation, Inc. 2034 // This file is part of the GNU C Library. 2035 // 2036 // The GNU C Library is free software; you can redistribute it and/or 2037 // modify it under the terms of the GNU Lesser General Public 2038 // License as published by the Free Software Foundation; either 2039 // version 2.1 of the License, or (at your option) any later version. 2040 // 2041 // The GNU C Library is distributed in the hope that it will be useful, 2042 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2043 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2044 // Lesser General Public License for more details. 2045 // 2046 // You should have received a copy of the GNU Lesser General Public 2047 // License along with the GNU C Library. If not, see 2048 // <https://www.gnu.org/licenses/>. 2049 2050 // Endian macros for string.h functions 2051 // Copyright (C) 1992-2021 Free Software Foundation, Inc. 2052 // This file is part of the GNU C Library. 2053 // 2054 // The GNU C Library is free software; you can redistribute it and/or 2055 // modify it under the terms of the GNU Lesser General Public 2056 // License as published by the Free Software Foundation; either 2057 // version 2.1 of the License, or (at your option) any later version. 2058 // 2059 // The GNU C Library is distributed in the hope that it will be useful, 2060 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2061 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2062 // Lesser General Public License for more details. 2063 // 2064 // You should have received a copy of the GNU Lesser General Public 2065 // License along with the GNU C Library; if not, see 2066 // <http://www.gnu.org/licenses/>. 2067 2068 // Common definition of pthread_mutex_t. 2069 2070 type X__pthread_internal_list = struct { 2071 F__prev uintptr 2072 F__next uintptr 2073 } /* thread-shared-types.h:49:9 */ 2074 2075 // Some of the functions for handling signals in threaded programs must 2076 // be defined here. 2077 // Declaration of common pthread types for all architectures. 2078 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 2079 // This file is part of the GNU C Library. 2080 // 2081 // The GNU C Library is free software; you can redistribute it and/or 2082 // modify it under the terms of the GNU Lesser General Public 2083 // License as published by the Free Software Foundation; either 2084 // version 2.1 of the License, or (at your option) any later version. 2085 // 2086 // The GNU C Library is distributed in the hope that it will be useful, 2087 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2088 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2089 // Lesser General Public License for more details. 2090 // 2091 // You should have received a copy of the GNU Lesser General Public 2092 // License along with the GNU C Library; if not, see 2093 // <https://www.gnu.org/licenses/>. 2094 2095 // For internal mutex and condition variable definitions. 2096 // Common threading primitives definitions for both POSIX and C11. 2097 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 2098 // This file is part of the GNU C Library. 2099 // 2100 // The GNU C Library is free software; you can redistribute it and/or 2101 // modify it under the terms of the GNU Lesser General Public 2102 // License as published by the Free Software Foundation; either 2103 // version 2.1 of the License, or (at your option) any later version. 2104 // 2105 // The GNU C Library is distributed in the hope that it will be useful, 2106 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2107 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2108 // Lesser General Public License for more details. 2109 // 2110 // You should have received a copy of the GNU Lesser General Public 2111 // License along with the GNU C Library; if not, see 2112 // <https://www.gnu.org/licenses/>. 2113 2114 // Arch-specific definitions. Each architecture must define the following 2115 // macros to define the expected sizes of pthread data types: 2116 // 2117 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 2118 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 2119 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 2120 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 2121 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 2122 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 2123 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 2124 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 2125 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 2126 // 2127 // The additional macro defines any constraint for the lock alignment 2128 // inside the thread structures: 2129 // 2130 // __LOCK_ALIGNMENT - for internal lock/futex usage. 2131 // 2132 // Same idea but for the once locking primitive: 2133 // 2134 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 2135 2136 // Machine-specific pthread type layouts. RISC-V version. 2137 // Copyright (C) 2011-2021 Free Software Foundation, Inc. 2138 // This file is part of the GNU C Library. 2139 // 2140 // The GNU C Library is free software; you can redistribute it and/or 2141 // modify it under the terms of the GNU Lesser General Public 2142 // License as published by the Free Software Foundation; either 2143 // version 2.1 of the License, or (at your option) any later version. 2144 // 2145 // The GNU C Library is distributed in the hope that it will be useful, 2146 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2147 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2148 // Lesser General Public License for more details. 2149 // 2150 // You should have received a copy of the GNU Lesser General Public 2151 // License along with the GNU C Library. If not, see 2152 // <https://www.gnu.org/licenses/>. 2153 2154 // Endian macros for string.h functions 2155 // Copyright (C) 1992-2021 Free Software Foundation, Inc. 2156 // This file is part of the GNU C Library. 2157 // 2158 // The GNU C Library is free software; you can redistribute it and/or 2159 // modify it under the terms of the GNU Lesser General Public 2160 // License as published by the Free Software Foundation; either 2161 // version 2.1 of the License, or (at your option) any later version. 2162 // 2163 // The GNU C Library is distributed in the hope that it will be useful, 2164 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2165 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2166 // Lesser General Public License for more details. 2167 // 2168 // You should have received a copy of the GNU Lesser General Public 2169 // License along with the GNU C Library; if not, see 2170 // <http://www.gnu.org/licenses/>. 2171 2172 // Common definition of pthread_mutex_t. 2173 2174 type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ 2175 2176 type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ 2177 2178 type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ 2179 2180 // Arch-specific mutex definitions. A generic implementation is provided 2181 // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture 2182 // can override it by defining: 2183 // 2184 // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t 2185 // definition). It should contains at least the internal members 2186 // defined in the generic version. 2187 // 2188 // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with 2189 // atomic operations. 2190 // 2191 // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. 2192 // It should initialize the mutex internal flag. 2193 2194 // Default mutex implementation struct definitions. 2195 // Copyright (C) 2019-2021 Free Software Foundation, Inc. 2196 // This file is part of the GNU C Library. 2197 // 2198 // The GNU C Library is free software; you can redistribute it and/or 2199 // modify it under the terms of the GNU Lesser General Public 2200 // License as published by the Free Software Foundation; either 2201 // version 2.1 of the License, or (at your option) any later version. 2202 // 2203 // The GNU C Library is distributed in the hope that it will be useful, 2204 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2205 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2206 // Lesser General Public License for more details. 2207 // 2208 // You should have received a copy of the GNU Lesser General Public 2209 // License along with the GNU C Library; if not, see 2210 // <http://www.gnu.org/licenses/>. 2211 2212 // Generic struct for both POSIX and C11 mutexes. New ports are expected 2213 // to use the default layout, however architecture can redefine it to 2214 // add arch-specific extension (such as lock-elision). The struct have 2215 // a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. 2216 2217 type X__pthread_mutex_s = struct { 2218 F__lock int32 2219 F__count uint32 2220 F__owner int32 2221 F__nusers uint32 2222 F__kind int32 2223 F__spins int32 2224 F__list X__pthread_list_t 2225 } /* struct_mutex.h:27:1 */ 2226 2227 // Arch-sepecific read-write lock definitions. A generic implementation is 2228 // provided by struct_rwlock.h. If required, an architecture can override it 2229 // by defining: 2230 // 2231 // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). 2232 // It should contain at least the internal members defined in the 2233 // generic version. 2234 // 2235 // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. 2236 // It should initialize the rwlock internal type. 2237 2238 // RISC-V internal rwlock struct definitions. 2239 // Copyright (C) 2019-2021 Free Software Foundation, Inc. 2240 // 2241 // This file is part of the GNU C Library. 2242 // 2243 // The GNU C Library is free software; you can redistribute it and/or 2244 // modify it under the terms of the GNU Lesser General Public 2245 // License as published by the Free Software Foundation; either 2246 // version 2.1 of the License, or (at your option) any later version. 2247 // 2248 // The GNU C Library is distributed in the hope that it will be useful, 2249 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2250 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2251 // Lesser General Public License for more details. 2252 // 2253 // You should have received a copy of the GNU Lesser General Public 2254 // License along with the GNU C Library; if not, see 2255 // <https://www.gnu.org/licenses/>. 2256 2257 // There is a lot of padding in this structure. While it's not strictly 2258 // 2259 // necessary on RISC-V, we're going to leave it in to be on the safe side in 2260 // case it's needed in the future. Most other architectures have the padding, 2261 // so this gives us the same extensibility as everyone else has. 2262 type X__pthread_rwlock_arch_t = struct { 2263 F__readers uint32 2264 F__writers uint32 2265 F__wrphase_futex uint32 2266 F__writers_futex uint32 2267 F__pad3 uint32 2268 F__pad4 uint32 2269 F__cur_writer int32 2270 F__shared int32 2271 F__pad1 uint64 2272 F__pad2 uint64 2273 F__flags uint32 2274 F__ccgo_pad1 [4]byte 2275 } /* struct_rwlock.h:27:1 */ 2276 2277 // Common definition of pthread_cond_t. 2278 2279 type X__pthread_cond_s = struct { 2280 F__0 struct{ F__wseq uint64 } 2281 F__8 struct{ F__g1_start uint64 } 2282 F__g_refs [2]uint32 2283 F__g_size [2]uint32 2284 F__g1_orig_size uint32 2285 F__wrefs uint32 2286 F__g_signals [2]uint32 2287 } /* thread-shared-types.h:92:1 */ 2288 2289 type X__tss_t = uint32 /* thread-shared-types.h:119:22 */ 2290 type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ 2291 2292 type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ 2293 2294 // Thread identifiers. The structure of the attribute type is not 2295 // 2296 // exposed on purpose. 2297 type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ 2298 2299 // Data structures for mutex handling. The structure of the attribute 2300 // 2301 // type is not exposed on purpose. 2302 type Pthread_mutexattr_t = struct { 2303 F__ccgo_pad1 [0]uint32 2304 F__size [4]uint8 2305 } /* pthreadtypes.h:36:3 */ 2306 2307 // Data structure for condition variable handling. The structure of 2308 // 2309 // the attribute type is not exposed on purpose. 2310 type Pthread_condattr_t = struct { 2311 F__ccgo_pad1 [0]uint32 2312 F__size [4]uint8 2313 } /* pthreadtypes.h:45:3 */ 2314 2315 // Keys for thread-specific data 2316 type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ 2317 2318 // Once-only execution 2319 type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ 2320 2321 type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ 2322 2323 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ 2324 2325 // Data structure for reader-writer lock variable handling. The 2326 // 2327 // structure of the attribute type is deliberately not exposed. 2328 type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ 2329 2330 type Pthread_rwlockattr_t = struct { 2331 F__ccgo_pad1 [0]uint64 2332 F__size [8]uint8 2333 } /* pthreadtypes.h:97:3 */ 2334 2335 // POSIX spinlock data type. 2336 type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ 2337 2338 // POSIX barriers data type. The structure of the type is 2339 // 2340 // deliberately not exposed. 2341 type Pthread_barrier_t = struct { 2342 F__ccgo_pad1 [0]uint64 2343 F__size [32]uint8 2344 } /* pthreadtypes.h:112:3 */ 2345 2346 type Pthread_barrierattr_t = struct { 2347 F__ccgo_pad1 [0]uint32 2348 F__size [4]uint8 2349 } /* pthreadtypes.h:118:3 */ 2350 2351 // System-specific extensions. 2352 // System-specific extensions of <signal.h>, Linux version. 2353 // Copyright (C) 2019-2021 Free Software Foundation, Inc. 2354 // This file is part of the GNU C Library. 2355 // 2356 // The GNU C Library is free software; you can redistribute it and/or 2357 // modify it under the terms of the GNU Lesser General Public 2358 // License as published by the Free Software Foundation; either 2359 // version 2.1 of the License, or (at your option) any later version. 2360 // 2361 // The GNU C Library is distributed in the hope that it will be useful, 2362 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2363 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2364 // Lesser General Public License for more details. 2365 // 2366 // You should have received a copy of the GNU Lesser General Public 2367 // License along with the GNU C Library; if not, see 2368 // <https://www.gnu.org/licenses/>. 2369 2370 var _ uint8 /* gen.c:2:13: */