signal_linux_arm.go 93 KB

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