signal_linux_riscv64.go 100 KB

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