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