github.com/afumu/libc@v0.0.6/sys/socket/socket_linux_riscv64.go (about) 1 // Code generated by 'ccgo sys/socket/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/socket/socket_linux_riscv64.go -pkgname socket', DO NOT EDIT. 2 3 package socket 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 AF_ALG = 38 19 AF_APPLETALK = 5 20 AF_ASH = 18 21 AF_ATMPVC = 8 22 AF_ATMSVC = 20 23 AF_AX25 = 3 24 AF_BLUETOOTH = 31 25 AF_BRIDGE = 7 26 AF_CAIF = 37 27 AF_CAN = 29 28 AF_DECnet = 12 29 AF_ECONET = 19 30 AF_FILE = 1 31 AF_IB = 27 32 AF_IEEE802154 = 36 33 AF_INET = 2 34 AF_INET6 = 10 35 AF_IPX = 4 36 AF_IRDA = 23 37 AF_ISDN = 34 38 AF_IUCV = 32 39 AF_KCM = 41 40 AF_KEY = 15 41 AF_LLC = 26 42 AF_LOCAL = 1 43 AF_MAX = 45 44 AF_MPLS = 28 45 AF_NETBEUI = 13 46 AF_NETLINK = 16 47 AF_NETROM = 6 48 AF_NFC = 39 49 AF_PACKET = 17 50 AF_PHONET = 35 51 AF_PPPOX = 24 52 AF_QIPCRTR = 42 53 AF_RDS = 21 54 AF_ROSE = 11 55 AF_ROUTE = 16 56 AF_RXRPC = 33 57 AF_SECURITY = 14 58 AF_SMC = 43 59 AF_SNA = 22 60 AF_TIPC = 30 61 AF_UNIX = 1 62 AF_UNSPEC = 0 63 AF_VSOCK = 40 64 AF_WANPIPE = 25 65 AF_X25 = 9 66 AF_XDP = 44 67 BIG_ENDIAN = 4321 68 BYTE_ORDER = 1234 69 FD_SETSIZE = 1024 70 FIOGETOWN = 0x8903 71 FIOSETOWN = 0x8901 72 LITTLE_ENDIAN = 1234 73 PDP_ENDIAN = 3412 74 PF_ALG = 38 75 PF_APPLETALK = 5 76 PF_ASH = 18 77 PF_ATMPVC = 8 78 PF_ATMSVC = 20 79 PF_AX25 = 3 80 PF_BLUETOOTH = 31 81 PF_BRIDGE = 7 82 PF_CAIF = 37 83 PF_CAN = 29 84 PF_DECnet = 12 85 PF_ECONET = 19 86 PF_FILE = 1 87 PF_IB = 27 88 PF_IEEE802154 = 36 89 PF_INET = 2 90 PF_INET6 = 10 91 PF_IPX = 4 92 PF_IRDA = 23 93 PF_ISDN = 34 94 PF_IUCV = 32 95 PF_KCM = 41 96 PF_KEY = 15 97 PF_LLC = 26 98 PF_LOCAL = 1 99 PF_MAX = 45 100 PF_MPLS = 28 101 PF_NETBEUI = 13 102 PF_NETLINK = 16 103 PF_NETROM = 6 104 PF_NFC = 39 105 PF_PACKET = 17 106 PF_PHONET = 35 107 PF_PPPOX = 24 108 PF_QIPCRTR = 42 109 PF_RDS = 21 110 PF_ROSE = 11 111 PF_ROUTE = 16 112 PF_RXRPC = 33 113 PF_SECURITY = 14 114 PF_SMC = 43 115 PF_SNA = 22 116 PF_TIPC = 30 117 PF_UNIX = 1 118 PF_UNSPEC = 0 119 PF_VSOCK = 40 120 PF_WANPIPE = 25 121 PF_X25 = 9 122 PF_XDP = 44 123 SCM_TIMESTAMP = 29 124 SCM_TIMESTAMPING = 37 125 SCM_TIMESTAMPING_OPT_STATS = 54 126 SCM_TIMESTAMPING_PKTINFO = 58 127 SCM_TIMESTAMPNS = 35 128 SCM_TXTIME = 61 129 SCM_WIFI_STATUS = 41 130 SIOCATMARK = 0x8905 131 SIOCGPGRP = 0x8904 132 SIOCGSTAMPNS_OLD = 0x8907 133 SIOCGSTAMP_OLD = 0x8906 134 SIOCSPGRP = 0x8902 135 SOL_AAL = 265 136 SOL_ALG = 279 137 SOL_ATM = 264 138 SOL_BLUETOOTH = 274 139 SOL_CAIF = 278 140 SOL_DCCP = 269 141 SOL_DECNET = 261 142 SOL_IRDA = 266 143 SOL_IUCV = 277 144 SOL_KCM = 281 145 SOL_LLC = 268 146 SOL_NETBEUI = 267 147 SOL_NETLINK = 270 148 SOL_NFC = 280 149 SOL_PACKET = 263 150 SOL_PNPIPE = 275 151 SOL_PPPOL2TP = 273 152 SOL_RAW = 255 153 SOL_RDS = 276 154 SOL_RXRPC = 272 155 SOL_SOCKET = 1 156 SOL_TIPC = 271 157 SOL_TLS = 282 158 SOL_X25 = 262 159 SOL_XDP = 283 160 SOMAXCONN = 4096 161 SO_ACCEPTCONN = 30 162 SO_ATTACH_BPF = 50 163 SO_ATTACH_FILTER = 26 164 SO_ATTACH_REUSEPORT_CBPF = 51 165 SO_ATTACH_REUSEPORT_EBPF = 52 166 SO_BINDTODEVICE = 25 167 SO_BINDTOIFINDEX = 62 168 SO_BPF_EXTENSIONS = 48 169 SO_BROADCAST = 6 170 SO_BSDCOMPAT = 14 171 SO_BUSY_POLL = 46 172 SO_BUSY_POLL_BUDGET = 70 173 SO_CNX_ADVICE = 53 174 SO_COOKIE = 57 175 SO_DEBUG = 1 176 SO_DETACH_BPF = 27 177 SO_DETACH_FILTER = 27 178 SO_DETACH_REUSEPORT_BPF = 68 179 SO_DOMAIN = 39 180 SO_DONTROUTE = 5 181 SO_ERROR = 4 182 SO_GET_FILTER = 26 183 SO_INCOMING_CPU = 49 184 SO_INCOMING_NAPI_ID = 56 185 SO_KEEPALIVE = 9 186 SO_LINGER = 13 187 SO_LOCK_FILTER = 44 188 SO_MARK = 36 189 SO_MAX_PACING_RATE = 47 190 SO_MEMINFO = 55 191 SO_NETNS_COOKIE = 71 192 SO_NOFCS = 43 193 SO_NO_CHECK = 11 194 SO_OOBINLINE = 10 195 SO_PASSCRED = 16 196 SO_PASSSEC = 34 197 SO_PEEK_OFF = 42 198 SO_PEERCRED = 17 199 SO_PEERGROUPS = 59 200 SO_PEERNAME = 28 201 SO_PEERSEC = 31 202 SO_PREFER_BUSY_POLL = 69 203 SO_PRIORITY = 12 204 SO_PROTOCOL = 38 205 SO_RCVBUF = 8 206 SO_RCVBUFFORCE = 33 207 SO_RCVLOWAT = 18 208 SO_RCVTIMEO = 20 209 SO_RCVTIMEO_NEW = 66 210 SO_RCVTIMEO_OLD = 20 211 SO_REUSEADDR = 2 212 SO_REUSEPORT = 15 213 SO_RXQ_OVFL = 40 214 SO_SECURITY_AUTHENTICATION = 22 215 SO_SECURITY_ENCRYPTION_NETWORK = 24 216 SO_SECURITY_ENCRYPTION_TRANSPORT = 23 217 SO_SELECT_ERR_QUEUE = 45 218 SO_SNDBUF = 7 219 SO_SNDBUFFORCE = 32 220 SO_SNDLOWAT = 19 221 SO_SNDTIMEO = 21 222 SO_SNDTIMEO_NEW = 67 223 SO_SNDTIMEO_OLD = 21 224 SO_TIMESTAMP = 29 225 SO_TIMESTAMPING = 37 226 SO_TIMESTAMPING_NEW = 65 227 SO_TIMESTAMPING_OLD = 37 228 SO_TIMESTAMPNS = 35 229 SO_TIMESTAMPNS_NEW = 64 230 SO_TIMESTAMPNS_OLD = 35 231 SO_TIMESTAMP_NEW = 63 232 SO_TIMESTAMP_OLD = 29 233 SO_TXTIME = 61 234 SO_TYPE = 3 235 SO_WIFI_STATUS = 41 236 SO_ZEROCOPY = 60 237 X_ASM_RISCV_BITSPERLONG_H = 0 238 X_ATFILE_SOURCE = 1 239 X_BITS_BYTESWAP_H = 1 240 X_BITS_ENDIANNESS_H = 1 241 X_BITS_ENDIAN_H = 1 242 X_BITS_PTHREADTYPES_ARCH_H = 1 243 X_BITS_PTHREADTYPES_COMMON_H = 1 244 X_BITS_SOCKADDR_H = 1 245 X_BITS_STDINT_INTN_H = 1 246 X_BITS_TIME64_H = 1 247 X_BITS_TYPESIZES_H = 1 248 X_BITS_TYPES_H = 1 249 X_BITS_UINTN_IDENTITY_H = 1 250 X_BSD_SIZE_T_ = 0 251 X_BSD_SIZE_T_DEFINED_ = 0 252 X_DEFAULT_SOURCE = 1 253 X_ENDIAN_H = 1 254 X_FEATURES_H = 1 255 X_FILE_OFFSET_BITS = 64 256 X_GCC_SIZE_T = 0 257 X_LINUX_POSIX_TYPES_H = 0 258 X_LP64 = 1 259 X_POSIX_C_SOURCE = 200809 260 X_POSIX_SOURCE = 1 261 X_RWLOCK_INTERNAL_H = 0 262 X_SIZET_ = 0 263 X_SIZE_T = 0 264 X_SIZE_T_ = 0 265 X_SIZE_T_DECLARED = 0 266 X_SIZE_T_DEFINED = 0 267 X_SIZE_T_DEFINED_ = 0 268 X_SS_SIZE = 128 269 X_STDC_PREDEF_H = 1 270 X_STRUCT_TIMESPEC = 1 271 X_SYS_CDEFS_H = 1 272 X_SYS_SELECT_H = 1 273 X_SYS_SIZE_T_H = 0 274 X_SYS_SOCKET_H = 1 275 X_SYS_TYPES_H = 1 276 X_THREAD_MUTEX_INTERNAL_H = 1 277 X_THREAD_SHARED_TYPES_H = 1 278 X_T_SIZE = 0 279 X_T_SIZE_ = 0 280 Linux = 1 281 Unix = 1 282 ) 283 284 // Bits in the FLAGS argument to `send', `recv', et al. 285 const ( /* socket.h:200:1: */ 286 MSG_OOB = 1 // Process out-of-band data. 287 MSG_PEEK = 2 // Peek at incoming messages. 288 MSG_DONTROUTE = 4 // Don't use local routing. 289 MSG_CTRUNC = 8 // Control data lost before delivery. 290 MSG_PROXY = 16 // Supply or ask second address. 291 MSG_TRUNC = 32 292 MSG_DONTWAIT = 64 // Nonblocking IO. 293 MSG_EOR = 128 // End of record. 294 MSG_WAITALL = 256 // Wait for a full request. 295 MSG_FIN = 512 296 MSG_SYN = 1024 297 MSG_CONFIRM = 2048 // Confirm path validity. 298 MSG_RST = 4096 299 MSG_ERRQUEUE = 8192 // Fetch message from error queue. 300 MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE. 301 MSG_MORE = 32768 // Sender will send more. 302 MSG_WAITFORONE = 65536 // Wait for at least one packet to return. 303 MSG_BATCH = 262144 // sendmmsg: more messages coming. 304 MSG_ZEROCOPY = 67108864 // Use user data in kernel path. 305 MSG_FASTOPEN = 536870912 // Send data in TCP SYN. 306 307 MSG_CMSG_CLOEXEC = 1073741824 308 ) 309 310 // Socket level message types. This must match the definitions in 311 // 312 // <linux/socket.h>. 313 const ( /* socket.h:332:1: */ 314 SCM_RIGHTS = 1 315 ) 316 317 // Get the architecture-dependent definition of enum __socket_type. 318 // Define enum __socket_type for generic Linux. 319 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 320 // This file is part of the GNU C Library. 321 // 322 // The GNU C Library is free software; you can redistribute it and/or 323 // modify it under the terms of the GNU Lesser General Public 324 // License as published by the Free Software Foundation; either 325 // version 2.1 of the License, or (at your option) any later version. 326 // 327 // The GNU C Library is distributed in the hope that it will be useful, 328 // but WITHOUT ANY WARRANTY; without even the implied warranty of 329 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 330 // Lesser General Public License for more details. 331 // 332 // You should have received a copy of the GNU Lesser General Public 333 // License along with the GNU C Library; if not, see 334 // <https://www.gnu.org/licenses/>. 335 336 // Types of sockets. 337 const ( /* socket_type.h:24:1: */ 338 SOCK_STREAM = 1 // Sequenced, reliable, connection-based 339 // byte streams. 340 SOCK_DGRAM = 2 // Connectionless, unreliable datagrams 341 // of fixed maximum length. 342 SOCK_RAW = 3 // Raw protocol interface. 343 SOCK_RDM = 4 // Reliably-delivered messages. 344 SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based, 345 // datagrams of fixed maximum length. 346 SOCK_DCCP = 6 // Datagram Congestion Control Protocol. 347 SOCK_PACKET = 10 // Linux specific way of getting packets 348 // at the dev level. For writing rarp and 349 // other similar things on the user level. 350 351 // Flags to be ORed into the type parameter of socket and socketpair and 352 // used for the flags parameter of paccept. 353 354 SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the 355 // new descriptor(s). 356 SOCK_NONBLOCK = 2048 357 ) 358 359 // The following constants should be used for the second parameter of 360 // 361 // `shutdown'. 362 const ( /* socket.h:41:1: */ 363 SHUT_RD = 0 // No more receptions. 364 SHUT_WR = 1 // No more transmissions. 365 SHUT_RDWR = 2 366 ) 367 368 type Ptrdiff_t = int64 /* <builtin>:3:26 */ 369 370 type Size_t = uint64 /* <builtin>:9:23 */ 371 372 type Wchar_t = int32 /* <builtin>:15:24 */ 373 374 type X__int128_t = struct { 375 Flo int64 376 Fhi int64 377 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 378 type X__uint128_t = struct { 379 Flo uint64 380 Fhi uint64 381 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 382 383 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 384 type X__float128 = float64 /* <builtin>:47:21 */ 385 386 // Wide character type. 387 // Locale-writers should change this as necessary to 388 // be big enough to hold unique values not between 0 and 127, 389 // and not (wchar_t) -1, for each defined multibyte character. 390 391 // Define this type if we are doing the whole job, 392 // or if we want this type in particular. 393 394 // A null pointer constant. 395 396 // Structure for scatter/gather I/O. 397 type Iovec = struct { 398 Fiov_base uintptr 399 Fiov_len Size_t 400 } /* struct_iovec.h:26:1 */ 401 402 // Copyright (C) 1989-2021 Free Software Foundation, Inc. 403 // 404 // This file is part of GCC. 405 // 406 // GCC is free software; you can redistribute it and/or modify 407 // it under the terms of the GNU General Public License as published by 408 // the Free Software Foundation; either version 3, or (at your option) 409 // any later version. 410 // 411 // GCC is distributed in the hope that it will be useful, 412 // but WITHOUT ANY WARRANTY; without even the implied warranty of 413 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 414 // GNU General Public License for more details. 415 // 416 // Under Section 7 of GPL version 3, you are granted additional 417 // permissions described in the GCC Runtime Library Exception, version 418 // 3.1, as published by the Free Software Foundation. 419 // 420 // You should have received a copy of the GNU General Public License and 421 // a copy of the GCC Runtime Library Exception along with this program; 422 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 423 // <http://www.gnu.org/licenses/>. 424 425 // ISO C Standard: 7.17 Common definitions <stddef.h> 426 427 // Any one of these symbols __need_* means that GNU libc 428 // wants us just to define one data type. So don't define 429 // the symbols that indicate this file's entire job has been done. 430 431 // This avoids lossage on SunOS but only if stdtypes.h comes first. 432 // There's no way to win with the other order! Sun lossage. 433 434 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 435 // Just ignore it. 436 437 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 438 // _TYPE_size_t which will typedef size_t. fixincludes patched the 439 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 440 // not defined, and so that defining this macro defines _GCC_SIZE_T. 441 // If we find that the macros are still defined at this point, we must 442 // invoke them so that the type is defined as expected. 443 444 // In case nobody has defined these types, but we aren't running under 445 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 446 // __WCHAR_TYPE__ have reasonable values. This can happen if the 447 // parts of GCC is compiled by an older compiler, that actually 448 // include gstddef.h, such as collect2. 449 450 // Signed type of difference of two pointers. 451 452 // Define this type if we are doing the whole job, 453 // or if we want this type in particular. 454 455 // Unsigned type of `sizeof' something. 456 457 // Define this type if we are doing the whole job, 458 // or if we want this type in particular. 459 460 // Wide character type. 461 // Locale-writers should change this as necessary to 462 // be big enough to hold unique values not between 0 and 127, 463 // and not (wchar_t) -1, for each defined multibyte character. 464 465 // Define this type if we are doing the whole job, 466 // or if we want this type in particular. 467 468 // A null pointer constant. 469 470 // This operating system-specific header file defines the SOCK_*, PF_*, 471 // AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr', 472 // `struct msghdr', and `struct linger' types. 473 // System-specific socket constants and types. Linux version. 474 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 475 // This file is part of the GNU C Library. 476 // 477 // The GNU C Library is free software; you can redistribute it and/or 478 // modify it under the terms of the GNU Lesser General Public 479 // License as published by the Free Software Foundation; either 480 // version 2.1 of the License, or (at your option) any later version. 481 // 482 // The GNU C Library is distributed in the hope that it will be useful, 483 // but WITHOUT ANY WARRANTY; without even the implied warranty of 484 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 485 // Lesser General Public License for more details. 486 // 487 // You should have received a copy of the GNU Lesser General Public 488 // License along with the GNU C Library; if not, see 489 // <https://www.gnu.org/licenses/>. 490 491 // Copyright (C) 1989-2021 Free Software Foundation, Inc. 492 // 493 // This file is part of GCC. 494 // 495 // GCC is free software; you can redistribute it and/or modify 496 // it under the terms of the GNU General Public License as published by 497 // the Free Software Foundation; either version 3, or (at your option) 498 // any later version. 499 // 500 // GCC is distributed in the hope that it will be useful, 501 // but WITHOUT ANY WARRANTY; without even the implied warranty of 502 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 503 // GNU General Public License for more details. 504 // 505 // Under Section 7 of GPL version 3, you are granted additional 506 // permissions described in the GCC Runtime Library Exception, version 507 // 3.1, as published by the Free Software Foundation. 508 // 509 // You should have received a copy of the GNU General Public License and 510 // a copy of the GCC Runtime Library Exception along with this program; 511 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 512 // <http://www.gnu.org/licenses/>. 513 514 // ISO C Standard: 7.17 Common definitions <stddef.h> 515 516 // Any one of these symbols __need_* means that GNU libc 517 // wants us just to define one data type. So don't define 518 // the symbols that indicate this file's entire job has been done. 519 520 // This avoids lossage on SunOS but only if stdtypes.h comes first. 521 // There's no way to win with the other order! Sun lossage. 522 523 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 524 // Just ignore it. 525 526 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 527 // _TYPE_size_t which will typedef size_t. fixincludes patched the 528 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 529 // not defined, and so that defining this macro defines _GCC_SIZE_T. 530 // If we find that the macros are still defined at this point, we must 531 // invoke them so that the type is defined as expected. 532 533 // In case nobody has defined these types, but we aren't running under 534 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 535 // __WCHAR_TYPE__ have reasonable values. This can happen if the 536 // parts of GCC is compiled by an older compiler, that actually 537 // include gstddef.h, such as collect2. 538 539 // Signed type of difference of two pointers. 540 541 // Define this type if we are doing the whole job, 542 // or if we want this type in particular. 543 544 // Unsigned type of `sizeof' something. 545 546 // Define this type if we are doing the whole job, 547 // or if we want this type in particular. 548 549 // Wide character type. 550 // Locale-writers should change this as necessary to 551 // be big enough to hold unique values not between 0 and 127, 552 // and not (wchar_t) -1, for each defined multibyte character. 553 554 // Define this type if we are doing the whole job, 555 // or if we want this type in particular. 556 557 // A null pointer constant. 558 559 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 560 // This file is part of the GNU C Library. 561 // 562 // The GNU C Library is free software; you can redistribute it and/or 563 // modify it under the terms of the GNU Lesser General Public 564 // License as published by the Free Software Foundation; either 565 // version 2.1 of the License, or (at your option) any later version. 566 // 567 // The GNU C Library is distributed in the hope that it will be useful, 568 // but WITHOUT ANY WARRANTY; without even the implied warranty of 569 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 570 // Lesser General Public License for more details. 571 // 572 // You should have received a copy of the GNU Lesser General Public 573 // License along with the GNU C Library; if not, see 574 // <https://www.gnu.org/licenses/>. 575 576 // POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> 577 578 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 579 // This file is part of the GNU C Library. 580 // 581 // The GNU C Library is free software; you can redistribute it and/or 582 // modify it under the terms of the GNU Lesser General Public 583 // License as published by the Free Software Foundation; either 584 // version 2.1 of the License, or (at your option) any later version. 585 // 586 // The GNU C Library is distributed in the hope that it will be useful, 587 // but WITHOUT ANY WARRANTY; without even the implied warranty of 588 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 589 // Lesser General Public License for more details. 590 // 591 // You should have received a copy of the GNU Lesser General Public 592 // License along with the GNU C Library; if not, see 593 // <https://www.gnu.org/licenses/>. 594 595 // bits/types.h -- definitions of __*_t types underlying *_t types. 596 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 597 // This file is part of the GNU C Library. 598 // 599 // The GNU C Library is free software; you can redistribute it and/or 600 // modify it under the terms of the GNU Lesser General Public 601 // License as published by the Free Software Foundation; either 602 // version 2.1 of the License, or (at your option) any later version. 603 // 604 // The GNU C Library is distributed in the hope that it will be useful, 605 // but WITHOUT ANY WARRANTY; without even the implied warranty of 606 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 607 // Lesser General Public License for more details. 608 // 609 // You should have received a copy of the GNU Lesser General Public 610 // License along with the GNU C Library; if not, see 611 // <https://www.gnu.org/licenses/>. 612 613 // Never include this file directly; use <sys/types.h> instead. 614 615 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 616 // This file is part of the GNU C Library. 617 // 618 // The GNU C Library is free software; you can redistribute it and/or 619 // modify it under the terms of the GNU Lesser General Public 620 // License as published by the Free Software Foundation; either 621 // version 2.1 of the License, or (at your option) any later version. 622 // 623 // The GNU C Library is distributed in the hope that it will be useful, 624 // but WITHOUT ANY WARRANTY; without even the implied warranty of 625 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 626 // Lesser General Public License for more details. 627 // 628 // You should have received a copy of the GNU Lesser General Public 629 // License along with the GNU C Library; if not, see 630 // <https://www.gnu.org/licenses/>. 631 632 // Determine the wordsize from the preprocessor defines. RISC-V version. 633 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 634 // This file is part of the GNU C Library. 635 // 636 // The GNU C Library is free software; you can redistribute it and/or 637 // modify it under the terms of the GNU Lesser General Public 638 // License as published by the Free Software Foundation; either 639 // version 2.1 of the License, or (at your option) any later version. 640 // 641 // The GNU C Library is distributed in the hope that it will be useful, 642 // but WITHOUT ANY WARRANTY; without even the implied warranty of 643 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 644 // Lesser General Public License for more details. 645 // 646 // You should have received a copy of the GNU Lesser General Public 647 // License along with the GNU C Library. If not, see 648 // <https://www.gnu.org/licenses/>. 649 650 // Bit size of the time_t type at glibc build time, RISC-V case. 651 // Copyright (C) 2020-2021 Free Software Foundation, Inc. 652 // This file is part of the GNU C Library. 653 // 654 // The GNU C Library is free software; you can redistribute it and/or 655 // modify it under the terms of the GNU Lesser General Public 656 // License as published by the Free Software Foundation; either 657 // version 2.1 of the License, or (at your option) any later version. 658 // 659 // The GNU C Library is distributed in the hope that it will be useful, 660 // but WITHOUT ANY WARRANTY; without even the implied warranty of 661 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 662 // Lesser General Public License for more details. 663 // 664 // You should have received a copy of the GNU Lesser General Public 665 // License along with the GNU C Library; if not, see 666 // <https://www.gnu.org/licenses/>. 667 668 // Determine the wordsize from the preprocessor defines. RISC-V version. 669 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 670 // This file is part of the GNU C Library. 671 // 672 // The GNU C Library is free software; you can redistribute it and/or 673 // modify it under the terms of the GNU Lesser General Public 674 // License as published by the Free Software Foundation; either 675 // version 2.1 of the License, or (at your option) any later version. 676 // 677 // The GNU C Library is distributed in the hope that it will be useful, 678 // but WITHOUT ANY WARRANTY; without even the implied warranty of 679 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 680 // Lesser General Public License for more details. 681 // 682 // You should have received a copy of the GNU Lesser General Public 683 // License along with the GNU C Library. If not, see 684 // <https://www.gnu.org/licenses/>. 685 686 // RV32 and RV64 both use 64-bit time_t 687 688 // Convenience types. 689 type X__u_char = uint8 /* types.h:31:23 */ 690 type X__u_short = uint16 /* types.h:32:28 */ 691 type X__u_int = uint32 /* types.h:33:22 */ 692 type X__u_long = uint64 /* types.h:34:27 */ 693 694 // Fixed-size types, underlying types depend on word size and compiler. 695 type X__int8_t = int8 /* types.h:37:21 */ 696 type X__uint8_t = uint8 /* types.h:38:23 */ 697 type X__int16_t = int16 /* types.h:39:26 */ 698 type X__uint16_t = uint16 /* types.h:40:28 */ 699 type X__int32_t = int32 /* types.h:41:20 */ 700 type X__uint32_t = uint32 /* types.h:42:22 */ 701 type X__int64_t = int64 /* types.h:44:25 */ 702 type X__uint64_t = uint64 /* types.h:45:27 */ 703 704 // Smallest types with at least a given width. 705 type X__int_least8_t = X__int8_t /* types.h:52:18 */ 706 type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ 707 type X__int_least16_t = X__int16_t /* types.h:54:19 */ 708 type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ 709 type X__int_least32_t = X__int32_t /* types.h:56:19 */ 710 type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ 711 type X__int_least64_t = X__int64_t /* types.h:58:19 */ 712 type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ 713 714 // quad_t is also 64 bits. 715 type X__quad_t = int64 /* types.h:63:18 */ 716 type X__u_quad_t = uint64 /* types.h:64:27 */ 717 718 // Largest integral types. 719 type X__intmax_t = int64 /* types.h:72:18 */ 720 type X__uintmax_t = uint64 /* types.h:73:27 */ 721 722 // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE 723 // macros for each of the OS types we define below. The definitions 724 // of those macros must use the following macros for underlying types. 725 // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned 726 // variants of each of the following integer types on this machine. 727 // 728 // 16 -- "natural" 16-bit type (always short) 729 // 32 -- "natural" 32-bit type (always int) 730 // 64 -- "natural" 64-bit type (long or long long) 731 // LONG32 -- 32-bit type, traditionally long 732 // QUAD -- 64-bit type, traditionally long long 733 // WORD -- natural type of __WORDSIZE bits (int or long) 734 // LONGWORD -- type of __WORDSIZE bits, traditionally long 735 // 736 // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the 737 // conventional uses of `long' or `long long' type modifiers match the 738 // types we define, even when a less-adorned type would be the same size. 739 // This matters for (somewhat) portably writing printf/scanf formats for 740 // these types, where using the appropriate l or ll format modifiers can 741 // make the typedefs and the formats match up across all GNU platforms. If 742 // we used `long' when it's 64 bits where `long long' is expected, then the 743 // compiler would warn about the formats not matching the argument types, 744 // and the programmer changing them to shut up the compiler would break the 745 // program's portability. 746 // 747 // Here we assume what is presently the case in all the GCC configurations 748 // we support: long long is always 64 bits, long is always word/address size, 749 // and int is always 32 bits. 750 751 // No need to mark the typedef with __extension__. 752 // bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. 753 // Copyright (C) 2011-2021 Free Software Foundation, Inc. 754 // This file is part of the GNU C Library. 755 // Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011. 756 // 757 // The GNU C Library is free software; you can redistribute it and/or 758 // modify it under the terms of the GNU Lesser General Public 759 // License as published by the Free Software Foundation; either 760 // version 2.1 of the License, or (at your option) any later version. 761 // 762 // The GNU C Library is distributed in the hope that it will be useful, 763 // but WITHOUT ANY WARRANTY; without even the implied warranty of 764 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 765 // Lesser General Public License for more details. 766 // 767 // You should have received a copy of the GNU Lesser General Public 768 // License along with the GNU C Library. If not, see 769 // <https://www.gnu.org/licenses/>. 770 771 // See <bits/types.h> for the meaning of these macros. This file exists so 772 // that <bits/types.h> need not vary across different GNU platforms. 773 774 // Tell the libc code that off_t and off64_t are actually the same type 775 // for all ABI purposes, even if possibly expressed as different base types 776 // for C type-checking purposes. 777 778 // Same for ino_t and ino64_t. 779 780 // And for __rlim_t and __rlim64_t. 781 782 // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. 783 784 // And for getitimer, setitimer and rusage 785 786 // Number of descriptors that can fit in an `fd_set'. 787 788 // bits/time64.h -- underlying types for __time64_t. RISC-V version. 789 // Copyright (C) 2020-2021 Free Software Foundation, Inc. 790 // This file is part of the GNU C Library. 791 // 792 // The GNU C Library is free software; you can redistribute it and/or 793 // modify it under the terms of the GNU Lesser General Public 794 // License as published by the Free Software Foundation; either 795 // version 2.1 of the License, or (at your option) any later version. 796 // 797 // The GNU C Library is distributed in the hope that it will be useful, 798 // but WITHOUT ANY WARRANTY; without even the implied warranty of 799 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 800 // Lesser General Public License for more details. 801 // 802 // You should have received a copy of the GNU Lesser General Public 803 // License along with the GNU C Library; if not, see 804 // <https://www.gnu.org/licenses/>. 805 806 // Define __TIME64_T_TYPE so that it is always a 64-bit type. 807 808 // If we already have 64-bit time type then use it. 809 810 type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. 811 type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. 812 type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. 813 type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. 814 type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). 815 type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. 816 type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. 817 type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. 818 type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). 819 type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. 820 type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. 821 type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. 822 type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. 823 type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). 824 type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. 825 type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. 826 type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. 827 type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. 828 type X__suseconds64_t = int64 /* types.h:163:33 */ 829 830 type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. 831 type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. 832 833 // Clock ID used in clock and timer functions. 834 type X__clockid_t = int32 /* types.h:169:29 */ 835 836 // Timer ID returned by `timer_create'. 837 type X__timer_t = uintptr /* types.h:172:12 */ 838 839 // Type to represent block size. 840 type X__blksize_t = int32 /* types.h:175:29 */ 841 842 // Types from the Large File Support interface. 843 844 // Type to count number of disk blocks. 845 type X__blkcnt_t = int64 /* types.h:180:28 */ 846 type X__blkcnt64_t = int64 /* types.h:181:30 */ 847 848 // Type to count file system blocks. 849 type X__fsblkcnt_t = uint64 /* types.h:184:30 */ 850 type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ 851 852 // Type to count file system nodes. 853 type X__fsfilcnt_t = uint64 /* types.h:188:30 */ 854 type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ 855 856 // Type of miscellaneous file system fields. 857 type X__fsword_t = int64 /* types.h:192:28 */ 858 859 type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. 860 861 // Signed long type used in system calls. 862 type X__syscall_slong_t = int64 /* types.h:197:33 */ 863 // Unsigned long type used in system calls. 864 type X__syscall_ulong_t = uint64 /* types.h:199:33 */ 865 866 // These few don't really vary by system, they always correspond 867 // 868 // to one of the other defined types. 869 type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). 870 type X__caddr_t = uintptr /* types.h:204:14 */ 871 872 // Duplicates info from stdint.h but this is used in unistd.h. 873 type X__intptr_t = int64 /* types.h:207:25 */ 874 875 // Duplicate info from sys/socket.h. 876 type X__socklen_t = uint32 /* types.h:210:23 */ 877 878 // C99: An integer type that can be accessed as an atomic entity, 879 // 880 // even in the presence of asynchronous interrupts. 881 // It is not currently necessary for this to be machine-specific. 882 type X__sig_atomic_t = int32 /* types.h:215:13 */ 883 884 // Seconds since the Epoch, visible to user code when time_t is too 885 // narrow only for consistency with the old way of widening too-narrow 886 // types. User code should never use __time64_t. 887 888 type U_char = X__u_char /* types.h:33:18 */ 889 type U_short = X__u_short /* types.h:34:19 */ 890 type U_int = X__u_int /* types.h:35:17 */ 891 type U_long = X__u_long /* types.h:36:18 */ 892 type Quad_t = X__quad_t /* types.h:37:18 */ 893 type U_quad_t = X__u_quad_t /* types.h:38:20 */ 894 type Fsid_t = X__fsid_t /* types.h:39:18 */ 895 type Loff_t = X__loff_t /* types.h:42:18 */ 896 897 type Ino_t = X__ino64_t /* types.h:49:19 */ 898 899 type Dev_t = X__dev_t /* types.h:59:17 */ 900 901 type Gid_t = X__gid_t /* types.h:64:17 */ 902 903 type Mode_t = X__mode_t /* types.h:69:18 */ 904 905 type Nlink_t = X__nlink_t /* types.h:74:19 */ 906 907 type Uid_t = X__uid_t /* types.h:79:17 */ 908 909 type Off_t = X__off64_t /* types.h:87:19 */ 910 911 type Pid_t = X__pid_t /* types.h:97:17 */ 912 913 type Id_t = X__id_t /* types.h:103:16 */ 914 915 type Ssize_t = X__ssize_t /* types.h:108:19 */ 916 917 type Daddr_t = X__daddr_t /* types.h:114:19 */ 918 type Caddr_t = X__caddr_t /* types.h:115:19 */ 919 920 type Key_t = X__key_t /* types.h:121:17 */ 921 922 // bits/types.h -- definitions of __*_t types underlying *_t types. 923 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 924 // This file is part of the GNU C Library. 925 // 926 // The GNU C Library is free software; you can redistribute it and/or 927 // modify it under the terms of the GNU Lesser General Public 928 // License as published by the Free Software Foundation; either 929 // version 2.1 of the License, or (at your option) any later version. 930 // 931 // The GNU C Library is distributed in the hope that it will be useful, 932 // but WITHOUT ANY WARRANTY; without even the implied warranty of 933 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 934 // Lesser General Public License for more details. 935 // 936 // You should have received a copy of the GNU Lesser General Public 937 // License along with the GNU C Library; if not, see 938 // <https://www.gnu.org/licenses/>. 939 940 // Never include this file directly; use <sys/types.h> instead. 941 942 // Returned by `clock'. 943 type Clock_t = X__clock_t /* clock_t.h:7:19 */ 944 945 // bits/types.h -- definitions of __*_t types underlying *_t types. 946 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 947 // This file is part of the GNU C Library. 948 // 949 // The GNU C Library is free software; you can redistribute it and/or 950 // modify it under the terms of the GNU Lesser General Public 951 // License as published by the Free Software Foundation; either 952 // version 2.1 of the License, or (at your option) any later version. 953 // 954 // The GNU C Library is distributed in the hope that it will be useful, 955 // but WITHOUT ANY WARRANTY; without even the implied warranty of 956 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 957 // Lesser General Public License for more details. 958 // 959 // You should have received a copy of the GNU Lesser General Public 960 // License along with the GNU C Library; if not, see 961 // <https://www.gnu.org/licenses/>. 962 963 // Never include this file directly; use <sys/types.h> instead. 964 965 // Clock ID used in clock and timer functions. 966 type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ 967 968 // bits/types.h -- definitions of __*_t types underlying *_t types. 969 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 970 // This file is part of the GNU C Library. 971 // 972 // The GNU C Library is free software; you can redistribute it and/or 973 // modify it under the terms of the GNU Lesser General Public 974 // License as published by the Free Software Foundation; either 975 // version 2.1 of the License, or (at your option) any later version. 976 // 977 // The GNU C Library is distributed in the hope that it will be useful, 978 // but WITHOUT ANY WARRANTY; without even the implied warranty of 979 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 980 // Lesser General Public License for more details. 981 // 982 // You should have received a copy of the GNU Lesser General Public 983 // License along with the GNU C Library; if not, see 984 // <https://www.gnu.org/licenses/>. 985 986 // Never include this file directly; use <sys/types.h> instead. 987 988 // Returned by `time'. 989 type Time_t = X__time_t /* time_t.h:10:18 */ 990 991 // bits/types.h -- definitions of __*_t types underlying *_t types. 992 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 993 // This file is part of the GNU C Library. 994 // 995 // The GNU C Library is free software; you can redistribute it and/or 996 // modify it under the terms of the GNU Lesser General Public 997 // License as published by the Free Software Foundation; either 998 // version 2.1 of the License, or (at your option) any later version. 999 // 1000 // The GNU C Library is distributed in the hope that it will be useful, 1001 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1002 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1003 // Lesser General Public License for more details. 1004 // 1005 // You should have received a copy of the GNU Lesser General Public 1006 // License along with the GNU C Library; if not, see 1007 // <https://www.gnu.org/licenses/>. 1008 1009 // Never include this file directly; use <sys/types.h> instead. 1010 1011 // Timer ID returned by `timer_create'. 1012 type Timer_t = X__timer_t /* timer_t.h:7:19 */ 1013 1014 // Copyright (C) 1989-2021 Free Software Foundation, Inc. 1015 // 1016 // This file is part of GCC. 1017 // 1018 // GCC is free software; you can redistribute it and/or modify 1019 // it under the terms of the GNU General Public License as published by 1020 // the Free Software Foundation; either version 3, or (at your option) 1021 // any later version. 1022 // 1023 // GCC is distributed in the hope that it will be useful, 1024 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1025 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1026 // GNU General Public License for more details. 1027 // 1028 // Under Section 7 of GPL version 3, you are granted additional 1029 // permissions described in the GCC Runtime Library Exception, version 1030 // 3.1, as published by the Free Software Foundation. 1031 // 1032 // You should have received a copy of the GNU General Public License and 1033 // a copy of the GCC Runtime Library Exception along with this program; 1034 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 1035 // <http://www.gnu.org/licenses/>. 1036 1037 // ISO C Standard: 7.17 Common definitions <stddef.h> 1038 1039 // Any one of these symbols __need_* means that GNU libc 1040 // wants us just to define one data type. So don't define 1041 // the symbols that indicate this file's entire job has been done. 1042 1043 // This avoids lossage on SunOS but only if stdtypes.h comes first. 1044 // There's no way to win with the other order! Sun lossage. 1045 1046 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 1047 // Just ignore it. 1048 1049 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 1050 // _TYPE_size_t which will typedef size_t. fixincludes patched the 1051 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 1052 // not defined, and so that defining this macro defines _GCC_SIZE_T. 1053 // If we find that the macros are still defined at this point, we must 1054 // invoke them so that the type is defined as expected. 1055 1056 // In case nobody has defined these types, but we aren't running under 1057 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 1058 // __WCHAR_TYPE__ have reasonable values. This can happen if the 1059 // parts of GCC is compiled by an older compiler, that actually 1060 // include gstddef.h, such as collect2. 1061 1062 // Signed type of difference of two pointers. 1063 1064 // Define this type if we are doing the whole job, 1065 // or if we want this type in particular. 1066 1067 // Unsigned type of `sizeof' something. 1068 1069 // Define this type if we are doing the whole job, 1070 // or if we want this type in particular. 1071 1072 // Wide character type. 1073 // Locale-writers should change this as necessary to 1074 // be big enough to hold unique values not between 0 and 127, 1075 // and not (wchar_t) -1, for each defined multibyte character. 1076 1077 // Define this type if we are doing the whole job, 1078 // or if we want this type in particular. 1079 1080 // A null pointer constant. 1081 1082 // Old compatibility names for C types. 1083 type Ulong = uint64 /* types.h:148:27 */ 1084 type Ushort = uint16 /* types.h:149:28 */ 1085 type Uint = uint32 /* types.h:150:22 */ 1086 1087 // These size-specific names are used by some of the inet code. 1088 1089 // Define intN_t types. 1090 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 1091 // This file is part of the GNU C Library. 1092 // 1093 // The GNU C Library is free software; you can redistribute it and/or 1094 // modify it under the terms of the GNU Lesser General Public 1095 // License as published by the Free Software Foundation; either 1096 // version 2.1 of the License, or (at your option) any later version. 1097 // 1098 // The GNU C Library is distributed in the hope that it will be useful, 1099 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1100 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1101 // Lesser General Public License for more details. 1102 // 1103 // You should have received a copy of the GNU Lesser General Public 1104 // License along with the GNU C Library; if not, see 1105 // <https://www.gnu.org/licenses/>. 1106 1107 // bits/types.h -- definitions of __*_t types underlying *_t types. 1108 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1109 // This file is part of the GNU C Library. 1110 // 1111 // The GNU C Library is free software; you can redistribute it and/or 1112 // modify it under the terms of the GNU Lesser General Public 1113 // License as published by the Free Software Foundation; either 1114 // version 2.1 of the License, or (at your option) any later version. 1115 // 1116 // The GNU C Library is distributed in the hope that it will be useful, 1117 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1118 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1119 // Lesser General Public License for more details. 1120 // 1121 // You should have received a copy of the GNU Lesser General Public 1122 // License along with the GNU C Library; if not, see 1123 // <https://www.gnu.org/licenses/>. 1124 1125 // Never include this file directly; use <sys/types.h> instead. 1126 1127 type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ 1128 type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ 1129 type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ 1130 type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ 1131 1132 // These were defined by ISO C without the first `_'. 1133 type U_int8_t = X__uint8_t /* types.h:158:19 */ 1134 type U_int16_t = X__uint16_t /* types.h:159:20 */ 1135 type U_int32_t = X__uint32_t /* types.h:160:20 */ 1136 type U_int64_t = X__uint64_t /* types.h:161:20 */ 1137 1138 type Register_t = int32 /* types.h:164:13 */ 1139 1140 // It also defines `fd_set' and the FD_* macros for `select'. 1141 // `fd_set' type and related macros, and `select'/`pselect' declarations. 1142 // Copyright (C) 1996-2021 Free Software Foundation, Inc. 1143 // This file is part of the GNU C Library. 1144 // 1145 // The GNU C Library is free software; you can redistribute it and/or 1146 // modify it under the terms of the GNU Lesser General Public 1147 // License as published by the Free Software Foundation; either 1148 // version 2.1 of the License, or (at your option) any later version. 1149 // 1150 // The GNU C Library is distributed in the hope that it will be useful, 1151 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1152 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1153 // Lesser General Public License for more details. 1154 // 1155 // You should have received a copy of the GNU Lesser General Public 1156 // License along with the GNU C Library; if not, see 1157 // <https://www.gnu.org/licenses/>. 1158 1159 // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> 1160 1161 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 1162 // This file is part of the GNU C Library. 1163 // 1164 // The GNU C Library is free software; you can redistribute it and/or 1165 // modify it under the terms of the GNU Lesser General Public 1166 // License as published by the Free Software Foundation; either 1167 // version 2.1 of the License, or (at your option) any later version. 1168 // 1169 // The GNU C Library is distributed in the hope that it will be useful, 1170 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1171 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1172 // Lesser General Public License for more details. 1173 // 1174 // You should have received a copy of the GNU Lesser General Public 1175 // License along with the GNU C Library; if not, see 1176 // <https://www.gnu.org/licenses/>. 1177 1178 // Get definition of needed basic types. 1179 // bits/types.h -- definitions of __*_t types underlying *_t types. 1180 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1181 // This file is part of the GNU C Library. 1182 // 1183 // The GNU C Library is free software; you can redistribute it and/or 1184 // modify it under the terms of the GNU Lesser General Public 1185 // License as published by the Free Software Foundation; either 1186 // version 2.1 of the License, or (at your option) any later version. 1187 // 1188 // The GNU C Library is distributed in the hope that it will be useful, 1189 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1190 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1191 // Lesser General Public License for more details. 1192 // 1193 // You should have received a copy of the GNU Lesser General Public 1194 // License along with the GNU C Library; if not, see 1195 // <https://www.gnu.org/licenses/>. 1196 1197 // Never include this file directly; use <sys/types.h> instead. 1198 1199 // Get __FD_* definitions. 1200 // Copyright (C) 1997-2021 Free Software Foundation, Inc. 1201 // This file is part of the GNU C Library. 1202 // 1203 // The GNU C Library is free software; you can redistribute it and/or 1204 // modify it under the terms of the GNU Lesser General Public 1205 // License as published by the Free Software Foundation; either 1206 // version 2.1 of the License, or (at your option) any later version. 1207 // 1208 // The GNU C Library is distributed in the hope that it will be useful, 1209 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1210 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1211 // Lesser General Public License for more details. 1212 // 1213 // You should have received a copy of the GNU Lesser General Public 1214 // License along with the GNU C Library; if not, see 1215 // <https://www.gnu.org/licenses/>. 1216 1217 // We don't use `memset' because this would require a prototype and 1218 // the array isn't too big. 1219 1220 // Get sigset_t. 1221 1222 type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ 1223 1224 // A set of signals to be blocked, unblocked, or waited for. 1225 type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ 1226 1227 // Get definition of timer specification structures. 1228 1229 // bits/types.h -- definitions of __*_t types underlying *_t types. 1230 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1231 // This file is part of the GNU C Library. 1232 // 1233 // The GNU C Library is free software; you can redistribute it and/or 1234 // modify it under the terms of the GNU Lesser General Public 1235 // License as published by the Free Software Foundation; either 1236 // version 2.1 of the License, or (at your option) any later version. 1237 // 1238 // The GNU C Library is distributed in the hope that it will be useful, 1239 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1240 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1241 // Lesser General Public License for more details. 1242 // 1243 // You should have received a copy of the GNU Lesser General Public 1244 // License along with the GNU C Library; if not, see 1245 // <https://www.gnu.org/licenses/>. 1246 1247 // Never include this file directly; use <sys/types.h> instead. 1248 1249 // A time value that is accurate to the nearest 1250 // 1251 // microsecond but also has a range of years. 1252 type Timeval = struct { 1253 Ftv_sec X__time_t 1254 Ftv_usec X__suseconds_t 1255 } /* struct_timeval.h:8:1 */ 1256 1257 // NB: Include guard matches what <linux/time.h> uses. 1258 1259 // bits/types.h -- definitions of __*_t types underlying *_t types. 1260 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1261 // This file is part of the GNU C Library. 1262 // 1263 // The GNU C Library is free software; you can redistribute it and/or 1264 // modify it under the terms of the GNU Lesser General Public 1265 // License as published by the Free Software Foundation; either 1266 // version 2.1 of the License, or (at your option) any later version. 1267 // 1268 // The GNU C Library is distributed in the hope that it will be useful, 1269 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1270 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1271 // Lesser General Public License for more details. 1272 // 1273 // You should have received a copy of the GNU Lesser General Public 1274 // License along with the GNU C Library; if not, see 1275 // <https://www.gnu.org/licenses/>. 1276 1277 // Never include this file directly; use <sys/types.h> instead. 1278 1279 // Endian macros for string.h functions 1280 // Copyright (C) 1992-2021 Free Software Foundation, Inc. 1281 // This file is part of the GNU C Library. 1282 // 1283 // The GNU C Library is free software; you can redistribute it and/or 1284 // modify it under the terms of the GNU Lesser General Public 1285 // License as published by the Free Software Foundation; either 1286 // version 2.1 of the License, or (at your option) any later version. 1287 // 1288 // The GNU C Library is distributed in the hope that it will be useful, 1289 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1290 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1291 // Lesser General Public License for more details. 1292 // 1293 // You should have received a copy of the GNU Lesser General Public 1294 // License along with the GNU C Library; if not, see 1295 // <http://www.gnu.org/licenses/>. 1296 1297 // POSIX.1b structure for a time value. This is like a `struct timeval' but 1298 // 1299 // has nanoseconds instead of microseconds. 1300 type Timespec = struct { 1301 Ftv_sec X__time_t 1302 Ftv_nsec X__syscall_slong_t 1303 } /* struct_timespec.h:11:1 */ 1304 1305 type Suseconds_t = X__suseconds_t /* select.h:43:23 */ 1306 1307 // The fd_set member is required to be an array of longs. 1308 type X__fd_mask = int64 /* select.h:49:18 */ 1309 1310 // Some versions of <linux/posix_types.h> define this macros. 1311 // It's easier to assume 8-bit bytes than to get CHAR_BIT. 1312 1313 // fd_set for select and pselect. 1314 type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ 1315 1316 // Maximum number of file descriptors in `fd_set'. 1317 1318 // Sometimes the fd_set member is assumed to have this type. 1319 type Fd_mask = X__fd_mask /* select.h:77:19 */ 1320 1321 // Define some inlines helping to catch common problems. 1322 1323 type Blksize_t = X__blksize_t /* types.h:185:21 */ 1324 1325 // Types from the Large File Support interface. 1326 type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. 1327 type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. 1328 type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. 1329 1330 // Now add the thread types. 1331 // Declaration of common pthread types for all architectures. 1332 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 1333 // This file is part of the GNU C Library. 1334 // 1335 // The GNU C Library is free software; you can redistribute it and/or 1336 // modify it under the terms of the GNU Lesser General Public 1337 // License as published by the Free Software Foundation; either 1338 // version 2.1 of the License, or (at your option) any later version. 1339 // 1340 // The GNU C Library is distributed in the hope that it will be useful, 1341 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1342 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1343 // Lesser General Public License for more details. 1344 // 1345 // You should have received a copy of the GNU Lesser General Public 1346 // License along with the GNU C Library; if not, see 1347 // <https://www.gnu.org/licenses/>. 1348 1349 // For internal mutex and condition variable definitions. 1350 // Common threading primitives definitions for both POSIX and C11. 1351 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 1352 // This file is part of the GNU C Library. 1353 // 1354 // The GNU C Library is free software; you can redistribute it and/or 1355 // modify it under the terms of the GNU Lesser General Public 1356 // License as published by the Free Software Foundation; either 1357 // version 2.1 of the License, or (at your option) any later version. 1358 // 1359 // The GNU C Library is distributed in the hope that it will be useful, 1360 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1361 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1362 // Lesser General Public License for more details. 1363 // 1364 // You should have received a copy of the GNU Lesser General Public 1365 // License along with the GNU C Library; if not, see 1366 // <https://www.gnu.org/licenses/>. 1367 1368 // Arch-specific definitions. Each architecture must define the following 1369 // macros to define the expected sizes of pthread data types: 1370 // 1371 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 1372 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 1373 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 1374 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 1375 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 1376 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 1377 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 1378 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 1379 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 1380 // 1381 // The additional macro defines any constraint for the lock alignment 1382 // inside the thread structures: 1383 // 1384 // __LOCK_ALIGNMENT - for internal lock/futex usage. 1385 // 1386 // Same idea but for the once locking primitive: 1387 // 1388 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 1389 1390 // Machine-specific pthread type layouts. RISC-V version. 1391 // Copyright (C) 2011-2021 Free Software Foundation, Inc. 1392 // This file is part of the GNU C Library. 1393 // 1394 // The GNU C Library is free software; you can redistribute it and/or 1395 // modify it under the terms of the GNU Lesser General Public 1396 // License as published by the Free Software Foundation; either 1397 // version 2.1 of the License, or (at your option) any later version. 1398 // 1399 // The GNU C Library is distributed in the hope that it will be useful, 1400 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1401 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1402 // Lesser General Public License for more details. 1403 // 1404 // You should have received a copy of the GNU Lesser General Public 1405 // License along with the GNU C Library. If not, see 1406 // <https://www.gnu.org/licenses/>. 1407 1408 // Endian macros for string.h functions 1409 // Copyright (C) 1992-2021 Free Software Foundation, Inc. 1410 // This file is part of the GNU C Library. 1411 // 1412 // The GNU C Library is free software; you can redistribute it and/or 1413 // modify it under the terms of the GNU Lesser General Public 1414 // License as published by the Free Software Foundation; either 1415 // version 2.1 of the License, or (at your option) any later version. 1416 // 1417 // The GNU C Library is distributed in the hope that it will be useful, 1418 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1419 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1420 // Lesser General Public License for more details. 1421 // 1422 // You should have received a copy of the GNU Lesser General Public 1423 // License along with the GNU C Library; if not, see 1424 // <http://www.gnu.org/licenses/>. 1425 1426 // Common definition of pthread_mutex_t. 1427 1428 type X__pthread_internal_list = struct { 1429 F__prev uintptr 1430 F__next uintptr 1431 } /* thread-shared-types.h:49:9 */ 1432 1433 // Type to count file system inodes. 1434 1435 // Now add the thread types. 1436 // Declaration of common pthread types for all architectures. 1437 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 1438 // This file is part of the GNU C Library. 1439 // 1440 // The GNU C Library is free software; you can redistribute it and/or 1441 // modify it under the terms of the GNU Lesser General Public 1442 // License as published by the Free Software Foundation; either 1443 // version 2.1 of the License, or (at your option) any later version. 1444 // 1445 // The GNU C Library is distributed in the hope that it will be useful, 1446 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1447 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1448 // Lesser General Public License for more details. 1449 // 1450 // You should have received a copy of the GNU Lesser General Public 1451 // License along with the GNU C Library; if not, see 1452 // <https://www.gnu.org/licenses/>. 1453 1454 // For internal mutex and condition variable definitions. 1455 // Common threading primitives definitions for both POSIX and C11. 1456 // Copyright (C) 2017-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 // Arch-specific definitions. Each architecture must define the following 1474 // macros to define the expected sizes of pthread data types: 1475 // 1476 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 1477 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 1478 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 1479 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 1480 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 1481 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 1482 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 1483 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 1484 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 1485 // 1486 // The additional macro defines any constraint for the lock alignment 1487 // inside the thread structures: 1488 // 1489 // __LOCK_ALIGNMENT - for internal lock/futex usage. 1490 // 1491 // Same idea but for the once locking primitive: 1492 // 1493 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 1494 1495 // Machine-specific pthread type layouts. RISC-V version. 1496 // Copyright (C) 2011-2021 Free Software Foundation, Inc. 1497 // This file is part of the GNU C Library. 1498 // 1499 // The GNU C Library is free software; you can redistribute it and/or 1500 // modify it under the terms of the GNU Lesser General Public 1501 // License as published by the Free Software Foundation; either 1502 // version 2.1 of the License, or (at your option) any later version. 1503 // 1504 // The GNU C Library is distributed in the hope that it will be useful, 1505 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1506 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1507 // Lesser General Public License for more details. 1508 // 1509 // You should have received a copy of the GNU Lesser General Public 1510 // License along with the GNU C Library. If not, see 1511 // <https://www.gnu.org/licenses/>. 1512 1513 // Endian macros for string.h functions 1514 // Copyright (C) 1992-2021 Free Software Foundation, Inc. 1515 // This file is part of the GNU C Library. 1516 // 1517 // The GNU C Library is free software; you can redistribute it and/or 1518 // modify it under the terms of the GNU Lesser General Public 1519 // License as published by the Free Software Foundation; either 1520 // version 2.1 of the License, or (at your option) any later version. 1521 // 1522 // The GNU C Library is distributed in the hope that it will be useful, 1523 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1524 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1525 // Lesser General Public License for more details. 1526 // 1527 // You should have received a copy of the GNU Lesser General Public 1528 // License along with the GNU C Library; if not, see 1529 // <http://www.gnu.org/licenses/>. 1530 1531 // Common definition of pthread_mutex_t. 1532 1533 type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ 1534 1535 type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ 1536 1537 type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ 1538 1539 // Arch-specific mutex definitions. A generic implementation is provided 1540 // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture 1541 // can override it by defining: 1542 // 1543 // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t 1544 // definition). It should contains at least the internal members 1545 // defined in the generic version. 1546 // 1547 // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with 1548 // atomic operations. 1549 // 1550 // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. 1551 // It should initialize the mutex internal flag. 1552 1553 // Default mutex implementation struct definitions. 1554 // Copyright (C) 2019-2021 Free Software Foundation, Inc. 1555 // This file is part of the GNU C Library. 1556 // 1557 // The GNU C Library is free software; you can redistribute it and/or 1558 // modify it under the terms of the GNU Lesser General Public 1559 // License as published by the Free Software Foundation; either 1560 // version 2.1 of the License, or (at your option) any later version. 1561 // 1562 // The GNU C Library is distributed in the hope that it will be useful, 1563 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1564 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1565 // Lesser General Public License for more details. 1566 // 1567 // You should have received a copy of the GNU Lesser General Public 1568 // License along with the GNU C Library; if not, see 1569 // <http://www.gnu.org/licenses/>. 1570 1571 // Generic struct for both POSIX and C11 mutexes. New ports are expected 1572 // to use the default layout, however architecture can redefine it to 1573 // add arch-specific extension (such as lock-elision). The struct have 1574 // a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. 1575 1576 type X__pthread_mutex_s = struct { 1577 F__lock int32 1578 F__count uint32 1579 F__owner int32 1580 F__nusers uint32 1581 F__kind int32 1582 F__spins int32 1583 F__list X__pthread_list_t 1584 } /* struct_mutex.h:27:1 */ 1585 1586 // Arch-sepecific read-write lock definitions. A generic implementation is 1587 // provided by struct_rwlock.h. If required, an architecture can override it 1588 // by defining: 1589 // 1590 // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). 1591 // It should contain at least the internal members defined in the 1592 // generic version. 1593 // 1594 // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. 1595 // It should initialize the rwlock internal type. 1596 1597 // RISC-V internal rwlock struct definitions. 1598 // Copyright (C) 2019-2021 Free Software Foundation, Inc. 1599 // 1600 // This file is part of the GNU C Library. 1601 // 1602 // The GNU C Library is free software; you can redistribute it and/or 1603 // modify it under the terms of the GNU Lesser General Public 1604 // License as published by the Free Software Foundation; either 1605 // version 2.1 of the License, or (at your option) any later version. 1606 // 1607 // The GNU C Library is distributed in the hope that it will be useful, 1608 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1609 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1610 // Lesser General Public License for more details. 1611 // 1612 // You should have received a copy of the GNU Lesser General Public 1613 // License along with the GNU C Library; if not, see 1614 // <https://www.gnu.org/licenses/>. 1615 1616 // There is a lot of padding in this structure. While it's not strictly 1617 // 1618 // necessary on RISC-V, we're going to leave it in to be on the safe side in 1619 // case it's needed in the future. Most other architectures have the padding, 1620 // so this gives us the same extensibility as everyone else has. 1621 type X__pthread_rwlock_arch_t = struct { 1622 F__readers uint32 1623 F__writers uint32 1624 F__wrphase_futex uint32 1625 F__writers_futex uint32 1626 F__pad3 uint32 1627 F__pad4 uint32 1628 F__cur_writer int32 1629 F__shared int32 1630 F__pad1 uint64 1631 F__pad2 uint64 1632 F__flags uint32 1633 F__ccgo_pad1 [4]byte 1634 } /* struct_rwlock.h:27:1 */ 1635 1636 // Common definition of pthread_cond_t. 1637 1638 type X__pthread_cond_s = struct { 1639 F__0 struct{ F__wseq uint64 } 1640 F__8 struct{ F__g1_start uint64 } 1641 F__g_refs [2]uint32 1642 F__g_size [2]uint32 1643 F__g1_orig_size uint32 1644 F__wrefs uint32 1645 F__g_signals [2]uint32 1646 } /* thread-shared-types.h:92:1 */ 1647 1648 type X__tss_t = uint32 /* thread-shared-types.h:119:22 */ 1649 type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ 1650 1651 type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ 1652 1653 // Thread identifiers. The structure of the attribute type is not 1654 // 1655 // exposed on purpose. 1656 type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ 1657 1658 // Data structures for mutex handling. The structure of the attribute 1659 // 1660 // type is not exposed on purpose. 1661 type Pthread_mutexattr_t = struct { 1662 F__ccgo_pad1 [0]uint32 1663 F__size [4]uint8 1664 } /* pthreadtypes.h:36:3 */ 1665 1666 // Data structure for condition variable handling. The structure of 1667 // 1668 // the attribute type is not exposed on purpose. 1669 type Pthread_condattr_t = struct { 1670 F__ccgo_pad1 [0]uint32 1671 F__size [4]uint8 1672 } /* pthreadtypes.h:45:3 */ 1673 1674 // Keys for thread-specific data 1675 type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ 1676 1677 // Once-only execution 1678 type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ 1679 1680 type Pthread_attr_t1 = struct { 1681 F__ccgo_pad1 [0]uint64 1682 F__size [56]uint8 1683 } /* pthreadtypes.h:56:1 */ 1684 1685 type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ 1686 1687 type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ 1688 1689 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ 1690 1691 // Data structure for reader-writer lock variable handling. The 1692 // 1693 // structure of the attribute type is deliberately not exposed. 1694 type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ 1695 1696 type Pthread_rwlockattr_t = struct { 1697 F__ccgo_pad1 [0]uint64 1698 F__size [8]uint8 1699 } /* pthreadtypes.h:97:3 */ 1700 1701 // POSIX spinlock data type. 1702 type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ 1703 1704 // POSIX barriers data type. The structure of the type is 1705 // 1706 // deliberately not exposed. 1707 type Pthread_barrier_t = struct { 1708 F__ccgo_pad1 [0]uint64 1709 F__size [32]uint8 1710 } /* pthreadtypes.h:112:3 */ 1711 1712 type Pthread_barrierattr_t = struct { 1713 F__ccgo_pad1 [0]uint32 1714 F__size [4]uint8 1715 } /* pthreadtypes.h:118:3 */ 1716 1717 // Type for length arguments in socket calls. 1718 type Socklen_t = X__socklen_t /* socket.h:33:21 */ 1719 1720 // Protocol families. 1721 1722 // Address families. 1723 1724 // Socket level values. Others are defined in the appropriate headers. 1725 // 1726 // XXX These definitions also should go into the appropriate headers as 1727 // far as they are available. 1728 1729 // Maximum queue length specifiable by listen. 1730 1731 // Get the definition of the macro to define the common sockaddr members. 1732 // Definition of struct sockaddr_* common members and sizes, generic version. 1733 // Copyright (C) 1995-2021 Free Software Foundation, Inc. 1734 // This file is part of the GNU C Library. 1735 // 1736 // The GNU C Library is free software; you can redistribute it and/or 1737 // modify it under the terms of the GNU Lesser General Public 1738 // License as published by the Free Software Foundation; either 1739 // version 2.1 of the License, or (at your option) any later version. 1740 // 1741 // The GNU C Library is distributed in the hope that it will be useful, 1742 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1743 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1744 // Lesser General Public License for more details. 1745 // 1746 // You should have received a copy of the GNU Lesser General Public 1747 // License along with the GNU C Library; if not, see 1748 // <https://www.gnu.org/licenses/>. 1749 1750 // Never include this file directly; use <sys/socket.h> instead. 1751 1752 // POSIX.1g specifies this type name for the `sa_family' member. 1753 type Sa_family_t = uint16 /* sockaddr.h:28:28 */ 1754 1755 // This macro is used to declare the initial common members 1756 // of the data types used for socket addresses, `struct sockaddr', 1757 // `struct sockaddr_in', `struct sockaddr_un', etc. 1758 1759 // Size of struct sockaddr_storage. 1760 1761 // Structure describing a generic socket address. 1762 type Sockaddr = struct { 1763 Fsa_family Sa_family_t 1764 Fsa_data [14]uint8 1765 } /* socket.h:178:1 */ 1766 1767 // Structure large enough to hold any socket address (with the historical 1768 // exception of AF_UNIX). 1769 1770 type Sockaddr_storage = struct { 1771 Fss_family Sa_family_t 1772 F__ss_padding [118]uint8 1773 F__ss_align uint64 1774 } /* socket.h:191:1 */ 1775 1776 // Structure describing messages sent by 1777 // 1778 // `sendmsg' and received by `recvmsg'. 1779 type Msghdr = struct { 1780 Fmsg_name uintptr 1781 Fmsg_namelen Socklen_t 1782 F__ccgo_pad1 [4]byte 1783 Fmsg_iov uintptr 1784 Fmsg_iovlen Size_t 1785 Fmsg_control uintptr 1786 Fmsg_controllen Size_t 1787 Fmsg_flags int32 1788 F__ccgo_pad2 [4]byte 1789 } /* socket.h:257:1 */ 1790 1791 // Structure used for storage of ancillary data object information. 1792 type Cmsghdr = struct { 1793 F__ccgo_pad1 [0]uint64 1794 Fcmsg_len Size_t 1795 Fcmsg_level int32 1796 Fcmsg_type int32 1797 } /* socket.h:275:1 */ 1798 1799 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1800 1801 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1802 1803 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1804 1805 // This allows for 1024 file descriptors: if NR_OPEN is ever grown 1806 // beyond that you'll have to change this too. But 1024 fd's seem to be 1807 // enough even for such "real" unices like OSF/1, so hopefully this is 1808 // one limit that doesn't have to be changed [again]. 1809 // 1810 // Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in 1811 // <sys/time.h> (and thus <linux/time.h>) - but this is a more logical 1812 // place for them. Solved by having dummy defines in <sys/time.h>. 1813 1814 // This macro may have been defined in <gnu/types.h>. But we always 1815 // use the one here. 1816 1817 type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */ 1818 1819 // Type of a signal handler. 1820 type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */ 1821 1822 // Type of a SYSV IPC key. 1823 type X__kernel_key_t = int32 /* posix_types.h:33:13 */ 1824 type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */ 1825 1826 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1827 1828 // SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note 1829 // Copyright (C) 2012 ARM Ltd. 1830 // Copyright (C) 2015 Regents of the University of California 1831 1832 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1833 1834 // There seems to be no way of detecting this automatically from user 1835 // space, so 64 bit architectures should override this in their 1836 // bitsperlong.h. In particular, an architecture that supports 1837 // both 32 and 64 bit user space must not rely on CONFIG_64BIT 1838 // to decide it, but rather check a compiler provided macro. 1839 1840 // This file is generally used by user-level software, so you need to 1841 // be a little careful about namespace pollution etc. 1842 // 1843 // First the types that are often defined in different ways across 1844 // architectures, so that you can override them. 1845 1846 type X__kernel_long_t = int64 /* posix_types.h:15:15 */ 1847 type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */ 1848 1849 type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */ 1850 1851 type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */ 1852 1853 type X__kernel_pid_t = int32 /* posix_types.h:28:14 */ 1854 1855 type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */ 1856 1857 type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */ 1858 type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */ 1859 1860 type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */ 1861 1862 type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */ 1863 1864 type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */ 1865 type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */ 1866 1867 type X__kernel_old_uid_t = X__kernel_uid_t /* posix_types.h:54:24 */ 1868 type X__kernel_old_gid_t = X__kernel_gid_t /* posix_types.h:55:24 */ 1869 1870 type X__kernel_old_dev_t = uint32 /* posix_types.h:59:22 */ 1871 1872 // Most 32 bit architectures use "unsigned int" size_t, 1873 // and all 64 bit architectures use "unsigned long" size_t. 1874 type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */ 1875 type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */ 1876 type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */ 1877 1878 type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */ 1879 1880 // anything below here should be completely generic 1881 type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */ 1882 type X__kernel_loff_t = int64 /* posix_types.h:88:19 */ 1883 type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */ 1884 type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */ 1885 type X__kernel_time64_t = int64 /* posix_types.h:91:19 */ 1886 type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */ 1887 type X__kernel_timer_t = int32 /* posix_types.h:93:14 */ 1888 type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */ 1889 type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */ 1890 type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */ 1891 type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */ 1892 1893 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1894 1895 // Socket-level I/O control calls. 1896 1897 // For setsockopt(2) 1898 1899 // Security levels - as per NRL IPv6 - don't actually do anything 1900 1901 // Socket filtering 1902 1903 // Instruct lower device to use last 4-bytes of skb data as FCS 1904 1905 // on 64-bit and x32, avoid the ?: operator 1906 1907 // Structure used to manipulate the SO_LINGER option. 1908 type Linger = struct { 1909 Fl_onoff int32 1910 Fl_linger int32 1911 } /* socket.h:361:1 */ 1912 1913 // This is the 4.3 BSD `struct sockaddr' format, which is used as wire 1914 // 1915 // format in the grotty old 4.3 `talk' protocol. 1916 type Osockaddr = struct { 1917 Fsa_family uint16 1918 Fsa_data [14]uint8 1919 } /* struct_osockaddr.h:6:1 */ 1920 1921 // Define some macros helping to catch buffer overflows. 1922 1923 var _ uint8 /* gen.c:2:13: */