signal_linux_loong64.go 108 KB

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