pthread_linux_ppc64le.go 81 KB

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