signal_linux_s390x.go 92 KB

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