signal_linux_386.go 89 KB

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