pthread_windows_arm64.go 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050
  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_windows_arm64.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. CHAR_BIT = 8
  15. CHAR_MAX = 127
  16. CHAR_MIN = -128
  17. CLK_TCK = 1000
  18. CLOCKS_PER_SEC = 1000
  19. CLOCK_MONOTONIC = 1
  20. CLOCK_PROCESS_CPUTIME_ID = 2
  21. CLOCK_REALTIME = 0
  22. CLOCK_REALTIME_COARSE = 4
  23. CLOCK_THREAD_CPUTIME_ID = 3
  24. DUMMYSTRUCTNAME = 0
  25. DUMMYSTRUCTNAME1 = 0
  26. DUMMYSTRUCTNAME2 = 0
  27. DUMMYSTRUCTNAME3 = 0
  28. DUMMYSTRUCTNAME4 = 0
  29. DUMMYSTRUCTNAME5 = 0
  30. DUMMYUNIONNAME = 0
  31. DUMMYUNIONNAME1 = 0
  32. DUMMYUNIONNAME2 = 0
  33. DUMMYUNIONNAME3 = 0
  34. DUMMYUNIONNAME4 = 0
  35. DUMMYUNIONNAME5 = 0
  36. DUMMYUNIONNAME6 = 0
  37. DUMMYUNIONNAME7 = 0
  38. DUMMYUNIONNAME8 = 0
  39. DUMMYUNIONNAME9 = 0
  40. E2BIG = 7
  41. EACCES = 13
  42. EADDRINUSE = 100
  43. EADDRNOTAVAIL = 101
  44. EAFNOSUPPORT = 102
  45. EAGAIN = 11
  46. EALREADY = 103
  47. EBADF = 9
  48. EBADMSG = 104
  49. EBUSY = 16
  50. ECANCELED = 105
  51. ECHILD = 10
  52. ECONNABORTED = 106
  53. ECONNREFUSED = 107
  54. ECONNRESET = 108
  55. EDEADLK = 36
  56. EDEADLOCK = 36
  57. EDESTADDRREQ = 109
  58. EDOM = 33
  59. EEXIST = 17
  60. EFAULT = 14
  61. EFBIG = 27
  62. EHOSTUNREACH = 110
  63. EIDRM = 111
  64. EILSEQ = 42
  65. EINPROGRESS = 112
  66. EINTR = 4
  67. EINVAL = 22
  68. EIO = 5
  69. EISCONN = 113
  70. EISDIR = 21
  71. ELOOP = 114
  72. EMFILE = 24
  73. EMLINK = 31
  74. EMSGSIZE = 115
  75. ENAMETOOLONG = 38
  76. ENETDOWN = 116
  77. ENETRESET = 117
  78. ENETUNREACH = 118
  79. ENFILE = 23
  80. ENOBUFS = 119
  81. ENODATA = 120
  82. ENODEV = 19
  83. ENOENT = 2
  84. ENOEXEC = 8
  85. ENOFILE = 2
  86. ENOLCK = 39
  87. ENOLINK = 121
  88. ENOMEM = 12
  89. ENOMSG = 122
  90. ENOPROTOOPT = 123
  91. ENOSPC = 28
  92. ENOSR = 124
  93. ENOSTR = 125
  94. ENOSYS = 40
  95. ENOTCONN = 126
  96. ENOTDIR = 20
  97. ENOTEMPTY = 41
  98. ENOTRECOVERABLE = 127
  99. ENOTSOCK = 128
  100. ENOTSUP = 129
  101. ENOTTY = 25
  102. ENXIO = 6
  103. EOPNOTSUPP = 130
  104. EOVERFLOW = 132
  105. EOWNERDEAD = 133
  106. EPERM = 1
  107. EPIPE = 32
  108. EPROTO = 134
  109. EPROTONOSUPPORT = 135
  110. EPROTOTYPE = 136
  111. ERANGE = 34
  112. EROFS = 30
  113. ESPIPE = 29
  114. ESRCH = 3
  115. ETIME = 137
  116. ETIMEDOUT = 138
  117. ETXTBSY = 139
  118. EWOULDBLOCK = 140
  119. EXDEV = 18
  120. GENERIC_ERRORCHECK_INITIALIZER = -2
  121. GENERIC_INITIALIZER = -1
  122. GENERIC_NORMAL_INITIALIZER = -1
  123. GENERIC_RECURSIVE_INITIALIZER = -3
  124. INT_MAX = 2147483647
  125. INT_MIN = -2147483648
  126. LLONG_MAX = 9223372036854775807
  127. LLONG_MIN = -9223372036854775808
  128. LONG_LONG_MAX = 9223372036854775807
  129. LONG_LONG_MIN = -9223372036854775808
  130. LONG_MAX = 2147483647
  131. LONG_MIN = -2147483648
  132. MAX_READ_LOCKS = 2147483646
  133. MB_LEN_MAX = 1
  134. MINGW_DDK_H = 0
  135. MINGW_HAS_DDK_H = 1
  136. MINGW_HAS_SECURE_API = 1
  137. MINGW_SDK_INIT = 0
  138. NSIG = 23
  139. OLD_P_OVERLAY = 2
  140. PTHREAD_BARRIER_SERIAL_THREAD = 1
  141. PTHREAD_CANCEL_ASYNCHRONOUS = 0x02
  142. PTHREAD_CANCEL_DEFERRED = 0
  143. PTHREAD_CANCEL_DISABLE = 0
  144. PTHREAD_CANCEL_ENABLE = 0x01
  145. PTHREAD_CREATE_DETACHED = 0x04
  146. PTHREAD_CREATE_JOINABLE = 0
  147. PTHREAD_DEFAULT_ATTR = 1
  148. PTHREAD_DESTRUCTOR_ITERATIONS = 256
  149. PTHREAD_EXPLICIT_SCHED = 0
  150. PTHREAD_INHERIT_SCHED = 0x08
  151. PTHREAD_KEYS_MAX = 1048576
  152. PTHREAD_MUTEX_ADAPTIVE_NP = 0
  153. PTHREAD_MUTEX_DEFAULT = 0
  154. PTHREAD_MUTEX_ERRORCHECK = 1
  155. PTHREAD_MUTEX_ERRORCHECK_NP = 1
  156. PTHREAD_MUTEX_FAST_NP = 0
  157. PTHREAD_MUTEX_NORMAL = 0
  158. PTHREAD_MUTEX_PRIVATE = 0
  159. PTHREAD_MUTEX_RECURSIVE = 2
  160. PTHREAD_MUTEX_RECURSIVE_NP = 2
  161. PTHREAD_MUTEX_SHARED = 1
  162. PTHREAD_MUTEX_TIMED_NP = 0
  163. PTHREAD_ONCE_INIT = 0
  164. PTHREAD_PRIO_INHERIT = 8
  165. PTHREAD_PRIO_MULT = 32
  166. PTHREAD_PRIO_NONE = 0
  167. PTHREAD_PRIO_PROTECT = 16
  168. PTHREAD_PROCESS_PRIVATE = 0
  169. PTHREAD_PROCESS_SHARED = 1
  170. PTHREAD_SCOPE_PROCESS = 0
  171. PTHREAD_SCOPE_SYSTEM = 0x10
  172. PTHREAD_THREADS_MAX = 2019
  173. P_DETACH = 4
  174. P_NOWAIT = 1
  175. P_NOWAITO = 3
  176. P_OVERLAY = 2
  177. P_WAIT = 0
  178. RWLS_PER_THREAD = 8
  179. SCHAR_MAX = 127
  180. SCHAR_MIN = -128
  181. SCHED_FIFO = 1
  182. SCHED_MAX = 2
  183. SCHED_MIN = 0
  184. SCHED_OTHER = 0
  185. SCHED_RR = 2
  186. SEM_NSEMS_MAX = 1024
  187. SHRT_MAX = 32767
  188. SHRT_MIN = -32768
  189. SIGABRT = 22
  190. SIGABRT2 = 22
  191. SIGABRT_COMPAT = 6
  192. SIGBREAK = 21
  193. SIGFPE = 8
  194. SIGILL = 4
  195. SIGINT = 2
  196. SIGSEGV = 11
  197. SIGTERM = 15
  198. SIG_BLOCK = 0
  199. SIG_SETMASK = 2
  200. SIG_UNBLOCK = 1
  201. STRUNCATE = 80
  202. TIMER_ABSTIME = 1
  203. TIME_UTC = 1
  204. UCHAR_MAX = 255
  205. UINT_MAX = 4294967295
  206. ULLONG_MAX = 18446744073709551615
  207. ULONG_LONG_MAX = 18446744073709551615
  208. ULONG_MAX = 4294967295
  209. UNALIGNED = 0
  210. USE___UUIDOF = 0
  211. USHRT_MAX = 65535
  212. WAIT_CHILD = 0
  213. WAIT_GRANDCHILD = 1
  214. WIN32 = 1
  215. WIN64 = 1
  216. WINNT = 1
  217. WINPTHREAD_API = 0
  218. WIN_PTHREADS_H = 0
  219. WIN_PTHREADS_PTHREAD_COMPAT_H = 0
  220. WIN_PTHREADS_SIGNAL_H = 0
  221. WIN_PTHREADS_TIME_H = 0
  222. WIN_PTHREADS_UNISTD_H = 0
  223. X_AGLOBAL = 0
  224. X_ANONYMOUS_STRUCT = 0
  225. X_ANONYMOUS_UNION = 0
  226. X_ARGMAX = 100
  227. X_ARM64_ = 1
  228. X_CLOCK_T_DEFINED = 0
  229. X_CONST_RETURN = 0
  230. X_CRTNOALIAS = 0
  231. X_CRTRESTRICT = 0
  232. X_CRT_ALTERNATIVE_IMPORTED = 0
  233. X_CRT_ERRNO_DEFINED = 0
  234. X_CRT_GETPID_DEFINED = 0
  235. X_CRT_MANAGED_HEAP_DEPRECATE = 0
  236. X_CRT_PACKING = 8
  237. X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0
  238. X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0
  239. X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0
  240. X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0
  241. X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0
  242. X_CRT_SYSTEM_DEFINED = 0
  243. X_CRT_TERMINATE_DEFINED = 0
  244. X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0
  245. X_CRT_WSYSTEM_DEFINED = 0
  246. X_DEV_T_DEFINED = 0
  247. X_DLL = 0
  248. X_ERRCODE_DEFINED = 0
  249. X_FILE_OFFSET_BITS = 64
  250. X_FILE_OFFSET_BITS_SET_OFFT = 0
  251. X_GCC_LIMITS_H_ = 0
  252. X_GTHREAD_USE_MUTEX_INIT_FUNC = 1
  253. X_INC_CORECRT = 0
  254. X_INC_CORECRT_STARTUP = 0
  255. X_INC_CRTDEFS = 0
  256. X_INC_CRTDEFS_MACRO = 0
  257. X_INC_ERRNO = 0
  258. X_INC_MINGW_SECAPI = 0
  259. X_INC_PROCESS = 0
  260. X_INC_SIGNAL = 0
  261. X_INC_TYPES = 0
  262. X_INC_VADEFS = 0
  263. X_INC_WTIME_INL = 0
  264. X_INC_WTIME_S_INL = 0
  265. X_INC__MINGW_H = 0
  266. X_INO_T_DEFINED = 0
  267. X_INT128_DEFINED = 0
  268. X_INTPTR_T_DEFINED = 0
  269. X_MODE_T_ = 0
  270. X_MT = 0
  271. X_M_ARM64 = 1
  272. X_OFF64_T_DEFINED = 0
  273. X_OFF_T_ = 0
  274. X_OFF_T_DEFINED = 0
  275. X_OLD_P_OVERLAY = 2
  276. X_PGLOBAL = 0
  277. X_PID_T_ = 0
  278. X_POSIX_BARRIERS = 200112
  279. X_POSIX_CLOCK_SELECTION = 200112
  280. X_POSIX_CPUTIME = 200809
  281. X_POSIX_MONOTONIC_CLOCK = 200809
  282. X_POSIX_READER_WRITER_LOCKS = 200112
  283. X_POSIX_SEMAPHORES = 200112
  284. X_POSIX_SEM_NSEMS_MAX = 256
  285. X_POSIX_SPIN_LOCKS = 200112
  286. X_POSIX_THREADS = 200112
  287. X_POSIX_THREAD_CPUTIME = 200809
  288. X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 256
  289. X_POSIX_THREAD_KEYS_MAX = 1048576
  290. X_POSIX_TIMEOUTS = 200112
  291. X_POSIX_TIMERS = 200809
  292. X_PTRDIFF_T = 0
  293. X_PTRDIFF_T_ = 0
  294. X_PTRDIFF_T_DEFINED = 0
  295. X_P_DETACH = 4
  296. X_P_NOWAIT = 1
  297. X_P_NOWAITO = 3
  298. X_P_OVERLAY = 2
  299. X_P_WAIT = 0
  300. X_RSIZE_T_DEFINED = 0
  301. X_SECURECRT_ERRCODE_VALUES_DEFINED = 0
  302. X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD
  303. X_SIGSET_T_ = 0
  304. X_SIG_ATOMIC_T_DEFINED = 0
  305. X_SIZE_T = 0
  306. X_SIZE_T_DEFINED = 0
  307. X_SPAWNV_DEFINED = 0
  308. X_SSIZE_T_DEFINED = 0
  309. X_TAGLC_ID_DEFINED = 0
  310. X_THREADLOCALEINFO = 0
  311. X_TIME32_T_DEFINED = 0
  312. X_TIME64_T_DEFINED = 0
  313. X_TIMEB_DEFINED = 0
  314. X_TIMEB_H_ = 0
  315. X_TIMEB_H_S = 0
  316. X_TIMESPEC_DEFINED = 0
  317. X_TIMEVAL_DEFINED = 0
  318. X_TIMEZONE_DEFINED = 0
  319. X_TIME_H_ = 0
  320. X_TIME_T_DEFINED = 0
  321. X_TM_DEFINED = 0
  322. X_UCRT = 0
  323. X_UINTPTR_T_DEFINED = 0
  324. X_VA_LIST_DEFINED = 0
  325. X_W64 = 0
  326. X_WAIT_CHILD = 0
  327. X_WAIT_GRANDCHILD = 1
  328. X_WCHAR_T = 0
  329. X_WCHAR_T_DEFINED = 0
  330. X_WCTYPE_T_DEFINED = 0
  331. X_WEXEC_DEFINED = 0
  332. X_WIN32 = 1
  333. X_WIN32_WINNT = 0x601
  334. X_WIN64 = 1
  335. X_WINT_T = 0
  336. X_WSPAWN_DEFINED = 0
  337. X_WTIME_DEFINED = 0
  338. )
  339. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  340. type Size_t = uint64 /* <builtin>:9:23 */
  341. type Wchar_t = uint16 /* <builtin>:15:24 */
  342. type X__int128_t = struct {
  343. Flo int64
  344. Fhi int64
  345. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  346. type X__uint128_t = struct {
  347. Flo uint64
  348. Fhi uint64
  349. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  350. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  351. type X__float128 = float64 /* <builtin>:47:21 */
  352. type Va_list = X__builtin_va_list /* <builtin>:50:27 */
  353. // ===---- __stddef_max_align_t.h - Definition of max_align_t for modules ---===
  354. //
  355. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  356. // See https://llvm.org/LICENSE.txt for license information.
  357. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  358. //
  359. //===-----------------------------------------------------------------------===
  360. // Define 'max_align_t' to match the GCC definition.
  361. type Max_align_t = struct {
  362. F__clang_max_align_nonce1 int64
  363. F__clang_max_align_nonce2 float64
  364. } /* __stddef_max_align_t.h:24:3 */
  365. // Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
  366. // __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t
  367. // *
  368. // This file has no copyright assigned and is placed in the Public Domain.
  369. // This file is part of the mingw-w64 runtime package.
  370. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  371. // *
  372. // This file has no copyright assigned and is placed in the Public Domain.
  373. // This file is part of the mingw-w64 runtime package.
  374. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  375. // *
  376. // This file has no copyright assigned and is placed in the Public Domain.
  377. // This file is part of the mingw-w64 runtime package.
  378. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  379. // *
  380. // This file has no copyright assigned and is placed in the Public Domain.
  381. // This file is part of the mingw-w64 runtime package.
  382. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  383. // *
  384. // This file has no copyright assigned and is placed in the Public Domain.
  385. // This file is part of the mingw-w64 runtime package.
  386. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  387. // This macro holds an monotonic increasing value, which indicates
  388. // a specific fix/patch is present on trunk. This value isn't related to
  389. // minor/major version-macros. It is increased on demand, if a big
  390. // fix was applied to trunk. This macro gets just increased on trunk. For
  391. // other branches its value won't be modified.
  392. // mingw.org's version macros: these make gcc to define
  393. // MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global
  394. // and the __mingwthr_key_dtor() function from the MinGW
  395. // CRT in its private gthr-win32.h header.
  396. // Set VC specific compiler target macros.
  397. // MS does not prefix symbols by underscores for 64-bit.
  398. // As we have to support older gcc version, which are using underscores
  399. // as symbol prefix for x64, we have to check here for the user label
  400. // prefix defined by gcc.
  401. // Special case nameless struct/union.
  402. // MinGW-w64 has some additional C99 printf/scanf feature support.
  403. // So we add some helper macros to ease recognition of them.
  404. // If _FORTIFY_SOURCE is enabled, some inline functions may use
  405. // __builtin_va_arg_pack(). GCC may report an error if the address
  406. // of such a function is used. Set _FORTIFY_VA_ARG=0 in this case.
  407. // Enable workaround for ABI incompatibility on affected platforms
  408. // *
  409. // This file has no copyright assigned and is placed in the Public Domain.
  410. // This file is part of the mingw-w64 runtime package.
  411. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  412. // http://msdn.microsoft.com/en-us/library/ms175759%28v=VS.100%29.aspx
  413. // Templates won't work in C, will break if secure API is not enabled, disabled
  414. // https://blogs.msdn.com/b/sdl/archive/2010/02/16/vc-2010-and-memcpy.aspx?Redirected=true
  415. // fallback on default implementation if we can't know the size of the destination
  416. // Include _cygwin.h if we're building a Cygwin application.
  417. // Target specific macro replacement for type "long". In the Windows API,
  418. // the type long is always 32 bit, even if the target is 64 bit (LLP64).
  419. // On 64 bit Cygwin, the type long is 64 bit (LP64). So, to get the right
  420. // sized definitions and declarations, all usage of type long in the Windows
  421. // headers have to be replaced by the below defined macro __LONG32.
  422. // C/C++ specific language defines.
  423. // Note the extern. This is needed to work around GCC's
  424. // limitations in handling dllimport attribute.
  425. // Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
  426. // variadiac macro facility, because variadic macros cause syntax
  427. // errors with --traditional-cpp.
  428. // High byte is the major version, low byte is the minor.
  429. // Allow both 0x1400 and 0xE00 to identify UCRT
  430. // ===-------- vadefs.h ---------------------------------------------------===
  431. //
  432. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  433. // See https://llvm.org/LICENSE.txt for license information.
  434. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  435. //
  436. //===-----------------------------------------------------------------------===
  437. // Only include this if we are aiming for MSVC compatibility.
  438. // *
  439. // This file has no copyright assigned and is placed in the Public Domain.
  440. // This file is part of the mingw-w64 runtime package.
  441. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  442. // *
  443. // This file has no copyright assigned and is placed in the Public Domain.
  444. // This file is part of the mingw-w64 runtime package.
  445. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  446. // for backward compatibility
  447. type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */
  448. type Ssize_t = int64 /* corecrt.h:45:35 */
  449. type Rsize_t = Size_t /* corecrt.h:52:16 */
  450. type Intptr_t = int64 /* corecrt.h:62:35 */
  451. type Uintptr_t = uint64 /* corecrt.h:75:44 */
  452. type Wint_t = uint16 /* corecrt.h:106:24 */
  453. type Wctype_t = uint16 /* corecrt.h:107:24 */
  454. type Errno_t = int32 /* corecrt.h:113:13 */
  455. type X__time32_t = int32 /* corecrt.h:118:14 */
  456. type X__time64_t = int64 /* corecrt.h:123:35 */
  457. type Time_t = X__time64_t /* corecrt.h:138:20 */
  458. type Threadlocaleinfostruct = struct {
  459. F_locale_pctype uintptr
  460. F_locale_mb_cur_max int32
  461. F_locale_lc_codepage uint32
  462. } /* corecrt.h:430:1 */
  463. type Pthreadlocinfo = uintptr /* corecrt.h:432:39 */
  464. type Pthreadmbcinfo = uintptr /* corecrt.h:433:36 */
  465. type Localeinfo_struct = struct {
  466. Flocinfo Pthreadlocinfo
  467. Fmbcinfo Pthreadmbcinfo
  468. } /* corecrt.h:436:9 */
  469. type X_locale_tstruct = Localeinfo_struct /* corecrt.h:439:3 */
  470. type X_locale_t = uintptr /* corecrt.h:439:19 */
  471. type TagLC_ID = struct {
  472. FwLanguage uint16
  473. FwCountry uint16
  474. FwCodePage uint16
  475. } /* corecrt.h:443:9 */
  476. type LC_ID = TagLC_ID /* corecrt.h:447:3 */
  477. type LPLC_ID = uintptr /* corecrt.h:447:9 */
  478. type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:482:3 */
  479. // Posix thread extensions.
  480. // Extension defined as by report VC 10+ defines error-numbers.
  481. // Defined as WSAETIMEDOUT.
  482. // *
  483. // This file has no copyright assigned and is placed in the Public Domain.
  484. // This file is part of the mingw-w64 runtime package.
  485. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  486. // *
  487. // This file has no copyright assigned and is placed in the Public Domain.
  488. // This file is part of the mingw-w64 runtime package.
  489. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  490. type X_ino_t = uint16 /* types.h:43:24 */
  491. type Ino_t = uint16 /* types.h:45:24 */
  492. type X_dev_t = uint32 /* types.h:51:22 */
  493. type Dev_t = uint32 /* types.h:53:22 */
  494. type X_pid_t = int64 /* types.h:63:17 */
  495. type Pid_t = X_pid_t /* types.h:68:16 */
  496. type X_mode_t = uint16 /* types.h:74:24 */
  497. type Mode_t = X_mode_t /* types.h:77:17 */
  498. type X_off_t = int32 /* _mingw_off_t.h:5:16 */
  499. type Off32_t = int32 /* _mingw_off_t.h:7:16 */
  500. type X_off64_t = int64 /* _mingw_off_t.h:13:39 */
  501. type Off64_t = int64 /* _mingw_off_t.h:15:39 */
  502. type Off_t = Off64_t /* _mingw_off_t.h:24:17 */
  503. type Useconds_t = uint32 /* types.h:84:22 */
  504. type Timespec = struct {
  505. Ftv_sec Time_t
  506. Ftv_nsec int32
  507. F__ccgo_pad1 [4]byte
  508. } /* types.h:89:1 */
  509. type Itimerspec = struct {
  510. Fit_interval struct {
  511. Ftv_sec Time_t
  512. Ftv_nsec int32
  513. F__ccgo_pad1 [4]byte
  514. }
  515. Fit_value struct {
  516. Ftv_sec Time_t
  517. Ftv_nsec int32
  518. F__ccgo_pad1 [4]byte
  519. }
  520. } /* types.h:94:1 */
  521. type X_sigset_t = uint64 /* types.h:104:28 */
  522. type X_PVFV = uintptr /* corecrt_startup.h:20:14 */
  523. type X_PIFV = uintptr /* corecrt_startup.h:21:13 */
  524. type X_PVFI = uintptr /* corecrt_startup.h:22:14 */
  525. type X_onexit_table_t1 = struct {
  526. F_first uintptr
  527. F_last uintptr
  528. F_end uintptr
  529. } /* corecrt_startup.h:24:9 */
  530. type X_onexit_table_t = X_onexit_table_t1 /* corecrt_startup.h:28:3 */
  531. type X_onexit_t = uintptr /* corecrt_startup.h:30:13 */
  532. // Includes a definition of _pid_t and pid_t
  533. // *
  534. // This file has no copyright assigned and is placed in the Public Domain.
  535. // This file is part of the mingw-w64 runtime package.
  536. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  537. type X_beginthread_proc_type = uintptr /* process.h:32:16 */
  538. type X_beginthreadex_proc_type = uintptr /* process.h:33:20 */
  539. type X_tls_callback_type = uintptr /* process.h:64:16 */
  540. //===---- limits.h - Standard header for integer sizes --------------------===* *
  541. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  542. // See https://llvm.org/LICENSE.txt for license information.
  543. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  544. //
  545. // \*===----------------------------------------------------------------------===
  546. // The system's limits.h may, in turn, try to #include_next GCC's limits.h.
  547. // Avert this #include_next madness.
  548. // System headers include a number of constants from POSIX in <limits.h>.
  549. // Include it if we're hosted.
  550. // Many system headers try to "help us out" by defining these. No really, we
  551. // know how big each datatype is.
  552. // C90/99 5.2.4.2.1
  553. // C2x 5.2.4.2.1
  554. // FIXME: This is using the placeholder dates Clang produces for these macros
  555. // in C2x mode; switch to the correct values once they've been published.
  556. // C99 5.2.4.2.1: Added long long.
  557. // C++11 18.3.3.2: same contents as the Standard C Library header <limits.h>.
  558. //
  559. // LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX are a GNU extension. It's too bad
  560. // that we don't have something like #pragma poison that could be used to
  561. // deprecate a macro - the code should just use LLONG_MAX and friends.
  562. //
  563. // *
  564. // This file has no copyright assigned and is placed in the Public Domain.
  565. // This file is part of the mingw-w64 runtime package.
  566. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  567. // *
  568. // This file has no copyright assigned and is placed in the Public Domain.
  569. // This file is part of the mingw-w64 runtime package.
  570. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  571. //
  572. // Copyright (c) 2013-2016 mingw-w64 project
  573. //
  574. // Permission is hereby granted, free of charge, to any person obtaining a
  575. // copy of this software and associated documentation files (the "Software"),
  576. // to deal in the Software without restriction, including without limitation
  577. // the rights to use, copy, modify, merge, publish, distribute, sublicense,
  578. // and/or sell copies of the Software, and to permit persons to whom the
  579. // Software is furnished to do so, subject to the following conditions:
  580. //
  581. // The above copyright notice and this permission notice shall be included in
  582. // all copies or substantial portions of the Software.
  583. //
  584. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  585. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  586. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  587. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  588. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  589. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  590. // DEALINGS IN THE SOFTWARE.
  591. // Windows has rudimentary signals support.
  592. type Sig_atomic_t = int32 /* signal.h:18:15 */
  593. type X__p_sig_fn_t = uintptr /* signal.h:48:16 */
  594. // *
  595. // This file has no copyright assigned and is placed in the Public Domain.
  596. // This file is part of the mingw-w64 runtime package.
  597. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  598. // *
  599. // This file has no copyright assigned and is placed in the Public Domain.
  600. // This file is part of the mingw-w64 runtime package.
  601. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  602. // Adding timespec definition.
  603. // *
  604. // This file has no copyright assigned and is placed in the Public Domain.
  605. // This file is part of the mingw-w64 runtime package.
  606. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  607. // *
  608. // This file has no copyright assigned and is placed in the Public Domain.
  609. // This file is part of the mingw-w64 runtime package.
  610. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  611. type X__timeb32 = struct {
  612. Ftime X__time32_t
  613. Fmillitm uint16
  614. Ftimezone int16
  615. Fdstflag int16
  616. F__ccgo_pad1 [2]byte
  617. } /* timeb.h:53:3 */
  618. type Timeb = struct {
  619. Ftime Time_t
  620. Fmillitm uint16
  621. Ftimezone int16
  622. Fdstflag int16
  623. F__ccgo_pad1 [2]byte
  624. } /* timeb.h:61:3 */
  625. type X__timeb64 = struct {
  626. Ftime X__time64_t
  627. Fmillitm uint16
  628. Ftimezone int16
  629. Fdstflag int16
  630. F__ccgo_pad1 [2]byte
  631. } /* timeb.h:69:3 */
  632. type X_timespec32 = struct {
  633. Ftv_sec X__time32_t
  634. Ftv_nsec int32
  635. } /* timeb.h:89:1 */
  636. type X_timespec64 = struct {
  637. Ftv_sec X__time64_t
  638. Ftv_nsec int32
  639. F__ccgo_pad1 [4]byte
  640. } /* timeb.h:94:1 */
  641. type Clock_t = int32 /* time.h:63:16 */
  642. type Tm = struct {
  643. Ftm_sec int32
  644. Ftm_min int32
  645. Ftm_hour int32
  646. Ftm_mday int32
  647. Ftm_mon int32
  648. Ftm_year int32
  649. Ftm_wday int32
  650. Ftm_yday int32
  651. Ftm_isdst int32
  652. } /* time.h:100:3 */
  653. var Xdaylight int32 /* time.h:275:22: */
  654. var Xtimezone int32 /* time.h:276:23: */
  655. var Xtzname [2]uintptr /* time.h:277:23: */
  656. // *
  657. // This file has no copyright assigned and is placed in the Public Domain.
  658. // This file is part of the mingw-w64 runtime package.
  659. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  660. type Timeval = struct {
  661. Ftv_sec int32
  662. Ftv_usec int32
  663. } /* _timeval.h:10:1 */
  664. type Timezone = struct {
  665. Ftz_minuteswest int32
  666. Ftz_dsttime int32
  667. } /* time.h:285:1 */
  668. // POSIX 2008 says clock_gettime and timespec are defined in time.h header,
  669. // but other systems - like Linux, Solaris, etc - tend to declare such
  670. // recent extensions only if the following guards are met.
  671. //
  672. // Copyright (c) 2011-2016 mingw-w64 project
  673. //
  674. // Permission is hereby granted, free of charge, to any person obtaining a
  675. // copy of this software and associated documentation files (the "Software"),
  676. // to deal in the Software without restriction, including without limitation
  677. // the rights to use, copy, modify, merge, publish, distribute, sublicense,
  678. // and/or sell copies of the Software, and to permit persons to whom the
  679. // Software is furnished to do so, subject to the following conditions:
  680. //
  681. // The above copyright notice and this permission notice shall be included in
  682. // all copies or substantial portions of the Software.
  683. //
  684. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  685. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  686. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  687. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  688. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  689. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  690. // DEALINGS IN THE SOFTWARE.
  691. // *
  692. // This file has no copyright assigned and is placed in the Public Domain.
  693. // This file is part of the mingw-w64 runtime package.
  694. // No warranty is given; refer to the file DISCLAIMER.PD within this package.
  695. // Posix timers are supported
  696. // Monotonic clocks are available.
  697. // CPU-time clocks are available.
  698. // Clock support in threads are available.
  699. type Clockid_t = int32 /* pthread_time.h:49:13 */
  700. // maximum number of times a read lock may be obtained
  701. // No fork() in windows - so ignore this
  702. // unsupported stuff:
  703. type Pthread_once_t = int32 /* pthread.h:181:14 */
  704. type Pthread_mutexattr_t = uint32 /* pthread.h:182:18 */
  705. type Pthread_key_t = uint32 /* pthread.h:183:18 */
  706. type Pthread_barrierattr_t = uintptr /* pthread.h:184:14 */
  707. type Pthread_condattr_t = int32 /* pthread.h:185:13 */
  708. type Pthread_rwlockattr_t = int32 /* pthread.h:186:13 */
  709. //
  710. // struct _pthread_v;
  711. //
  712. // typedef struct pthread_t {
  713. // struct _pthread_v *p;
  714. // int x;
  715. // } pthread_t;
  716. type Pthread_t = Uintptr_t /* pthread.h:197:19 */
  717. type X_pthread_cleanup1 = struct {
  718. Ffunc uintptr
  719. Farg uintptr
  720. Fnext uintptr
  721. } /* pthread.h:199:9 */
  722. type X_pthread_cleanup = X_pthread_cleanup1 /* pthread.h:199:33 */
  723. // Note that if async cancelling is used, then there is a race here
  724. // Some POSIX realtime extensions, mostly stubbed
  725. type Sched_param = struct{ Fsched_priority int32 } /* pthread.h:226:1 */
  726. type Pthread_attr_t1 = struct {
  727. Fp_state uint32
  728. F__ccgo_pad1 [4]byte
  729. Fstack uintptr
  730. Fs_size Size_t
  731. Fparam struct{ Fsched_priority int32 }
  732. F__ccgo_pad2 [4]byte
  733. } /* pthread.h:238:9 */
  734. type Pthread_attr_t = Pthread_attr_t1 /* pthread.h:238:31 */
  735. // synchronization objects
  736. type Pthread_spinlock_t = Intptr_t /* pthread.h:255:18 */
  737. type Pthread_mutex_t = Intptr_t /* pthread.h:256:18 */
  738. type Pthread_cond_t = Intptr_t /* pthread.h:257:18 */
  739. type Pthread_rwlock_t = Intptr_t /* pthread.h:258:18 */
  740. type Pthread_barrier_t = uintptr /* pthread.h:259:14 */
  741. //
  742. // Copyright (c) 2011-2016 mingw-w64 project
  743. //
  744. // Permission is hereby granted, free of charge, to any person obtaining a
  745. // copy of this software and associated documentation files (the "Software"),
  746. // to deal in the Software without restriction, including without limitation
  747. // the rights to use, copy, modify, merge, publish, distribute, sublicense,
  748. // and/or sell copies of the Software, and to permit persons to whom the
  749. // Software is furnished to do so, subject to the following conditions:
  750. //
  751. // The above copyright notice and this permission notice shall be included in
  752. // all copies or substantial portions of the Software.
  753. //
  754. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  755. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  756. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  757. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  758. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  759. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  760. // DEALINGS IN THE SOFTWARE.
  761. // Set defines described by the POSIX Threads Extension (1003.1c-1995)
  762. // _SC_THREADS
  763. // Basic support for POSIX threads is available. The functions
  764. //
  765. // pthread_atfork(),
  766. // pthread_attr_destroy(),
  767. // pthread_attr_getdetachstate(),
  768. // pthread_attr_getschedparam(),
  769. // pthread_attr_init(),
  770. // pthread_attr_setdetachstate(),
  771. // pthread_attr_setschedparam(),
  772. // pthread_cancel(),
  773. // pthread_cleanup_push(),
  774. // pthread_cleanup_pop(),
  775. // pthread_cond_broadcast(),
  776. // pthread_cond_destroy(),
  777. // pthread_cond_init(),
  778. // pthread_cond_signal(),
  779. // pthread_cond_timedwait(),
  780. // pthread_cond_wait(),
  781. // pthread_condattr_destroy(),
  782. // pthread_condattr_init(),
  783. // pthread_create(),
  784. // pthread_detach(),
  785. // pthread_equal(),
  786. // pthread_exit(),
  787. // pthread_getspecific(),
  788. // pthread_join(,
  789. // pthread_key_create(),
  790. // pthread_key_delete(),
  791. // pthread_mutex_destroy(),
  792. // pthread_mutex_init(),
  793. // pthread_mutex_lock(),
  794. // pthread_mutex_trylock(),
  795. // pthread_mutex_unlock(),
  796. // pthread_mutexattr_destroy(),
  797. // pthread_mutexattr_init(),
  798. // pthread_once(),
  799. // pthread_rwlock_destroy(),
  800. // pthread_rwlock_init(),
  801. // pthread_rwlock_rdlock(),
  802. // pthread_rwlock_tryrdlock(),
  803. // pthread_rwlock_trywrlock(),
  804. // pthread_rwlock_unlock(),
  805. // pthread_rwlock_wrlock(),
  806. // pthread_rwlockattr_destroy(),
  807. // pthread_rwlockattr_init(),
  808. // pthread_self(),
  809. // pthread_setcancelstate(),
  810. // pthread_setcanceltype(),
  811. // pthread_setspecific(),
  812. // pthread_testcancel()
  813. //
  814. // are present.
  815. // _SC_READER_WRITER_LOCKS
  816. // This option implies the _POSIX_THREADS option. Conversely, under
  817. // POSIX 1003.1-2001 the _POSIX_THREADS option implies this option.
  818. //
  819. // The functions
  820. // pthread_rwlock_destroy(),
  821. // pthread_rwlock_init(),
  822. // pthread_rwlock_rdlock(),
  823. // pthread_rwlock_tryrdlock(),
  824. // pthread_rwlock_trywrlock(),
  825. // pthread_rwlock_unlock(),
  826. // pthread_rwlock_wrlock(),
  827. // pthread_rwlockattr_destroy(),
  828. // pthread_rwlockattr_init()
  829. //
  830. // are present.
  831. // _SC_SPIN_LOCKS
  832. // This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
  833. // options. The functions
  834. //
  835. // pthread_spin_destroy(),
  836. // pthread_spin_init(),
  837. // pthread_spin_lock(),
  838. // pthread_spin_trylock(),
  839. // pthread_spin_unlock()
  840. //
  841. // are present.
  842. // _SC_BARRIERS
  843. // This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
  844. // options. The functions
  845. //
  846. // pthread_barrier_destroy(),
  847. // pthread_barrier_init(),
  848. // pthread_barrier_wait(),
  849. // pthread_barrierattr_destroy(),
  850. // pthread_barrierattr_init()
  851. //
  852. // are present.
  853. // _SC_TIMEOUTS
  854. // The functions
  855. //
  856. // mq_timedreceive(), - not supported
  857. // mq_timedsend(), - not supported
  858. // posix_trace_timedgetnext_event(), - not supported
  859. // pthread_mutex_timedlock(),
  860. // pthread_rwlock_timedrdlock(),
  861. // pthread_rwlock_timedwrlock(),
  862. // sem_timedwait(),
  863. //
  864. // are present.
  865. // _SC_TIMERS - not supported
  866. // The functions
  867. //
  868. // clock_getres(),
  869. // clock_gettime(),
  870. // clock_settime(),
  871. // nanosleep(),
  872. // timer_create(),
  873. // timer_delete(),
  874. // timer_gettime(),
  875. // timer_getoverrun(),
  876. // timer_settime()
  877. //
  878. // are present.
  879. // #undef _POSIX_TIMERS
  880. // _SC_CLOCK_SELECTION
  881. // This option implies the _POSIX_TIMERS option. The functions
  882. //
  883. // pthread_condattr_getclock(),
  884. // pthread_condattr_setclock(),
  885. // clock_nanosleep()
  886. //
  887. // are present.
  888. // _SC_SEMAPHORES
  889. // The include file <semaphore.h> is present. The functions
  890. //
  891. // sem_close(),
  892. // sem_destroy(),
  893. // sem_getvalue(),
  894. // sem_init(),
  895. // sem_open(),
  896. // sem_post(),
  897. // sem_trywait(),
  898. // sem_unlink(),
  899. // sem_wait()
  900. //
  901. // are present.
  902. // Wrap cancellation points.
  903. // We deal here with a gcc issue for posix threading on Windows.
  904. // We would need to change here gcc's gthr-posix.h header, but this
  905. // got rejected. So we deal it within this header.
  906. var _ int8 /* gen.c:2:13: */