pthread_linux_386.go 78 KB

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