signal_linux_amd64.go 92 KB

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