pthread_linux_loong64.go 92 KB

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