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