pthread_linux_riscv64.go 95 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210
  1. // Code generated by 'ccgo pthread/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 pthread/pthread_linux_riscv64.go -pkgname pthread', DO NOT EDIT.
  2. package pthread
  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. CLOCK_BOOTTIME = 7
  15. CLOCK_BOOTTIME_ALARM = 9
  16. CLOCK_MONOTONIC = 1
  17. CLOCK_MONOTONIC_COARSE = 6
  18. CLOCK_MONOTONIC_RAW = 4
  19. CLOCK_PROCESS_CPUTIME_ID = 2
  20. CLOCK_REALTIME = 0
  21. CLOCK_REALTIME_ALARM = 8
  22. CLOCK_REALTIME_COARSE = 5
  23. CLOCK_TAI = 11
  24. CLOCK_THREAD_CPUTIME_ID = 3
  25. PTHREAD_BARRIER_SERIAL_THREAD = -1
  26. PTHREAD_ONCE_INIT = 0
  27. PTHREAD_STACK_MIN = 16384
  28. SCHED_FIFO = 1
  29. SCHED_OTHER = 0
  30. SCHED_RR = 2
  31. TIMER_ABSTIME = 1
  32. TIME_UTC = 1
  33. X_ATFILE_SOURCE = 1
  34. X_BITS_CPU_SET_H = 1
  35. X_BITS_ENDIANNESS_H = 1
  36. X_BITS_ENDIAN_H = 1
  37. X_BITS_PTHREADTYPES_ARCH_H = 1
  38. X_BITS_PTHREADTYPES_COMMON_H = 1
  39. X_BITS_SCHED_H = 1
  40. X_BITS_TIME64_H = 1
  41. X_BITS_TIME_H = 1
  42. X_BITS_TYPESIZES_H = 1
  43. X_BITS_TYPES_H = 1
  44. X_BITS_TYPES_LOCALE_T_H = 1
  45. X_BITS_TYPES_STRUCT_SCHED_PARAM = 1
  46. X_BITS_TYPES___LOCALE_T_H = 1
  47. X_BSD_SIZE_T_ = 0
  48. X_BSD_SIZE_T_DEFINED_ = 0
  49. X_DEFAULT_SOURCE = 1
  50. X_FEATURES_H = 1
  51. X_FILE_OFFSET_BITS = 64
  52. X_GCC_SIZE_T = 0
  53. X_LP64 = 1
  54. X_POSIX_C_SOURCE = 200809
  55. X_POSIX_SOURCE = 1
  56. X_PTHREAD_H = 1
  57. X_RISCV_BITS_SETJMP_H = 0
  58. X_RWLOCK_INTERNAL_H = 0
  59. X_SCHED_H = 1
  60. X_SIZET_ = 0
  61. X_SIZE_T = 0
  62. X_SIZE_T_ = 0
  63. X_SIZE_T_DECLARED = 0
  64. X_SIZE_T_DEFINED = 0
  65. X_SIZE_T_DEFINED_ = 0
  66. X_STDC_PREDEF_H = 1
  67. X_STRUCT_TIMESPEC = 1
  68. X_SYS_CDEFS_H = 1
  69. X_SYS_SIZE_T_H = 0
  70. X_THREAD_MUTEX_INTERNAL_H = 1
  71. X_THREAD_SHARED_TYPES_H = 1
  72. X_TIME_H = 1
  73. X_T_SIZE = 0
  74. X_T_SIZE_ = 0
  75. Linux = 1
  76. Unix = 1
  77. )
  78. // Read-write lock types.
  79. const ( /* pthread.h:104:1: */
  80. PTHREAD_RWLOCK_PREFER_READER_NP = 0
  81. PTHREAD_RWLOCK_PREFER_WRITER_NP = 1
  82. PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP = 2
  83. PTHREAD_RWLOCK_DEFAULT_NP = 0
  84. )
  85. // Read-write lock initializers.
  86. // Scheduler inheritance.
  87. const ( /* pthread.h:124:1: */
  88. PTHREAD_INHERIT_SCHED = 0
  89. PTHREAD_EXPLICIT_SCHED = 1
  90. )
  91. // Scope handling.
  92. const ( /* pthread.h:134:1: */
  93. PTHREAD_SCOPE_SYSTEM = 0
  94. PTHREAD_SCOPE_PROCESS = 1
  95. )
  96. // Process shared or private flag.
  97. const ( /* pthread.h:144:1: */
  98. PTHREAD_PROCESS_PRIVATE = 0
  99. PTHREAD_PROCESS_SHARED = 1
  100. )
  101. // Cancellation
  102. const ( /* pthread.h:168:1: */
  103. PTHREAD_CANCEL_ENABLE = 0
  104. PTHREAD_CANCEL_DISABLE = 1
  105. )
  106. const ( /* pthread.h:175:1: */
  107. PTHREAD_CANCEL_DEFERRED = 0
  108. PTHREAD_CANCEL_ASYNCHRONOUS = 1
  109. )
  110. // Definition of PTHREAD_STACK_MIN, possibly dynamic.
  111. // Copyright (C) 2021 Free Software Foundation, Inc.
  112. // This file is part of the GNU C Library.
  113. //
  114. // The GNU C Library is free software; you can redistribute it and/or
  115. // modify it under the terms of the GNU Lesser General Public
  116. // License as published by the Free Software Foundation; either
  117. // version 2.1 of the License, or (at your option) any later version.
  118. //
  119. // The GNU C Library is distributed in the hope that it will be useful,
  120. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  121. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  122. // Lesser General Public License for more details.
  123. //
  124. // You should have received a copy of the GNU Lesser General Public
  125. // License along with the GNU C Library; if not, see
  126. // <https://www.gnu.org/licenses/>.
  127. // Definition of PTHREAD_STACK_MIN. Linux version.
  128. // Copyright (C) 2021 Free Software Foundation, Inc.
  129. // This file is part of the GNU C Library.
  130. //
  131. // The GNU C Library is free software; you can redistribute it and/or
  132. // modify it under the terms of the GNU Lesser General Public
  133. // License as published by the Free Software Foundation; either
  134. // version 2.1 of the License, or (at your option) any later version.
  135. //
  136. // The GNU C Library is distributed in the hope that it will be useful,
  137. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  138. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  139. // Lesser General Public License for more details.
  140. //
  141. // You should have received a copy of the GNU Lesser General Public
  142. // License along with the GNU C Library; if not, see
  143. // <https://www.gnu.org/licenses/>.
  144. // Minimum size for a thread. We are free to choose a reasonable value.
  145. // Detach state.
  146. const ( /* pthread.h:37:1: */
  147. PTHREAD_CREATE_JOINABLE = 0
  148. PTHREAD_CREATE_DETACHED = 1
  149. )
  150. // Mutex types.
  151. const ( /* pthread.h:47:1: */
  152. PTHREAD_MUTEX_TIMED_NP = 0
  153. PTHREAD_MUTEX_RECURSIVE_NP = 1
  154. PTHREAD_MUTEX_ERRORCHECK_NP = 2
  155. PTHREAD_MUTEX_ADAPTIVE_NP = 3
  156. PTHREAD_MUTEX_NORMAL = 0
  157. PTHREAD_MUTEX_RECURSIVE = 1
  158. PTHREAD_MUTEX_ERRORCHECK = 2
  159. PTHREAD_MUTEX_DEFAULT = 0
  160. )
  161. // Robust mutex or not flags.
  162. const ( /* pthread.h:69:1: */
  163. PTHREAD_MUTEX_STALLED = 0
  164. PTHREAD_MUTEX_STALLED_NP = 0
  165. PTHREAD_MUTEX_ROBUST = 1
  166. PTHREAD_MUTEX_ROBUST_NP = 1
  167. )
  168. // Mutex protocols.
  169. const ( /* pthread.h:81:1: */
  170. PTHREAD_PRIO_NONE = 0
  171. PTHREAD_PRIO_INHERIT = 1
  172. PTHREAD_PRIO_PROTECT = 2
  173. )
  174. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  175. type Size_t = uint64 /* <builtin>:9:23 */
  176. type Wchar_t = int32 /* <builtin>:15:24 */
  177. type X__int128_t = struct {
  178. Flo int64
  179. Fhi int64
  180. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  181. type X__uint128_t = struct {
  182. Flo uint64
  183. Fhi uint64
  184. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  185. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  186. type X__float128 = float64 /* <builtin>:47:21 */
  187. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  188. // This file is part of the GNU C Library.
  189. //
  190. // The GNU C Library is free software; you can redistribute it and/or
  191. // modify it under the terms of the GNU Lesser General Public
  192. // License as published by the Free Software Foundation; either
  193. // version 2.1 of the License, or (at your option) any later version.
  194. //
  195. // The GNU C Library is distributed in the hope that it will be useful,
  196. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  197. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  198. // Lesser General Public License for more details.
  199. //
  200. // You should have received a copy of the GNU Lesser General Public
  201. // License along with the GNU C Library; if not, see
  202. // <https://www.gnu.org/licenses/>.
  203. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  204. // This file is part of the GNU C Library.
  205. //
  206. // The GNU C Library is free software; you can redistribute it and/or
  207. // modify it under the terms of the GNU Lesser General Public
  208. // License as published by the Free Software Foundation; either
  209. // version 2.1 of the License, or (at your option) any later version.
  210. //
  211. // The GNU C Library is distributed in the hope that it will be useful,
  212. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  213. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  214. // Lesser General Public License for more details.
  215. //
  216. // You should have received a copy of the GNU Lesser General Public
  217. // License along with the GNU C Library; if not, see
  218. // <https://www.gnu.org/licenses/>.
  219. // These are defined by the user (or the compiler)
  220. // to specify the desired environment:
  221. //
  222. // __STRICT_ANSI__ ISO Standard C.
  223. // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
  224. // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
  225. // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
  226. // __STDC_WANT_LIB_EXT2__
  227. // Extensions to ISO C99 from TR 27431-2:2010.
  228. // __STDC_WANT_IEC_60559_BFP_EXT__
  229. // Extensions to ISO C11 from TS 18661-1:2014.
  230. // __STDC_WANT_IEC_60559_FUNCS_EXT__
  231. // Extensions to ISO C11 from TS 18661-4:2015.
  232. // __STDC_WANT_IEC_60559_TYPES_EXT__
  233. // Extensions to ISO C11 from TS 18661-3:2015.
  234. // __STDC_WANT_IEC_60559_EXT__
  235. // ISO C2X interfaces defined only in Annex F.
  236. //
  237. // _POSIX_SOURCE IEEE Std 1003.1.
  238. // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
  239. // if >=199309L, add IEEE Std 1003.1b-1993;
  240. // if >=199506L, add IEEE Std 1003.1c-1995;
  241. // if >=200112L, all of IEEE 1003.1-2004
  242. // if >=200809L, all of IEEE 1003.1-2008
  243. // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
  244. // Single Unix conformance is wanted, to 600 for the
  245. // sixth revision, to 700 for the seventh revision.
  246. // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
  247. // _LARGEFILE_SOURCE Some more functions for correct standard I/O.
  248. // _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
  249. // _FILE_OFFSET_BITS=N Select default filesystem interface.
  250. // _ATFILE_SOURCE Additional *at interfaces.
  251. // _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
  252. // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
  253. // _GNU_SOURCE All of the above, plus GNU extensions.
  254. // _DEFAULT_SOURCE The default set of features (taking precedence over
  255. // __STRICT_ANSI__).
  256. //
  257. // _FORTIFY_SOURCE Add security hardening to many library functions.
  258. // Set to 1 or 2; 2 performs stricter checks than 1.
  259. //
  260. // _REENTRANT, _THREAD_SAFE
  261. // Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
  262. //
  263. // The `-ansi' switch to the GNU C compiler, and standards conformance
  264. // options such as `-std=c99', define __STRICT_ANSI__. If none of
  265. // these are defined, or if _DEFAULT_SOURCE is defined, the default is
  266. // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
  267. // 200809L, as well as enabling miscellaneous functions from BSD and
  268. // SVID. If more than one of these are defined, they accumulate. For
  269. // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
  270. // give you ISO C, 1003.1, and 1003.2, but nothing else.
  271. //
  272. // These are defined by this file and are used by the
  273. // header files to decide what to declare or define:
  274. //
  275. // __GLIBC_USE (F) Define things from feature set F. This is defined
  276. // to 1 or 0; the subsequent macros are either defined
  277. // or undefined, and those tests should be moved to
  278. // __GLIBC_USE.
  279. // __USE_ISOC11 Define ISO C11 things.
  280. // __USE_ISOC99 Define ISO C99 things.
  281. // __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
  282. // __USE_ISOCXX11 Define ISO C++11 things.
  283. // __USE_POSIX Define IEEE Std 1003.1 things.
  284. // __USE_POSIX2 Define IEEE Std 1003.2 things.
  285. // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
  286. // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
  287. // __USE_XOPEN Define XPG things.
  288. // __USE_XOPEN_EXTENDED Define X/Open Unix things.
  289. // __USE_UNIX98 Define Single Unix V2 things.
  290. // __USE_XOPEN2K Define XPG6 things.
  291. // __USE_XOPEN2KXSI Define XPG6 XSI things.
  292. // __USE_XOPEN2K8 Define XPG7 things.
  293. // __USE_XOPEN2K8XSI Define XPG7 XSI things.
  294. // __USE_LARGEFILE Define correct standard I/O things.
  295. // __USE_LARGEFILE64 Define LFS things with separate names.
  296. // __USE_FILE_OFFSET64 Define 64bit interface as default.
  297. // __USE_MISC Define things from 4.3BSD or System V Unix.
  298. // __USE_ATFILE Define *at interfaces and AT_* constants for them.
  299. // __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
  300. // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
  301. // __USE_GNU Define GNU extensions.
  302. // __USE_FORTIFY_LEVEL Additional security measures used, according to level.
  303. //
  304. // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
  305. // defined by this file unconditionally. `__GNU_LIBRARY__' is provided
  306. // only for compatibility. All new code should use the other symbols
  307. // to test for features.
  308. //
  309. // All macros listed above as possibly being defined by this file are
  310. // explicitly undefined if they are not explicitly defined.
  311. // Feature-test macros that are not defined by the user or compiler
  312. // but are implied by the other feature-test macros defined (or by the
  313. // lack of any definitions) are defined by the file.
  314. //
  315. // ISO C feature test macros depend on the definition of the macro
  316. // when an affected header is included, not when the first system
  317. // header is included, and so they are handled in
  318. // <bits/libc-header-start.h>, which does not have a multiple include
  319. // guard. Feature test macros that can be handled from the first
  320. // system header included are handled here.
  321. // Undefine everything, so we get a clean slate.
  322. // Suppress kernel-name space pollution unless user expressedly asks
  323. // for it.
  324. // Convenience macro to test the version of gcc.
  325. // Use like this:
  326. // #if __GNUC_PREREQ (2,8)
  327. // ... code requiring gcc 2.8 or later ...
  328. // #endif
  329. // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
  330. // added in 2.0.
  331. // Similarly for clang. Features added to GCC after version 4.2 may
  332. // or may not also be available in clang, and clang's definitions of
  333. // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
  334. // features can be queried via __has_extension/__has_feature.
  335. // Whether to use feature set F.
  336. // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
  337. // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
  338. // issue a warning; the expectation is that the source is being
  339. // transitioned to use the new macro.
  340. // If _GNU_SOURCE was defined by the user, turn on all the other features.
  341. // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
  342. // define _DEFAULT_SOURCE.
  343. // This is to enable the ISO C2X extension.
  344. // This is to enable the ISO C11 extension.
  345. // This is to enable the ISO C99 extension.
  346. // This is to enable the ISO C90 Amendment 1:1995 extension.
  347. // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
  348. // is defined, use POSIX.1-2008 (or another version depending on
  349. // _XOPEN_SOURCE).
  350. // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
  351. // defined in all multithreaded code. GNU libc has not required this
  352. // for many years. We now treat them as compatibility synonyms for
  353. // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
  354. // comprehensive support for multithreaded code. Using them never
  355. // lowers the selected level of POSIX conformance, only raises it.
  356. // Features part to handle 64-bit time_t support.
  357. // Copyright (C) 2021 Free Software Foundation, Inc.
  358. // This file is part of the GNU C Library.
  359. //
  360. // The GNU C Library is free software; you can redistribute it and/or
  361. // modify it under the terms of the GNU Lesser General Public
  362. // License as published by the Free Software Foundation; either
  363. // version 2.1 of the License, or (at your option) any later version.
  364. //
  365. // The GNU C Library is distributed in the hope that it will be useful,
  366. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  367. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  368. // Lesser General Public License for more details.
  369. //
  370. // You should have received a copy of the GNU Lesser General Public
  371. // License along with the GNU C Library; if not, see
  372. // <https://www.gnu.org/licenses/>.
  373. // We need to know the word size in order to check the time size.
  374. // Determine the wordsize from the preprocessor defines. RISC-V version.
  375. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  376. // This file is part of the GNU C Library.
  377. //
  378. // The GNU C Library is free software; you can redistribute it and/or
  379. // modify it under the terms of the GNU Lesser General Public
  380. // License as published by the Free Software Foundation; either
  381. // version 2.1 of the License, or (at your option) any later version.
  382. //
  383. // The GNU C Library is distributed in the hope that it will be useful,
  384. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  385. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  386. // Lesser General Public License for more details.
  387. //
  388. // You should have received a copy of the GNU Lesser General Public
  389. // License along with the GNU C Library. If not, see
  390. // <https://www.gnu.org/licenses/>.
  391. // Bit size of the time_t type at glibc build time, RISC-V case.
  392. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  393. // This file is part of the GNU C Library.
  394. //
  395. // The GNU C Library is free software; you can redistribute it and/or
  396. // modify it under the terms of the GNU Lesser General Public
  397. // License as published by the Free Software Foundation; either
  398. // version 2.1 of the License, or (at your option) any later version.
  399. //
  400. // The GNU C Library is distributed in the hope that it will be useful,
  401. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  402. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  403. // Lesser General Public License for more details.
  404. //
  405. // You should have received a copy of the GNU Lesser General Public
  406. // License along with the GNU C Library; if not, see
  407. // <https://www.gnu.org/licenses/>.
  408. // Determine the wordsize from the preprocessor defines. RISC-V version.
  409. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  410. // This file is part of the GNU C Library.
  411. //
  412. // The GNU C Library is free software; you can redistribute it and/or
  413. // modify it under the terms of the GNU Lesser General Public
  414. // License as published by the Free Software Foundation; either
  415. // version 2.1 of the License, or (at your option) any later version.
  416. //
  417. // The GNU C Library is distributed in the hope that it will be useful,
  418. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  419. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  420. // Lesser General Public License for more details.
  421. //
  422. // You should have received a copy of the GNU Lesser General Public
  423. // License along with the GNU C Library. If not, see
  424. // <https://www.gnu.org/licenses/>.
  425. // RV32 and RV64 both use 64-bit time_t
  426. // The function 'gets' existed in C89, but is impossible to use
  427. // safely. It has been removed from ISO C11 and ISO C++14. Note: for
  428. // compatibility with various implementations of <cstdio>, this test
  429. // must consider only the value of __cplusplus when compiling C++.
  430. // GNU formerly extended the scanf functions with modified format
  431. // specifiers %as, %aS, and %a[...] that allocate a buffer for the
  432. // input using malloc. This extension conflicts with ISO C99, which
  433. // defines %a as a standalone format specifier that reads a floating-
  434. // point number; moreover, POSIX.1-2008 provides the same feature
  435. // using the modifier letter 'm' instead (%ms, %mS, %m[...]).
  436. //
  437. // We now follow C99 unless GNU extensions are active and the compiler
  438. // is specifically in C89 or C++98 mode (strict or not). For
  439. // instance, with GCC, -std=gnu11 will have C99-compliant scanf with
  440. // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
  441. // old extension.
  442. // Get definitions of __STDC_* predefined macros, if the compiler has
  443. // not preincluded this header automatically.
  444. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  445. // This file is part of the GNU C Library.
  446. //
  447. // The GNU C Library is free software; you can redistribute it and/or
  448. // modify it under the terms of the GNU Lesser General Public
  449. // License as published by the Free Software Foundation; either
  450. // version 2.1 of the License, or (at your option) any later version.
  451. //
  452. // The GNU C Library is distributed in the hope that it will be useful,
  453. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  454. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  455. // Lesser General Public License for more details.
  456. //
  457. // You should have received a copy of the GNU Lesser General Public
  458. // License along with the GNU C Library; if not, see
  459. // <https://www.gnu.org/licenses/>.
  460. // This macro indicates that the installed library is the GNU C Library.
  461. // For historic reasons the value now is 6 and this will stay from now
  462. // on. The use of this variable is deprecated. Use __GLIBC__ and
  463. // __GLIBC_MINOR__ now (see below) when you want to test for a specific
  464. // GNU C library version and use the values in <gnu/lib-names.h> to get
  465. // the sonames of the shared libraries.
  466. // Major and minor version number of the GNU C library package. Use
  467. // these macros to test for features in specific releases.
  468. // This is here only because every header file already includes this one.
  469. // Copyright (C) 1992-2021 Free Software Foundation, Inc.
  470. // This file is part of the GNU C Library.
  471. //
  472. // The GNU C Library is free software; you can redistribute it and/or
  473. // modify it under the terms of the GNU Lesser General Public
  474. // License as published by the Free Software Foundation; either
  475. // version 2.1 of the License, or (at your option) any later version.
  476. //
  477. // The GNU C Library is distributed in the hope that it will be useful,
  478. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  479. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  480. // Lesser General Public License for more details.
  481. //
  482. // You should have received a copy of the GNU Lesser General Public
  483. // License along with the GNU C Library; if not, see
  484. // <https://www.gnu.org/licenses/>.
  485. // We are almost always included from features.h.
  486. // The GNU libc does not support any K&R compilers or the traditional mode
  487. // of ISO C compilers anymore. Check for some of the combinations not
  488. // supported anymore.
  489. // Some user header file might have defined this before.
  490. // Compilers that lack __has_attribute may object to
  491. // #if defined __has_attribute && __has_attribute (...)
  492. // even though they do not need to evaluate the right-hand side of the &&.
  493. // Similarly for __has_builtin, etc.
  494. // All functions, except those with callbacks or those that
  495. // synchronize memory, are leaf functions.
  496. // GCC can always grok prototypes. For C++ programs we add throw()
  497. // to help it optimize the function calls. But this only works with
  498. // gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
  499. // as non-throwing using a function attribute since programs can use
  500. // the -fexceptions options for C code as well.
  501. // These two macros are not used in glibc anymore. They are kept here
  502. // only because some other projects expect the macros to be defined.
  503. // For these things, GCC behaves the ANSI way normally,
  504. // and the non-ANSI way under -traditional.
  505. // This is not a typedef so `const __ptr_t' does the right thing.
  506. // C++ needs to know that types and declarations are C, not C++.
  507. // Fortify support.
  508. // Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
  509. // Support for flexible arrays.
  510. // Headers that should use flexible arrays only if they're "real"
  511. // (e.g. only if they won't affect sizeof()) should test
  512. // #if __glibc_c99_flexarr_available.
  513. // __asm__ ("xyz") is used throughout the headers to rename functions
  514. // at the assembly language level. This is wrapped by the __REDIRECT
  515. // macro, in order to support compilers that can do this some other
  516. // way. When compilers don't support asm-names at all, we have to do
  517. // preprocessor tricks instead (which don't have exactly the right
  518. // semantics, but it's the best we can do).
  519. //
  520. // Example:
  521. // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
  522. //
  523. // #elif __SOME_OTHER_COMPILER__
  524. //
  525. // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
  526. // GCC and clang have various useful declarations that can be made with
  527. // the '__attribute__' syntax. All of the ways we use this do fine if
  528. // they are omitted for compilers that don't understand it.
  529. // At some point during the gcc 2.96 development the `malloc' attribute
  530. // for functions was introduced. We don't want to use it unconditionally
  531. // (although this would be possible) since it generates warnings.
  532. // Tell the compiler which arguments to an allocation function
  533. // indicate the size of the allocation.
  534. // At some point during the gcc 2.96 development the `pure' attribute
  535. // for functions was introduced. We don't want to use it unconditionally
  536. // (although this would be possible) since it generates warnings.
  537. // This declaration tells the compiler that the value is constant.
  538. // At some point during the gcc 3.1 development the `used' attribute
  539. // for functions was introduced. We don't want to use it unconditionally
  540. // (although this would be possible) since it generates warnings.
  541. // Since version 3.2, gcc allows marking deprecated functions.
  542. // Since version 4.5, gcc also allows one to specify the message printed
  543. // when a deprecated function is used. clang claims to be gcc 4.2, but
  544. // may also support this feature.
  545. // At some point during the gcc 2.8 development the `format_arg' attribute
  546. // for functions was introduced. We don't want to use it unconditionally
  547. // (although this would be possible) since it generates warnings.
  548. // If several `format_arg' attributes are given for the same function, in
  549. // gcc-3.0 and older, all but the last one are ignored. In newer gccs,
  550. // all designated arguments are considered.
  551. // At some point during the gcc 2.97 development the `strfmon' format
  552. // attribute for functions was introduced. We don't want to use it
  553. // unconditionally (although this would be possible) since it
  554. // generates warnings.
  555. // The nonnull function attribute marks pointer parameters that
  556. // must not be NULL.
  557. // The returns_nonnull function attribute marks the return type of the function
  558. // as always being non-null.
  559. // If fortification mode, we warn about unused results of certain
  560. // function calls which can lead to problems.
  561. // Forces a function to be always inlined.
  562. // The Linux kernel defines __always_inline in stddef.h (283d7573), and
  563. // it conflicts with this definition. Therefore undefine it first to
  564. // allow either header to be included first.
  565. // Associate error messages with the source location of the call site rather
  566. // than with the source location inside the function.
  567. // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
  568. // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
  569. // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
  570. // older than 4.3 may define these macros and still not guarantee GNU inlining
  571. // semantics.
  572. //
  573. // clang++ identifies itself as gcc-4.2, but has support for GNU inlining
  574. // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
  575. // __GNUC_GNU_INLINE__ macro definitions.
  576. // GCC 4.3 and above allow passing all anonymous arguments of an
  577. // __extern_always_inline function to some other vararg function.
  578. // It is possible to compile containing GCC extensions even if GCC is
  579. // run in pedantic mode if the uses are carefully marked using the
  580. // `__extension__' keyword. But this is not generally available before
  581. // version 2.8.
  582. // __restrict is known in EGCS 1.2 and above, and in clang.
  583. // It works also in C++ mode (outside of arrays), but only when spelled
  584. // as '__restrict', not 'restrict'.
  585. // ISO C99 also allows to declare arrays as non-overlapping. The syntax is
  586. // array_name[restrict]
  587. // GCC 3.1 and clang support this.
  588. // This syntax is not usable in C++ mode.
  589. // Describes a char array whose address can safely be passed as the first
  590. // argument to strncpy and strncat, as the char array is not necessarily
  591. // a NUL-terminated string.
  592. // Undefine (also defined in libc-symbols.h).
  593. // Copies attributes from the declaration or type referenced by
  594. // the argument.
  595. // The #ifndef lets Gnulib avoid including these on non-glibc
  596. // platforms, where the includes typically do not exist.
  597. // Determine the wordsize from the preprocessor defines. RISC-V version.
  598. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  599. // This file is part of the GNU C Library.
  600. //
  601. // The GNU C Library is free software; you can redistribute it and/or
  602. // modify it under the terms of the GNU Lesser General Public
  603. // License as published by the Free Software Foundation; either
  604. // version 2.1 of the License, or (at your option) any later version.
  605. //
  606. // The GNU C Library is distributed in the hope that it will be useful,
  607. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  608. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  609. // Lesser General Public License for more details.
  610. //
  611. // You should have received a copy of the GNU Lesser General Public
  612. // License along with the GNU C Library. If not, see
  613. // <https://www.gnu.org/licenses/>.
  614. // Properties of long double type. ldbl-128 version.
  615. // Copyright (C) 2016-2021 Free Software Foundation, Inc.
  616. // This file is part of the GNU C Library.
  617. //
  618. // The GNU C Library is free software; you can redistribute it and/or
  619. // modify it under the terms of the GNU Lesser General Public
  620. // License published by the Free Software Foundation; either
  621. // version 2.1 of the License, or (at your option) any later version.
  622. //
  623. // The GNU C Library is distributed in the hope that it will be useful,
  624. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  625. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  626. // Lesser General Public License for more details.
  627. //
  628. // You should have received a copy of the GNU Lesser General Public
  629. // License along with the GNU C Library; if not, see
  630. // <https://www.gnu.org/licenses/>.
  631. // long double is distinct from double, so there is nothing to
  632. // define here.
  633. // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
  634. // intended for use in preprocessor macros.
  635. //
  636. // Note: MESSAGE must be a _single_ string; concatenation of string
  637. // literals is not supported.
  638. // Generic selection (ISO C11) is a C-only feature, available in GCC
  639. // since version 4.9. Previous versions do not provide generic
  640. // selection, even though they might set __STDC_VERSION__ to 201112L,
  641. // when in -std=c11 mode. Thus, we must check for !defined __GNUC__
  642. // when testing __STDC_VERSION__ for generic selection support.
  643. // On the other hand, Clang also defines __GNUC__, so a clang-specific
  644. // check is required to enable the use of generic selection.
  645. // Designates a 1-based positional argument ref-index of pointer type
  646. // that can be used to access size-index elements of the pointed-to
  647. // array according to access mode, or at least one element when
  648. // size-index is not provided:
  649. // access (access-mode, <ref-index> [, <size-index>])
  650. // Designates dealloc as a function to call to deallocate objects
  651. // allocated by the declared function.
  652. // Specify that a function such as setjmp or vfork may return
  653. // twice.
  654. // If we don't have __REDIRECT, prototypes will be missing if
  655. // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
  656. // Decide whether we can define 'extern inline' functions in headers.
  657. // This is here only because every header file already includes this one.
  658. // Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
  659. // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
  660. // that will always return failure (and set errno to ENOSYS).
  661. // This file is automatically generated.
  662. // This file selects the right generated file of `__stub_FUNCTION' macros
  663. // based on the architecture being compiled for.
  664. // Determine the wordsize from the preprocessor defines. RISC-V version.
  665. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  666. // This file is part of the GNU C Library.
  667. //
  668. // The GNU C Library is free software; you can redistribute it and/or
  669. // modify it under the terms of the GNU Lesser General Public
  670. // License as published by the Free Software Foundation; either
  671. // version 2.1 of the License, or (at your option) any later version.
  672. //
  673. // The GNU C Library is distributed in the hope that it will be useful,
  674. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  675. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  676. // Lesser General Public License for more details.
  677. //
  678. // You should have received a copy of the GNU Lesser General Public
  679. // License along with the GNU C Library. If not, see
  680. // <https://www.gnu.org/licenses/>.
  681. // This file is automatically generated.
  682. // It defines a symbol `__stub_FUNCTION' for each function
  683. // in the C library which is a stub, meaning it will fail
  684. // every time called, usually setting errno to ENOSYS.
  685. // Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface.
  686. // Copyright (C) 1996-2021 Free Software Foundation, Inc.
  687. // This file is part of the GNU C Library.
  688. //
  689. // The GNU C Library is free software; you can redistribute it and/or
  690. // modify it under the terms of the GNU Lesser General Public
  691. // License as published by the Free Software Foundation; either
  692. // version 2.1 of the License, or (at your option) any later version.
  693. //
  694. // The GNU C Library is distributed in the hope that it will be useful,
  695. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  696. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  697. // Lesser General Public License for more details.
  698. //
  699. // You should have received a copy of the GNU Lesser General Public
  700. // License along with the GNU C Library; if not, see
  701. // <https://www.gnu.org/licenses/>.
  702. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  703. // This file is part of the GNU C Library.
  704. //
  705. // The GNU C Library is free software; you can redistribute it and/or
  706. // modify it under the terms of the GNU Lesser General Public
  707. // License as published by the Free Software Foundation; either
  708. // version 2.1 of the License, or (at your option) any later version.
  709. //
  710. // The GNU C Library is distributed in the hope that it will be useful,
  711. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  712. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  713. // Lesser General Public License for more details.
  714. //
  715. // You should have received a copy of the GNU Lesser General Public
  716. // License along with the GNU C Library; if not, see
  717. // <https://www.gnu.org/licenses/>.
  718. // Get type definitions.
  719. // bits/types.h -- definitions of __*_t types underlying *_t types.
  720. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  721. // This file is part of the GNU C Library.
  722. //
  723. // The GNU C Library is free software; you can redistribute it and/or
  724. // modify it under the terms of the GNU Lesser General Public
  725. // License as published by the Free Software Foundation; either
  726. // version 2.1 of the License, or (at your option) any later version.
  727. //
  728. // The GNU C Library is distributed in the hope that it will be useful,
  729. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  730. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  731. // Lesser General Public License for more details.
  732. //
  733. // You should have received a copy of the GNU Lesser General Public
  734. // License along with the GNU C Library; if not, see
  735. // <https://www.gnu.org/licenses/>.
  736. // Never include this file directly; use <sys/types.h> instead.
  737. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  738. // This file is part of the GNU C Library.
  739. //
  740. // The GNU C Library is free software; you can redistribute it and/or
  741. // modify it under the terms of the GNU Lesser General Public
  742. // License as published by the Free Software Foundation; either
  743. // version 2.1 of the License, or (at your option) any later version.
  744. //
  745. // The GNU C Library is distributed in the hope that it will be useful,
  746. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  747. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  748. // Lesser General Public License for more details.
  749. //
  750. // You should have received a copy of the GNU Lesser General Public
  751. // License along with the GNU C Library; if not, see
  752. // <https://www.gnu.org/licenses/>.
  753. // Determine the wordsize from the preprocessor defines. RISC-V version.
  754. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  755. // This file is part of the GNU C Library.
  756. //
  757. // The GNU C Library is free software; you can redistribute it and/or
  758. // modify it under the terms of the GNU Lesser General Public
  759. // License as published by the Free Software Foundation; either
  760. // version 2.1 of the License, or (at your option) any later version.
  761. //
  762. // The GNU C Library is distributed in the hope that it will be useful,
  763. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  764. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  765. // Lesser General Public License for more details.
  766. //
  767. // You should have received a copy of the GNU Lesser General Public
  768. // License along with the GNU C Library. If not, see
  769. // <https://www.gnu.org/licenses/>.
  770. // Bit size of the time_t type at glibc build time, RISC-V case.
  771. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  772. // This file is part of the GNU C Library.
  773. //
  774. // The GNU C Library is free software; you can redistribute it and/or
  775. // modify it under the terms of the GNU Lesser General Public
  776. // License as published by the Free Software Foundation; either
  777. // version 2.1 of the License, or (at your option) any later version.
  778. //
  779. // The GNU C Library is distributed in the hope that it will be useful,
  780. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  781. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  782. // Lesser General Public License for more details.
  783. //
  784. // You should have received a copy of the GNU Lesser General Public
  785. // License along with the GNU C Library; if not, see
  786. // <https://www.gnu.org/licenses/>.
  787. // Determine the wordsize from the preprocessor defines. RISC-V version.
  788. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  789. // This file is part of the GNU C Library.
  790. //
  791. // The GNU C Library is free software; you can redistribute it and/or
  792. // modify it under the terms of the GNU Lesser General Public
  793. // License as published by the Free Software Foundation; either
  794. // version 2.1 of the License, or (at your option) any later version.
  795. //
  796. // The GNU C Library is distributed in the hope that it will be useful,
  797. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  798. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  799. // Lesser General Public License for more details.
  800. //
  801. // You should have received a copy of the GNU Lesser General Public
  802. // License along with the GNU C Library. If not, see
  803. // <https://www.gnu.org/licenses/>.
  804. // RV32 and RV64 both use 64-bit time_t
  805. // Convenience types.
  806. type X__u_char = uint8 /* types.h:31:23 */
  807. type X__u_short = uint16 /* types.h:32:28 */
  808. type X__u_int = uint32 /* types.h:33:22 */
  809. type X__u_long = uint64 /* types.h:34:27 */
  810. // Fixed-size types, underlying types depend on word size and compiler.
  811. type X__int8_t = int8 /* types.h:37:21 */
  812. type X__uint8_t = uint8 /* types.h:38:23 */
  813. type X__int16_t = int16 /* types.h:39:26 */
  814. type X__uint16_t = uint16 /* types.h:40:28 */
  815. type X__int32_t = int32 /* types.h:41:20 */
  816. type X__uint32_t = uint32 /* types.h:42:22 */
  817. type X__int64_t = int64 /* types.h:44:25 */
  818. type X__uint64_t = uint64 /* types.h:45:27 */
  819. // Smallest types with at least a given width.
  820. type X__int_least8_t = X__int8_t /* types.h:52:18 */
  821. type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
  822. type X__int_least16_t = X__int16_t /* types.h:54:19 */
  823. type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
  824. type X__int_least32_t = X__int32_t /* types.h:56:19 */
  825. type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
  826. type X__int_least64_t = X__int64_t /* types.h:58:19 */
  827. type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
  828. // quad_t is also 64 bits.
  829. type X__quad_t = int64 /* types.h:63:18 */
  830. type X__u_quad_t = uint64 /* types.h:64:27 */
  831. // Largest integral types.
  832. type X__intmax_t = int64 /* types.h:72:18 */
  833. type X__uintmax_t = uint64 /* types.h:73:27 */
  834. // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
  835. // macros for each of the OS types we define below. The definitions
  836. // of those macros must use the following macros for underlying types.
  837. // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
  838. // variants of each of the following integer types on this machine.
  839. //
  840. // 16 -- "natural" 16-bit type (always short)
  841. // 32 -- "natural" 32-bit type (always int)
  842. // 64 -- "natural" 64-bit type (long or long long)
  843. // LONG32 -- 32-bit type, traditionally long
  844. // QUAD -- 64-bit type, traditionally long long
  845. // WORD -- natural type of __WORDSIZE bits (int or long)
  846. // LONGWORD -- type of __WORDSIZE bits, traditionally long
  847. //
  848. // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
  849. // conventional uses of `long' or `long long' type modifiers match the
  850. // types we define, even when a less-adorned type would be the same size.
  851. // This matters for (somewhat) portably writing printf/scanf formats for
  852. // these types, where using the appropriate l or ll format modifiers can
  853. // make the typedefs and the formats match up across all GNU platforms. If
  854. // we used `long' when it's 64 bits where `long long' is expected, then the
  855. // compiler would warn about the formats not matching the argument types,
  856. // and the programmer changing them to shut up the compiler would break the
  857. // program's portability.
  858. //
  859. // Here we assume what is presently the case in all the GCC configurations
  860. // we support: long long is always 64 bits, long is always word/address size,
  861. // and int is always 32 bits.
  862. // No need to mark the typedef with __extension__.
  863. // bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
  864. // Copyright (C) 2011-2021 Free Software Foundation, Inc.
  865. // This file is part of the GNU C Library.
  866. // Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
  867. //
  868. // The GNU C Library is free software; you can redistribute it and/or
  869. // modify it under the terms of the GNU Lesser General Public
  870. // License as published by the Free Software Foundation; either
  871. // version 2.1 of the License, or (at your option) any later version.
  872. //
  873. // The GNU C Library is distributed in the hope that it will be useful,
  874. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  875. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  876. // Lesser General Public License for more details.
  877. //
  878. // You should have received a copy of the GNU Lesser General Public
  879. // License along with the GNU C Library. If not, see
  880. // <https://www.gnu.org/licenses/>.
  881. // See <bits/types.h> for the meaning of these macros. This file exists so
  882. // that <bits/types.h> need not vary across different GNU platforms.
  883. // Tell the libc code that off_t and off64_t are actually the same type
  884. // for all ABI purposes, even if possibly expressed as different base types
  885. // for C type-checking purposes.
  886. // Same for ino_t and ino64_t.
  887. // And for __rlim_t and __rlim64_t.
  888. // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
  889. // And for getitimer, setitimer and rusage
  890. // Number of descriptors that can fit in an `fd_set'.
  891. // bits/time64.h -- underlying types for __time64_t. RISC-V version.
  892. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  893. // This file is part of the GNU C Library.
  894. //
  895. // The GNU C Library is free software; you can redistribute it and/or
  896. // modify it under the terms of the GNU Lesser General Public
  897. // License as published by the Free Software Foundation; either
  898. // version 2.1 of the License, or (at your option) any later version.
  899. //
  900. // The GNU C Library is distributed in the hope that it will be useful,
  901. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  902. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  903. // Lesser General Public License for more details.
  904. //
  905. // You should have received a copy of the GNU Lesser General Public
  906. // License along with the GNU C Library; if not, see
  907. // <https://www.gnu.org/licenses/>.
  908. // Define __TIME64_T_TYPE so that it is always a 64-bit type.
  909. // If we already have 64-bit time type then use it.
  910. type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
  911. type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
  912. type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
  913. type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
  914. type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
  915. type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
  916. type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
  917. type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
  918. type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
  919. type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
  920. type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
  921. type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
  922. type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
  923. type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
  924. type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
  925. type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
  926. type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
  927. type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
  928. type X__suseconds64_t = int64 /* types.h:163:33 */
  929. type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
  930. type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
  931. // Clock ID used in clock and timer functions.
  932. type X__clockid_t = int32 /* types.h:169:29 */
  933. // Timer ID returned by `timer_create'.
  934. type X__timer_t = uintptr /* types.h:172:12 */
  935. // Type to represent block size.
  936. type X__blksize_t = int32 /* types.h:175:29 */
  937. // Types from the Large File Support interface.
  938. // Type to count number of disk blocks.
  939. type X__blkcnt_t = int64 /* types.h:180:28 */
  940. type X__blkcnt64_t = int64 /* types.h:181:30 */
  941. // Type to count file system blocks.
  942. type X__fsblkcnt_t = uint64 /* types.h:184:30 */
  943. type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
  944. // Type to count file system nodes.
  945. type X__fsfilcnt_t = uint64 /* types.h:188:30 */
  946. type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
  947. // Type of miscellaneous file system fields.
  948. type X__fsword_t = int64 /* types.h:192:28 */
  949. type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
  950. // Signed long type used in system calls.
  951. type X__syscall_slong_t = int64 /* types.h:197:33 */
  952. // Unsigned long type used in system calls.
  953. type X__syscall_ulong_t = uint64 /* types.h:199:33 */
  954. // These few don't really vary by system, they always correspond
  955. //
  956. // to one of the other defined types.
  957. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
  958. type X__caddr_t = uintptr /* types.h:204:14 */
  959. // Duplicates info from stdint.h but this is used in unistd.h.
  960. type X__intptr_t = int64 /* types.h:207:25 */
  961. // Duplicate info from sys/socket.h.
  962. type X__socklen_t = uint32 /* types.h:210:23 */
  963. // C99: An integer type that can be accessed as an atomic entity,
  964. //
  965. // even in the presence of asynchronous interrupts.
  966. // It is not currently necessary for this to be machine-specific.
  967. type X__sig_atomic_t = int32 /* types.h:215:13 */
  968. // Wide character type.
  969. // Locale-writers should change this as necessary to
  970. // be big enough to hold unique values not between 0 and 127,
  971. // and not (wchar_t) -1, for each defined multibyte character.
  972. // Define this type if we are doing the whole job,
  973. // or if we want this type in particular.
  974. // A null pointer constant.
  975. // bits/types.h -- definitions of __*_t types underlying *_t types.
  976. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  977. // This file is part of the GNU C Library.
  978. //
  979. // The GNU C Library is free software; you can redistribute it and/or
  980. // modify it under the terms of the GNU Lesser General Public
  981. // License as published by the Free Software Foundation; either
  982. // version 2.1 of the License, or (at your option) any later version.
  983. //
  984. // The GNU C Library is distributed in the hope that it will be useful,
  985. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  986. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  987. // Lesser General Public License for more details.
  988. //
  989. // You should have received a copy of the GNU Lesser General Public
  990. // License along with the GNU C Library; if not, see
  991. // <https://www.gnu.org/licenses/>.
  992. // Never include this file directly; use <sys/types.h> instead.
  993. // Returned by `time'.
  994. type Time_t = X__time_t /* time_t.h:10:18 */
  995. // NB: Include guard matches what <linux/time.h> uses.
  996. // bits/types.h -- definitions of __*_t types underlying *_t types.
  997. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  998. // This file is part of the GNU C Library.
  999. //
  1000. // The GNU C Library is free software; you can redistribute it and/or
  1001. // modify it under the terms of the GNU Lesser General Public
  1002. // License as published by the Free Software Foundation; either
  1003. // version 2.1 of the License, or (at your option) any later version.
  1004. //
  1005. // The GNU C Library is distributed in the hope that it will be useful,
  1006. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1007. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1008. // Lesser General Public License for more details.
  1009. //
  1010. // You should have received a copy of the GNU Lesser General Public
  1011. // License along with the GNU C Library; if not, see
  1012. // <https://www.gnu.org/licenses/>.
  1013. // Never include this file directly; use <sys/types.h> instead.
  1014. // Endian macros for string.h functions
  1015. // Copyright (C) 1992-2021 Free Software Foundation, Inc.
  1016. // This file is part of the GNU C Library.
  1017. //
  1018. // The GNU C Library is free software; you can redistribute it and/or
  1019. // modify it under the terms of the GNU Lesser General Public
  1020. // License as published by the Free Software Foundation; either
  1021. // version 2.1 of the License, or (at your option) any later version.
  1022. //
  1023. // The GNU C Library is distributed in the hope that it will be useful,
  1024. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1025. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1026. // Lesser General Public License for more details.
  1027. //
  1028. // You should have received a copy of the GNU Lesser General Public
  1029. // License along with the GNU C Library; if not, see
  1030. // <http://www.gnu.org/licenses/>.
  1031. // Definitions for byte order, according to significance of bytes,
  1032. // from low addresses to high addresses. The value is what you get by
  1033. // putting '4' in the most significant byte, '3' in the second most
  1034. // significant byte, '2' in the second least significant byte, and '1'
  1035. // in the least significant byte, and then writing down one digit for
  1036. // each byte, starting with the byte at the lowest address at the left,
  1037. // and proceeding to the byte with the highest address at the right.
  1038. // This file defines `__BYTE_ORDER' for the particular machine.
  1039. // RISC-V is little-endian.
  1040. // Some machines may need to use a different endianness for floating point
  1041. // values.
  1042. // POSIX.1b structure for a time value. This is like a `struct timeval' but
  1043. //
  1044. // has nanoseconds instead of microseconds.
  1045. type Timespec = struct {
  1046. Ftv_sec X__time_t
  1047. Ftv_nsec X__syscall_slong_t
  1048. } /* struct_timespec.h:11:1 */
  1049. type Pid_t = X__pid_t /* sched.h:38:17 */
  1050. // Get system specific constant and data structure definitions.
  1051. // Definitions of constants and data structure for POSIX 1003.1b-1993
  1052. // scheduling interface.
  1053. // Copyright (C) 1996-2021 Free Software Foundation, Inc.
  1054. // This file is part of the GNU C Library.
  1055. //
  1056. // The GNU C Library is free software; you can redistribute it and/or
  1057. // modify it under the terms of the GNU Lesser General Public
  1058. // License as published by the Free Software Foundation; either
  1059. // version 2.1 of the License, or (at your option) any later version.
  1060. //
  1061. // The GNU C Library is distributed in the hope that it will be useful,
  1062. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1063. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1064. // Lesser General Public License for more details.
  1065. //
  1066. // You should have received a copy of the GNU Lesser General Public
  1067. // License along with the GNU C Library; if not, see
  1068. // <https://www.gnu.org/licenses/>.
  1069. // Scheduling algorithms.
  1070. // Sched parameter structure. Generic version.
  1071. // Copyright (C) 1996-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. // Data structure to describe a process' schedulability.
  1088. type Sched_param = struct{ Fsched_priority int32 } /* struct_sched_param.h:23:1 */
  1089. // Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
  1090. // scheduling interface.
  1091. // Copyright (C) 1996-2021 Free Software Foundation, Inc.
  1092. // This file is part of the GNU C Library.
  1093. //
  1094. // The GNU C Library is free software; you can redistribute it and/or
  1095. // modify it under the terms of the GNU Lesser General Public
  1096. // License as published by the Free Software Foundation; either
  1097. // version 2.1 of the License, or (at your option) any later version.
  1098. //
  1099. // The GNU C Library is distributed in the hope that it will be useful,
  1100. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1101. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1102. // Lesser General Public License for more details.
  1103. //
  1104. // You should have received a copy of the GNU Lesser General Public
  1105. // License along with the GNU C Library; if not, see
  1106. // <https://www.gnu.org/licenses/>.
  1107. // Size definition for CPU sets.
  1108. // Type for array elements in 'cpu_set_t'.
  1109. type X__cpu_mask = uint64 /* cpu-set.h:32:25 */
  1110. // Basic access functions.
  1111. // Data structure to describe CPU mask.
  1112. type Cpu_set_t = struct{ F__bits [16]X__cpu_mask } /* cpu-set.h:42:3 */
  1113. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  1114. // This file is part of the GNU C Library.
  1115. //
  1116. // The GNU C Library is free software; you can redistribute it and/or
  1117. // modify it under the terms of the GNU Lesser General Public
  1118. // License as published by the Free Software Foundation; either
  1119. // version 2.1 of the License, or (at your option) any later version.
  1120. //
  1121. // The GNU C Library is distributed in the hope that it will be useful,
  1122. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1123. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1124. // Lesser General Public License for more details.
  1125. //
  1126. // You should have received a copy of the GNU Lesser General Public
  1127. // License along with the GNU C Library; if not, see
  1128. // <https://www.gnu.org/licenses/>.
  1129. // ISO C99 Standard: 7.23 Date and time <time.h>
  1130. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  1131. // This file is part of the GNU C Library.
  1132. //
  1133. // The GNU C Library is free software; you can redistribute it and/or
  1134. // modify it under the terms of the GNU Lesser General Public
  1135. // License as published by the Free Software Foundation; either
  1136. // version 2.1 of the License, or (at your option) any later version.
  1137. //
  1138. // The GNU C Library is distributed in the hope that it will be useful,
  1139. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1140. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1141. // Lesser General Public License for more details.
  1142. //
  1143. // You should have received a copy of the GNU Lesser General Public
  1144. // License along with the GNU C Library; if not, see
  1145. // <https://www.gnu.org/licenses/>.
  1146. // Copyright (C) 1989-2021 Free Software Foundation, Inc.
  1147. //
  1148. // This file is part of GCC.
  1149. //
  1150. // GCC is free software; you can redistribute it and/or modify
  1151. // it under the terms of the GNU General Public License as published by
  1152. // the Free Software Foundation; either version 3, or (at your option)
  1153. // any later version.
  1154. //
  1155. // GCC is distributed in the hope that it will be useful,
  1156. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1157. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1158. // GNU General Public License for more details.
  1159. //
  1160. // Under Section 7 of GPL version 3, you are granted additional
  1161. // permissions described in the GCC Runtime Library Exception, version
  1162. // 3.1, as published by the Free Software Foundation.
  1163. //
  1164. // You should have received a copy of the GNU General Public License and
  1165. // a copy of the GCC Runtime Library Exception along with this program;
  1166. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  1167. // <http://www.gnu.org/licenses/>.
  1168. // ISO C Standard: 7.17 Common definitions <stddef.h>
  1169. // Any one of these symbols __need_* means that GNU libc
  1170. // wants us just to define one data type. So don't define
  1171. // the symbols that indicate this file's entire job has been done.
  1172. // This avoids lossage on SunOS but only if stdtypes.h comes first.
  1173. // There's no way to win with the other order! Sun lossage.
  1174. // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  1175. // Just ignore it.
  1176. // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  1177. // _TYPE_size_t which will typedef size_t. fixincludes patched the
  1178. // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  1179. // not defined, and so that defining this macro defines _GCC_SIZE_T.
  1180. // If we find that the macros are still defined at this point, we must
  1181. // invoke them so that the type is defined as expected.
  1182. // In case nobody has defined these types, but we aren't running under
  1183. // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  1184. // __WCHAR_TYPE__ have reasonable values. This can happen if the
  1185. // parts of GCC is compiled by an older compiler, that actually
  1186. // include gstddef.h, such as collect2.
  1187. // Signed type of difference of two pointers.
  1188. // Define this type if we are doing the whole job,
  1189. // or if we want this type in particular.
  1190. // Unsigned type of `sizeof' something.
  1191. // Define this type if we are doing the whole job,
  1192. // or if we want this type in particular.
  1193. // Wide character type.
  1194. // Locale-writers should change this as necessary to
  1195. // be big enough to hold unique values not between 0 and 127,
  1196. // and not (wchar_t) -1, for each defined multibyte character.
  1197. // Define this type if we are doing the whole job,
  1198. // or if we want this type in particular.
  1199. // A null pointer constant.
  1200. // This defines CLOCKS_PER_SEC, which is the number of processor clock
  1201. // ticks per second, and possibly a number of other constants.
  1202. // System-dependent timing definitions. Linux version.
  1203. // Copyright (C) 1996-2021 Free Software Foundation, Inc.
  1204. // This file is part of the GNU C Library.
  1205. //
  1206. // The GNU C Library is free software; you can redistribute it and/or
  1207. // modify it under the terms of the GNU Lesser General Public
  1208. // License as published by the Free Software Foundation; either
  1209. // version 2.1 of the License, or (at your option) any later version.
  1210. //
  1211. // The GNU C Library is distributed in the hope that it will be useful,
  1212. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1213. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1214. // Lesser General Public License for more details.
  1215. //
  1216. // You should have received a copy of the GNU Lesser General Public
  1217. // License along with the GNU C Library; if not, see
  1218. // <https://www.gnu.org/licenses/>.
  1219. // Never include this file directly; use <time.h> instead.
  1220. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1221. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  1222. // This file is part of the GNU C Library.
  1223. //
  1224. // The GNU C Library is free software; you can redistribute it and/or
  1225. // modify it under the terms of the GNU Lesser General Public
  1226. // License as published by the Free Software Foundation; either
  1227. // version 2.1 of the License, or (at your option) any later version.
  1228. //
  1229. // The GNU C Library is distributed in the hope that it will be useful,
  1230. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1231. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1232. // Lesser General Public License for more details.
  1233. //
  1234. // You should have received a copy of the GNU Lesser General Public
  1235. // License along with the GNU C Library; if not, see
  1236. // <https://www.gnu.org/licenses/>.
  1237. // Never include this file directly; use <sys/types.h> instead.
  1238. // ISO/IEC 9899:1999 7.23.1: Components of time
  1239. // The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is
  1240. // the number per second of the value returned by the `clock' function.
  1241. // CAE XSH, Issue 4, Version 2: <time.h>
  1242. // The value of CLOCKS_PER_SEC is required to be 1 million on all
  1243. // XSI-conformant systems.
  1244. // Identifier for system-wide realtime clock.
  1245. // Monotonic system-wide clock.
  1246. // High-resolution timer from the CPU.
  1247. // Thread-specific CPU-time clock.
  1248. // Monotonic system-wide clock, not adjusted for frequency scaling.
  1249. // Identifier for system-wide realtime clock, updated only on ticks.
  1250. // Monotonic system-wide clock, updated only on ticks.
  1251. // Monotonic system-wide clock that includes time spent in suspension.
  1252. // Like CLOCK_REALTIME but also wakes suspended system.
  1253. // Like CLOCK_BOOTTIME but also wakes suspended system.
  1254. // Like CLOCK_REALTIME but in International Atomic Time.
  1255. // Flag to indicate time is absolute.
  1256. // Many of the typedefs and structs whose official home is this header
  1257. // may also need to be defined by other headers.
  1258. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1259. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  1260. // This file is part of the GNU C Library.
  1261. //
  1262. // The GNU C Library is free software; you can redistribute it and/or
  1263. // modify it under the terms of the GNU Lesser General Public
  1264. // License as published by the Free Software Foundation; either
  1265. // version 2.1 of the License, or (at your option) any later version.
  1266. //
  1267. // The GNU C Library is distributed in the hope that it will be useful,
  1268. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1269. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1270. // Lesser General Public License for more details.
  1271. //
  1272. // You should have received a copy of the GNU Lesser General Public
  1273. // License along with the GNU C Library; if not, see
  1274. // <https://www.gnu.org/licenses/>.
  1275. // Never include this file directly; use <sys/types.h> instead.
  1276. // Returned by `clock'.
  1277. type Clock_t = X__clock_t /* clock_t.h:7:19 */
  1278. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1279. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  1280. // This file is part of the GNU C Library.
  1281. //
  1282. // The GNU C Library is free software; you can redistribute it and/or
  1283. // modify it under the terms of the GNU Lesser General Public
  1284. // License as published by the Free Software Foundation; either
  1285. // version 2.1 of the License, or (at your option) any later version.
  1286. //
  1287. // The GNU C Library is distributed in the hope that it will be useful,
  1288. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1289. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1290. // Lesser General Public License for more details.
  1291. //
  1292. // You should have received a copy of the GNU Lesser General Public
  1293. // License along with the GNU C Library; if not, see
  1294. // <https://www.gnu.org/licenses/>.
  1295. // Never include this file directly; use <sys/types.h> instead.
  1296. // ISO C `broken-down time' structure.
  1297. type Tm = struct {
  1298. Ftm_sec int32
  1299. Ftm_min int32
  1300. Ftm_hour int32
  1301. Ftm_mday int32
  1302. Ftm_mon int32
  1303. Ftm_year int32
  1304. Ftm_wday int32
  1305. Ftm_yday int32
  1306. Ftm_isdst int32
  1307. F__ccgo_pad1 [4]byte
  1308. Ftm_gmtoff int64
  1309. Ftm_zone uintptr
  1310. } /* struct_tm.h:7:1 */
  1311. // NB: Include guard matches what <linux/time.h> uses.
  1312. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1313. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  1314. // This file is part of the GNU C Library.
  1315. //
  1316. // The GNU C Library is free software; you can redistribute it and/or
  1317. // modify it under the terms of the GNU Lesser General Public
  1318. // License as published by the Free Software Foundation; either
  1319. // version 2.1 of the License, or (at your option) any later version.
  1320. //
  1321. // The GNU C Library is distributed in the hope that it will be useful,
  1322. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1323. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1324. // Lesser General Public License for more details.
  1325. //
  1326. // You should have received a copy of the GNU Lesser General Public
  1327. // License along with the GNU C Library; if not, see
  1328. // <https://www.gnu.org/licenses/>.
  1329. // Never include this file directly; use <sys/types.h> instead.
  1330. // Clock ID used in clock and timer functions.
  1331. type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
  1332. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1333. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  1334. // This file is part of the GNU C Library.
  1335. //
  1336. // The GNU C Library is free software; you can redistribute it and/or
  1337. // modify it under the terms of the GNU Lesser General Public
  1338. // License as published by the Free Software Foundation; either
  1339. // version 2.1 of the License, or (at your option) any later version.
  1340. //
  1341. // The GNU C Library is distributed in the hope that it will be useful,
  1342. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1343. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1344. // Lesser General Public License for more details.
  1345. //
  1346. // You should have received a copy of the GNU Lesser General Public
  1347. // License along with the GNU C Library; if not, see
  1348. // <https://www.gnu.org/licenses/>.
  1349. // Never include this file directly; use <sys/types.h> instead.
  1350. // Timer ID returned by `timer_create'.
  1351. type Timer_t = X__timer_t /* timer_t.h:7:19 */
  1352. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1353. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  1354. // This file is part of the GNU C Library.
  1355. //
  1356. // The GNU C Library is free software; you can redistribute it and/or
  1357. // modify it under the terms of the GNU Lesser General Public
  1358. // License as published by the Free Software Foundation; either
  1359. // version 2.1 of the License, or (at your option) any later version.
  1360. //
  1361. // The GNU C Library is distributed in the hope that it will be useful,
  1362. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1363. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1364. // Lesser General Public License for more details.
  1365. //
  1366. // You should have received a copy of the GNU Lesser General Public
  1367. // License along with the GNU C Library; if not, see
  1368. // <https://www.gnu.org/licenses/>.
  1369. // Never include this file directly; use <sys/types.h> instead.
  1370. // NB: Include guard matches what <linux/time.h> uses.
  1371. // POSIX.1b structure for timer start values and intervals.
  1372. type Itimerspec = struct {
  1373. Fit_interval struct {
  1374. Ftv_sec X__time_t
  1375. Ftv_nsec X__syscall_slong_t
  1376. }
  1377. Fit_value struct {
  1378. Ftv_sec X__time_t
  1379. Ftv_nsec X__syscall_slong_t
  1380. }
  1381. } /* struct_itimerspec.h:8:1 */
  1382. // Definition of locale_t.
  1383. // Copyright (C) 2017-2021 Free Software Foundation, Inc.
  1384. // This file is part of the GNU C Library.
  1385. //
  1386. // The GNU C Library is free software; you can redistribute it and/or
  1387. // modify it under the terms of the GNU Lesser General Public
  1388. // License as published by the Free Software Foundation; either
  1389. // version 2.1 of the License, or (at your option) any later version.
  1390. //
  1391. // The GNU C Library is distributed in the hope that it will be useful,
  1392. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1393. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1394. // Lesser General Public License for more details.
  1395. //
  1396. // You should have received a copy of the GNU Lesser General Public
  1397. // License along with the GNU C Library; if not, see
  1398. // <https://www.gnu.org/licenses/>.
  1399. // Definition of struct __locale_struct and __locale_t.
  1400. // Copyright (C) 1997-2021 Free Software Foundation, Inc.
  1401. // This file is part of the GNU C Library.
  1402. // Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
  1403. //
  1404. // The GNU C Library is free software; you can redistribute it and/or
  1405. // modify it under the terms of the GNU Lesser General Public
  1406. // License as published by the Free Software Foundation; either
  1407. // version 2.1 of the License, or (at your option) any later version.
  1408. //
  1409. // The GNU C Library is distributed in the hope that it will be useful,
  1410. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1411. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1412. // Lesser General Public License for more details.
  1413. //
  1414. // You should have received a copy of the GNU Lesser General Public
  1415. // License along with the GNU C Library; if not, see
  1416. // <https://www.gnu.org/licenses/>.
  1417. // POSIX.1-2008: the locale_t type, representing a locale context
  1418. // (implementation-namespace version). This type should be treated
  1419. // as opaque by applications; some details are exposed for the sake of
  1420. // efficiency in e.g. ctype functions.
  1421. type X__locale_struct = struct {
  1422. F__locales [13]uintptr
  1423. F__ctype_b uintptr
  1424. F__ctype_tolower uintptr
  1425. F__ctype_toupper uintptr
  1426. F__names [13]uintptr
  1427. } /* __locale_t.h:28:1 */
  1428. type X__locale_t = uintptr /* __locale_t.h:42:32 */
  1429. type Locale_t = X__locale_t /* locale_t.h:24:20 */
  1430. // Endian macros for string.h functions
  1431. // Copyright (C) 1992-2021 Free Software Foundation, Inc.
  1432. // This file is part of the GNU C Library.
  1433. //
  1434. // The GNU C Library is free software; you can redistribute it and/or
  1435. // modify it under the terms of the GNU Lesser General Public
  1436. // License as published by the Free Software Foundation; either
  1437. // version 2.1 of the License, or (at your option) any later version.
  1438. //
  1439. // The GNU C Library is distributed in the hope that it will be useful,
  1440. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1441. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1442. // Lesser General Public License for more details.
  1443. //
  1444. // You should have received a copy of the GNU Lesser General Public
  1445. // License along with the GNU C Library; if not, see
  1446. // <http://www.gnu.org/licenses/>.
  1447. // Declaration of common pthread types for all architectures.
  1448. // Copyright (C) 2017-2021 Free Software Foundation, Inc.
  1449. // This file is part of the GNU C Library.
  1450. //
  1451. // The GNU C Library is free software; you can redistribute it and/or
  1452. // modify it under the terms of the GNU Lesser General Public
  1453. // License as published by the Free Software Foundation; either
  1454. // version 2.1 of the License, or (at your option) any later version.
  1455. //
  1456. // The GNU C Library is distributed in the hope that it will be useful,
  1457. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1458. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1459. // Lesser General Public License for more details.
  1460. //
  1461. // You should have received a copy of the GNU Lesser General Public
  1462. // License along with the GNU C Library; if not, see
  1463. // <https://www.gnu.org/licenses/>.
  1464. // For internal mutex and condition variable definitions.
  1465. // Common threading primitives definitions for both POSIX and C11.
  1466. // Copyright (C) 2017-2021 Free Software Foundation, Inc.
  1467. // This file is part of the GNU C Library.
  1468. //
  1469. // The GNU C Library is free software; you can redistribute it and/or
  1470. // modify it under the terms of the GNU Lesser General Public
  1471. // License as published by the Free Software Foundation; either
  1472. // version 2.1 of the License, or (at your option) any later version.
  1473. //
  1474. // The GNU C Library is distributed in the hope that it will be useful,
  1475. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1476. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1477. // Lesser General Public License for more details.
  1478. //
  1479. // You should have received a copy of the GNU Lesser General Public
  1480. // License along with the GNU C Library; if not, see
  1481. // <https://www.gnu.org/licenses/>.
  1482. // Arch-specific definitions. Each architecture must define the following
  1483. // macros to define the expected sizes of pthread data types:
  1484. //
  1485. // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
  1486. // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
  1487. // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
  1488. // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
  1489. // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
  1490. // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
  1491. // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
  1492. // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
  1493. // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  1494. //
  1495. // The additional macro defines any constraint for the lock alignment
  1496. // inside the thread structures:
  1497. //
  1498. // __LOCK_ALIGNMENT - for internal lock/futex usage.
  1499. //
  1500. // Same idea but for the once locking primitive:
  1501. //
  1502. // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  1503. // Machine-specific pthread type layouts. RISC-V version.
  1504. // Copyright (C) 2011-2021 Free Software Foundation, Inc.
  1505. // This file is part of the GNU C Library.
  1506. //
  1507. // The GNU C Library is free software; you can redistribute it and/or
  1508. // modify it under the terms of the GNU Lesser General Public
  1509. // License as published by the Free Software Foundation; either
  1510. // version 2.1 of the License, or (at your option) any later version.
  1511. //
  1512. // The GNU C Library is distributed in the hope that it will be useful,
  1513. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1514. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1515. // Lesser General Public License for more details.
  1516. //
  1517. // You should have received a copy of the GNU Lesser General Public
  1518. // License along with the GNU C Library. If not, see
  1519. // <https://www.gnu.org/licenses/>.
  1520. // Endian macros for string.h functions
  1521. // Copyright (C) 1992-2021 Free Software Foundation, Inc.
  1522. // This file is part of the GNU C Library.
  1523. //
  1524. // The GNU C Library is free software; you can redistribute it and/or
  1525. // modify it under the terms of the GNU Lesser General Public
  1526. // License as published by the Free Software Foundation; either
  1527. // version 2.1 of the License, or (at your option) any later version.
  1528. //
  1529. // The GNU C Library is distributed in the hope that it will be useful,
  1530. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1531. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1532. // Lesser General Public License for more details.
  1533. //
  1534. // You should have received a copy of the GNU Lesser General Public
  1535. // License along with the GNU C Library; if not, see
  1536. // <http://www.gnu.org/licenses/>.
  1537. // Common definition of pthread_mutex_t.
  1538. type X__pthread_internal_list = struct {
  1539. F__prev uintptr
  1540. F__next uintptr
  1541. } /* thread-shared-types.h:49:9 */
  1542. // Endian macros for string.h functions
  1543. // Copyright (C) 1992-2021 Free Software Foundation, Inc.
  1544. // This file is part of the GNU C Library.
  1545. //
  1546. // The GNU C Library is free software; you can redistribute it and/or
  1547. // modify it under the terms of the GNU Lesser General Public
  1548. // License as published by the Free Software Foundation; either
  1549. // version 2.1 of the License, or (at your option) any later version.
  1550. //
  1551. // The GNU C Library is distributed in the hope that it will be useful,
  1552. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1553. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1554. // Lesser General Public License for more details.
  1555. //
  1556. // You should have received a copy of the GNU Lesser General Public
  1557. // License along with the GNU C Library; if not, see
  1558. // <http://www.gnu.org/licenses/>.
  1559. // Declaration of common pthread types for all architectures.
  1560. // Copyright (C) 2017-2021 Free Software Foundation, Inc.
  1561. // This file is part of the GNU C Library.
  1562. //
  1563. // The GNU C Library is free software; you can redistribute it and/or
  1564. // modify it under the terms of the GNU Lesser General Public
  1565. // License as published by the Free Software Foundation; either
  1566. // version 2.1 of the License, or (at your option) any later version.
  1567. //
  1568. // The GNU C Library is distributed in the hope that it will be useful,
  1569. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1570. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1571. // Lesser General Public License for more details.
  1572. //
  1573. // You should have received a copy of the GNU Lesser General Public
  1574. // License along with the GNU C Library; if not, see
  1575. // <https://www.gnu.org/licenses/>.
  1576. // For internal mutex and condition variable definitions.
  1577. // Common threading primitives definitions for both POSIX and C11.
  1578. // Copyright (C) 2017-2021 Free Software Foundation, Inc.
  1579. // This file is part of the GNU C Library.
  1580. //
  1581. // The GNU C Library is free software; you can redistribute it and/or
  1582. // modify it under the terms of the GNU Lesser General Public
  1583. // License as published by the Free Software Foundation; either
  1584. // version 2.1 of the License, or (at your option) any later version.
  1585. //
  1586. // The GNU C Library is distributed in the hope that it will be useful,
  1587. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1588. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1589. // Lesser General Public License for more details.
  1590. //
  1591. // You should have received a copy of the GNU Lesser General Public
  1592. // License along with the GNU C Library; if not, see
  1593. // <https://www.gnu.org/licenses/>.
  1594. // Arch-specific definitions. Each architecture must define the following
  1595. // macros to define the expected sizes of pthread data types:
  1596. //
  1597. // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
  1598. // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
  1599. // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
  1600. // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
  1601. // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
  1602. // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
  1603. // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
  1604. // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
  1605. // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  1606. //
  1607. // The additional macro defines any constraint for the lock alignment
  1608. // inside the thread structures:
  1609. //
  1610. // __LOCK_ALIGNMENT - for internal lock/futex usage.
  1611. //
  1612. // Same idea but for the once locking primitive:
  1613. //
  1614. // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  1615. // Machine-specific pthread type layouts. RISC-V version.
  1616. // Copyright (C) 2011-2021 Free Software Foundation, Inc.
  1617. // This file is part of the GNU C Library.
  1618. //
  1619. // The GNU C Library is free software; you can redistribute it and/or
  1620. // modify it under the terms of the GNU Lesser General Public
  1621. // License as published by the Free Software Foundation; either
  1622. // version 2.1 of the License, or (at your option) any later version.
  1623. //
  1624. // The GNU C Library is distributed in the hope that it will be useful,
  1625. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1626. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1627. // Lesser General Public License for more details.
  1628. //
  1629. // You should have received a copy of the GNU Lesser General Public
  1630. // License along with the GNU C Library. If not, see
  1631. // <https://www.gnu.org/licenses/>.
  1632. // Endian macros for string.h functions
  1633. // Copyright (C) 1992-2021 Free Software Foundation, Inc.
  1634. // This file is part of the GNU C Library.
  1635. //
  1636. // The GNU C Library is free software; you can redistribute it and/or
  1637. // modify it under the terms of the GNU Lesser General Public
  1638. // License as published by the Free Software Foundation; either
  1639. // version 2.1 of the License, or (at your option) any later version.
  1640. //
  1641. // The GNU C Library is distributed in the hope that it will be useful,
  1642. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1643. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1644. // Lesser General Public License for more details.
  1645. //
  1646. // You should have received a copy of the GNU Lesser General Public
  1647. // License along with the GNU C Library; if not, see
  1648. // <http://www.gnu.org/licenses/>.
  1649. // Common definition of pthread_mutex_t.
  1650. type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
  1651. type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
  1652. type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
  1653. // Arch-specific mutex definitions. A generic implementation is provided
  1654. // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
  1655. // can override it by defining:
  1656. //
  1657. // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
  1658. // definition). It should contains at least the internal members
  1659. // defined in the generic version.
  1660. //
  1661. // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
  1662. // atomic operations.
  1663. //
  1664. // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
  1665. // It should initialize the mutex internal flag.
  1666. // Default mutex implementation struct definitions.
  1667. // Copyright (C) 2019-2021 Free Software Foundation, Inc.
  1668. // This file is part of the GNU C Library.
  1669. //
  1670. // The GNU C Library is free software; you can redistribute it and/or
  1671. // modify it under the terms of the GNU Lesser General Public
  1672. // License as published by the Free Software Foundation; either
  1673. // version 2.1 of the License, or (at your option) any later version.
  1674. //
  1675. // The GNU C Library is distributed in the hope that it will be useful,
  1676. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1677. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1678. // Lesser General Public License for more details.
  1679. //
  1680. // You should have received a copy of the GNU Lesser General Public
  1681. // License along with the GNU C Library; if not, see
  1682. // <http://www.gnu.org/licenses/>.
  1683. // Generic struct for both POSIX and C11 mutexes. New ports are expected
  1684. // to use the default layout, however architecture can redefine it to
  1685. // add arch-specific extension (such as lock-elision). The struct have
  1686. // a size of 32 bytes on LP32 and 40 bytes on LP64 architectures.
  1687. type X__pthread_mutex_s = struct {
  1688. F__lock int32
  1689. F__count uint32
  1690. F__owner int32
  1691. F__nusers uint32
  1692. F__kind int32
  1693. F__spins int32
  1694. F__list X__pthread_list_t
  1695. } /* struct_mutex.h:27:1 */
  1696. // Arch-sepecific read-write lock definitions. A generic implementation is
  1697. // provided by struct_rwlock.h. If required, an architecture can override it
  1698. // by defining:
  1699. //
  1700. // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
  1701. // It should contain at least the internal members defined in the
  1702. // generic version.
  1703. //
  1704. // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
  1705. // It should initialize the rwlock internal type.
  1706. // RISC-V internal rwlock struct definitions.
  1707. // Copyright (C) 2019-2021 Free Software Foundation, Inc.
  1708. //
  1709. // This file is part of the GNU C Library.
  1710. //
  1711. // The GNU C Library is free software; you can redistribute it and/or
  1712. // modify it under the terms of the GNU Lesser General Public
  1713. // License as published by the Free Software Foundation; either
  1714. // version 2.1 of the License, or (at your option) any later version.
  1715. //
  1716. // The GNU C Library is distributed in the hope that it will be useful,
  1717. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1718. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1719. // Lesser General Public License for more details.
  1720. //
  1721. // You should have received a copy of the GNU Lesser General Public
  1722. // License along with the GNU C Library; if not, see
  1723. // <https://www.gnu.org/licenses/>.
  1724. // There is a lot of padding in this structure. While it's not strictly
  1725. //
  1726. // necessary on RISC-V, we're going to leave it in to be on the safe side in
  1727. // case it's needed in the future. Most other architectures have the padding,
  1728. // so this gives us the same extensibility as everyone else has.
  1729. type X__pthread_rwlock_arch_t = struct {
  1730. F__readers uint32
  1731. F__writers uint32
  1732. F__wrphase_futex uint32
  1733. F__writers_futex uint32
  1734. F__pad3 uint32
  1735. F__pad4 uint32
  1736. F__cur_writer int32
  1737. F__shared int32
  1738. F__pad1 uint64
  1739. F__pad2 uint64
  1740. F__flags uint32
  1741. F__ccgo_pad1 [4]byte
  1742. } /* struct_rwlock.h:27:1 */
  1743. // Common definition of pthread_cond_t.
  1744. type X__pthread_cond_s = struct {
  1745. F__0 struct{ F__wseq uint64 }
  1746. F__8 struct{ F__g1_start uint64 }
  1747. F__g_refs [2]uint32
  1748. F__g_size [2]uint32
  1749. F__g1_orig_size uint32
  1750. F__wrefs uint32
  1751. F__g_signals [2]uint32
  1752. } /* thread-shared-types.h:92:1 */
  1753. type X__tss_t = uint32 /* thread-shared-types.h:119:22 */
  1754. type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */
  1755. type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */
  1756. // Thread identifiers. The structure of the attribute type is not
  1757. //
  1758. // exposed on purpose.
  1759. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */
  1760. // Data structures for mutex handling. The structure of the attribute
  1761. //
  1762. // type is not exposed on purpose.
  1763. type Pthread_mutexattr_t = struct {
  1764. F__ccgo_pad1 [0]uint32
  1765. F__size [4]uint8
  1766. } /* pthreadtypes.h:36:3 */
  1767. // Data structure for condition variable handling. The structure of
  1768. //
  1769. // the attribute type is not exposed on purpose.
  1770. type Pthread_condattr_t = struct {
  1771. F__ccgo_pad1 [0]uint32
  1772. F__size [4]uint8
  1773. } /* pthreadtypes.h:45:3 */
  1774. // Keys for thread-specific data
  1775. type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
  1776. // Once-only execution
  1777. type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
  1778. type Pthread_attr_t1 = struct {
  1779. F__ccgo_pad1 [0]uint64
  1780. F__size [56]uint8
  1781. } /* pthreadtypes.h:56:1 */
  1782. type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
  1783. type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
  1784. type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */
  1785. // Data structure for reader-writer lock variable handling. The
  1786. //
  1787. // structure of the attribute type is deliberately not exposed.
  1788. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
  1789. type Pthread_rwlockattr_t = struct {
  1790. F__ccgo_pad1 [0]uint64
  1791. F__size [8]uint8
  1792. } /* pthreadtypes.h:97:3 */
  1793. // POSIX spinlock data type.
  1794. type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
  1795. // POSIX barriers data type. The structure of the type is
  1796. //
  1797. // deliberately not exposed.
  1798. type Pthread_barrier_t = struct {
  1799. F__ccgo_pad1 [0]uint64
  1800. F__size [32]uint8
  1801. } /* pthreadtypes.h:112:3 */
  1802. type Pthread_barrierattr_t = struct {
  1803. F__ccgo_pad1 [0]uint32
  1804. F__size [4]uint8
  1805. } /* pthreadtypes.h:118:3 */
  1806. // Define the machine-dependent type `jmp_buf'. RISC-V version.
  1807. // Copyright (C) 2011-2021 Free Software Foundation, Inc.
  1808. // This file is part of the GNU C Library.
  1809. //
  1810. // The GNU C Library is free software; you can redistribute it and/or
  1811. // modify it under the terms of the GNU Lesser General Public
  1812. // License as published by the Free Software Foundation; either
  1813. // version 2.1 of the License, or (at your option) any later version.
  1814. //
  1815. // The GNU C Library is distributed in the hope that it will be useful,
  1816. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1817. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1818. // Lesser General Public License for more details.
  1819. //
  1820. // You should have received a copy of the GNU Lesser General Public
  1821. // License along with the GNU C Library. If not, see
  1822. // <https://www.gnu.org/licenses/>.
  1823. type X__jmp_buf_internal_tag = struct {
  1824. F__pc int64
  1825. F__regs [12]int64
  1826. F__sp int64
  1827. F__fpregs [12]float64
  1828. } /* setjmp.h:22:9 */
  1829. // Define the machine-dependent type `jmp_buf'. RISC-V version.
  1830. // Copyright (C) 2011-2021 Free Software Foundation, Inc.
  1831. // This file is part of the GNU C Library.
  1832. //
  1833. // The GNU C Library is free software; you can redistribute it and/or
  1834. // modify it under the terms of the GNU Lesser General Public
  1835. // License as published by the Free Software Foundation; either
  1836. // version 2.1 of the License, or (at your option) any later version.
  1837. //
  1838. // The GNU C Library is distributed in the hope that it will be useful,
  1839. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1840. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1841. // Lesser General Public License for more details.
  1842. //
  1843. // You should have received a copy of the GNU Lesser General Public
  1844. // License along with the GNU C Library. If not, see
  1845. // <https://www.gnu.org/licenses/>.
  1846. type X__jmp_buf = [1]X__jmp_buf_internal_tag /* setjmp.h:37:5 */
  1847. // Determine the wordsize from the preprocessor defines. RISC-V version.
  1848. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  1849. // This file is part of the GNU C Library.
  1850. //
  1851. // The GNU C Library is free software; you can redistribute it and/or
  1852. // modify it under the terms of the GNU Lesser General Public
  1853. // License as published by the Free Software Foundation; either
  1854. // version 2.1 of the License, or (at your option) any later version.
  1855. //
  1856. // The GNU C Library is distributed in the hope that it will be useful,
  1857. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1858. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1859. // Lesser General Public License for more details.
  1860. //
  1861. // You should have received a copy of the GNU Lesser General Public
  1862. // License along with the GNU C Library. If not, see
  1863. // <https://www.gnu.org/licenses/>.
  1864. // NB: Include guard matches what <linux/time.h> uses.
  1865. type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
  1866. // Define struct __jmp_buf_tag.
  1867. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  1868. // This file is part of the GNU C Library.
  1869. //
  1870. // The GNU C Library is free software; you can redistribute it and/or
  1871. // modify it under the terms of the GNU Lesser General Public
  1872. // License as published by the Free Software Foundation; either
  1873. // version 2.1 of the License, or (at your option) any later version.
  1874. //
  1875. // The GNU C Library is distributed in the hope that it will be useful,
  1876. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1877. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1878. // Lesser General Public License for more details.
  1879. //
  1880. // You should have received a copy of the GNU Lesser General Public
  1881. // License along with the GNU C Library; if not, see
  1882. // <https://www.gnu.org/licenses/>.
  1883. // Define the machine-dependent type `jmp_buf'. RISC-V version.
  1884. // Copyright (C) 2011-2021 Free Software Foundation, Inc.
  1885. // This file is part of the GNU C Library.
  1886. //
  1887. // The GNU C Library is free software; you can redistribute it and/or
  1888. // modify it under the terms of the GNU Lesser General Public
  1889. // License as published by the Free Software Foundation; either
  1890. // version 2.1 of the License, or (at your option) any later version.
  1891. //
  1892. // The GNU C Library is distributed in the hope that it will be useful,
  1893. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1894. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1895. // Lesser General Public License for more details.
  1896. //
  1897. // You should have received a copy of the GNU Lesser General Public
  1898. // License along with the GNU C Library. If not, see
  1899. // <https://www.gnu.org/licenses/>.
  1900. // Calling environment, plus possibly a saved signal mask.
  1901. type X__jmp_buf_tag = struct {
  1902. F__jmpbuf X__jmp_buf
  1903. F__mask_was_saved int32
  1904. F__ccgo_pad1 [4]byte
  1905. F__saved_mask X__sigset_t
  1906. } /* struct___jmp_buf_tag.h:26:1 */
  1907. // Conditional variable handling.
  1908. // Cleanup buffers
  1909. type X_pthread_cleanup_buffer = struct {
  1910. F__routine uintptr
  1911. F__arg uintptr
  1912. F__canceltype int32
  1913. F__ccgo_pad1 [4]byte
  1914. F__prev uintptr
  1915. } /* pthread.h:159:1 */
  1916. // Cancellation handling with integration into exception handling.
  1917. type X__cancel_jmp_buf_tag = struct {
  1918. F__cancel_jmp_buf X__jmp_buf
  1919. F__mask_was_saved int32
  1920. F__ccgo_pad1 [4]byte
  1921. } /* pthread.h:538:1 */
  1922. type X__pthread_unwind_buf_t = struct {
  1923. F__cancel_jmp_buf [1]X__cancel_jmp_buf_tag
  1924. F__pad [4]uintptr
  1925. } /* pthread.h:548:3 */
  1926. // No special attributes by default.
  1927. // Structure to hold the cleanup handler information.
  1928. type X__pthread_cleanup_frame = struct {
  1929. F__cancel_routine uintptr
  1930. F__cancel_arg uintptr
  1931. F__do_it int32
  1932. F__cancel_type int32
  1933. } /* pthread.h:557:1 */
  1934. var _ uint8 /* gen.c:2:13: */