pthread_linux_amd64.go 80 KB

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