time_illumos_amd64.go 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468
  1. // Code generated by 'ccgo time/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_illumos_amd64.go -pkgname time', DO NOT EDIT.
  2. package time
  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. CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
  15. CLOCK_HIGHRES = 4 // time_impl.h:126:1:
  16. CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
  17. CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
  18. CLOCK_PROF = 2 // time_impl.h:127:1:
  19. CLOCK_REALTIME = 3 // time_impl.h:123:1:
  20. CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
  21. CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
  22. DST_AUST = 2 // time.h:115:1:
  23. DST_AUSTALT = 10 // time.h:123:1:
  24. DST_CAN = 6 // time.h:119:1:
  25. DST_EET = 5 // time.h:118:1:
  26. DST_GB = 7 // time.h:120:1:
  27. DST_MET = 4 // time.h:117:1:
  28. DST_NONE = 0 // time.h:113:1:
  29. DST_RUM = 8 // time.h:121:1:
  30. DST_TUR = 9 // time.h:122:1:
  31. DST_USA = 1 // time.h:114:1:
  32. DST_WET = 3 // time.h:116:1:
  33. FD_SETSIZE = 65536 // select.h:88:1:
  34. ITIMER_PROF = 2 // time.h:201:1:
  35. ITIMER_REAL = 0 // time.h:199:1:
  36. ITIMER_REALPROF = 3 // time.h:204:1:
  37. ITIMER_VIRTUAL = 1 // time.h:200:1:
  38. MICROSEC = 1000000 // time.h:246:1:
  39. MILLISEC = 1000 // time.h:245:1:
  40. NANOSEC = 1000000000 // time.h:247:1:
  41. NBBY = 8 // select.h:103:1:
  42. P_MYID = -1 // types.h:632:1:
  43. REG_LABEL_BP = 2 // machtypes.h:44:1:
  44. REG_LABEL_MAX = 8 // machtypes.h:51:1:
  45. REG_LABEL_PC = 0 // machtypes.h:42:1:
  46. REG_LABEL_R12 = 4 // machtypes.h:47:1:
  47. REG_LABEL_R13 = 5 // machtypes.h:48:1:
  48. REG_LABEL_R14 = 6 // machtypes.h:49:1:
  49. REG_LABEL_R15 = 7 // machtypes.h:50:1:
  50. REG_LABEL_RBX = 3 // machtypes.h:46:1:
  51. REG_LABEL_SP = 1 // machtypes.h:43:1:
  52. SEC = 1 // time.h:244:1:
  53. TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
  54. TIMER_RELTIME = 0x0 // time_impl.h:133:1:
  55. TIME_UTC = 0x1 // time.h:306:1:
  56. X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
  57. X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
  58. X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
  59. X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
  60. X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
  61. X_CLOCKID_T = 0 // types.h:568:1:
  62. X_CLOCK_T = 0 // time_iso.h:69:1:
  63. X_COND_MAGIC = 0x4356 // types.h:426:1:
  64. X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
  65. X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
  66. X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
  67. X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
  68. X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
  69. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  70. X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
  71. X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
  72. X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
  73. X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
  74. X_IEEE_754 = 0 // isa_defs.h:246:1:
  75. X_INT64_TYPE = 0 // int_types.h:82:1:
  76. X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
  77. X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
  78. X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
  79. X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
  80. X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
  81. X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
  82. X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
  83. X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
  84. X_LOCALE_T = 0 // time.h:291:1:
  85. X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
  86. X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
  87. X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
  88. X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
  89. X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
  90. X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
  91. X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
  92. X_LP64 = 1 // <predefined>:286:1:
  93. X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
  94. X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
  95. X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
  96. X_NBBY = 8 // select.h:100:1:
  97. X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
  98. X_OFF_T = 0 // types.h:142:1:
  99. X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
  100. X_PSM_MODULES = 0 // isa_defs.h:284:1:
  101. X_PTRDIFF_T = 0 // types.h:112:1:
  102. X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
  103. X_RTC_CONFIG = 0 // isa_defs.h:285:1:
  104. X_RWL_MAGIC = 0x5257 // types.h:427:1:
  105. X_SEMA_MAGIC = 0x534d // types.h:425:1:
  106. X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
  107. X_SIGEVENT = 0 // time.h:132:1:
  108. X_SIGSET_T = 0 // select.h:73:1:
  109. X_SIGVAL = 0 // time.h:124:1:
  110. X_SIZE_T = 0 // time_iso.h:60:1:
  111. X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
  112. X_SSIZE_T = 0 // types.h:549:1:
  113. X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
  114. X_STDC_C11 = 0 // feature_tests.h:165:1:
  115. X_STDC_C99 = 0 // feature_tests.h:169:1:
  116. X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
  117. X_SUSECONDS_T = 0 // types.h:343:1:
  118. X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
  119. X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
  120. X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
  121. X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
  122. X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
  123. X_SYS_NULL_H = 0 // null.h:17:1:
  124. X_SYS_SELECT_H = 0 // select.h:45:1:
  125. X_SYS_TIME_H = 0 // time.h:27:1:
  126. X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
  127. X_SYS_TYPES_H = 0 // types.h:35:1:
  128. X_TIMER_T = 0 // types.h:573:1:
  129. X_TIME_H = 0 // time.h:37:1:
  130. X_TIME_T = 0 // time_iso.h:74:1:
  131. X_UID_T = 0 // types.h:400:1:
  132. X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
  133. Sun = 1 // <predefined>:172:1:
  134. Unix = 1 // <predefined>:175:1:
  135. )
  136. // used for block sizes
  137. // The boolean_t type has had a varied amount of exposure over the years in
  138. // terms of how its enumeration constants have been exposed. In particular, it
  139. // originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
  140. // B_TRUE and B_FALSE with an underscore. This check never included the
  141. // question of if we were in a strict ANSI C environment or whether extensions
  142. // were defined.
  143. //
  144. // Compilers such as clang started defaulting to always including an
  145. // XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
  146. // This would lead most software that had used the non-underscore versions to
  147. // need it. As such, we have adjusted the non-strict XOPEN environment to retain
  148. // its old behavior so as to minimize namespace pollution; however, we instead
  149. // include both variants of the definitions in the generally visible version
  150. // allowing software written in either world to hopefully end up in a good
  151. // place.
  152. //
  153. // This isn't perfect, but should hopefully minimize the pain for folks actually
  154. // trying to build software.
  155. const ( /* types.h:215:1: */
  156. B_FALSE = 0
  157. B_TRUE = 1
  158. X_B_FALSE = 0
  159. X_B_TRUE = 1
  160. )
  161. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  162. type Size_t = uint64 /* <builtin>:9:23 */
  163. type Wchar_t = int32 /* <builtin>:15:24 */
  164. type X__int128_t = struct {
  165. Flo int64
  166. Fhi int64
  167. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  168. type X__uint128_t = struct {
  169. Flo uint64
  170. Fhi uint64
  171. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  172. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  173. type X__float128 = float64 /* <builtin>:47:21 */ // size of something in bytes
  174. type Clock_t = int64 /* time_iso.h:70:14 */
  175. type Time_t = int64 /* time_iso.h:75:14 */
  176. type Tm = struct {
  177. Ftm_sec int32
  178. Ftm_min int32
  179. Ftm_hour int32
  180. Ftm_mday int32
  181. Ftm_mon int32
  182. Ftm_year int32
  183. Ftm_wday int32
  184. Ftm_yday int32
  185. Ftm_isdst int32
  186. } /* time_iso.h:80:1 */
  187. // C11 requires sys/time_impl.h for the definition of the struct timespec.
  188. // CDDL HEADER START
  189. //
  190. // The contents of this file are subject to the terms of the
  191. // Common Development and Distribution License (the "License").
  192. // You may not use this file except in compliance with the License.
  193. //
  194. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  195. // or http://www.opensolaris.org/os/licensing.
  196. // See the License for the specific language governing permissions
  197. // and limitations under the License.
  198. //
  199. // When distributing Covered Code, include this CDDL HEADER in each
  200. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  201. // If applicable, add the following below this CDDL HEADER, with the
  202. // fields enclosed by brackets "[]" replaced with your own identifying
  203. // information: Portions Copyright [yyyy] [name of copyright owner]
  204. //
  205. // CDDL HEADER END
  206. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  207. // All Rights Reserved
  208. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  209. // Use is subject to license terms.
  210. //
  211. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  212. // Copyright 2016 Joyent, Inc.
  213. // Copyright 2021 Oxide Computer Company
  214. // DO NOT EDIT THIS FILE.
  215. //
  216. // It has been auto-edited by fixincludes from:
  217. //
  218. // "/usr/include/sys/feature_tests.h"
  219. //
  220. // This had to be done to correct non-standard usages in the
  221. // original, manufacturer supplied header file.
  222. // CDDL HEADER START
  223. //
  224. // The contents of this file are subject to the terms of the
  225. // Common Development and Distribution License (the "License").
  226. // You may not use this file except in compliance with the License.
  227. //
  228. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  229. // or http://www.opensolaris.org/os/licensing.
  230. // See the License for the specific language governing permissions
  231. // and limitations under the License.
  232. //
  233. // When distributing Covered Code, include this CDDL HEADER in each
  234. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  235. // If applicable, add the following below this CDDL HEADER, with the
  236. // fields enclosed by brackets "[]" replaced with your own identifying
  237. // information: Portions Copyright [yyyy] [name of copyright owner]
  238. //
  239. // CDDL HEADER END
  240. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  241. // Copyright 2016 Joyent, Inc.
  242. // Copyright 2022 Oxide Computer Company
  243. //
  244. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  245. // Use is subject to license terms.
  246. // CDDL HEADER START
  247. //
  248. // The contents of this file are subject to the terms of the
  249. // Common Development and Distribution License (the "License").
  250. // You may not use this file except in compliance with the License.
  251. //
  252. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  253. // or http://www.opensolaris.org/os/licensing.
  254. // See the License for the specific language governing permissions
  255. // and limitations under the License.
  256. //
  257. //
  258. // When distributing Covered Code, include this CDDL HEADER in each
  259. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  260. // If applicable, add the following below this CDDL HEADER, with the
  261. // fields enclosed by brackets "[]" replaced with your own identifying
  262. // information: Portions Copyright [yyyy] [name of copyright owner]
  263. //
  264. // CDDL HEADER END
  265. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  266. // Use is subject to license terms.
  267. // Copyright 2016 Joyent, Inc.
  268. // Machine dependent definitions moved to <sys/machtypes.h>.
  269. // CDDL HEADER START
  270. //
  271. // The contents of this file are subject to the terms of the
  272. // Common Development and Distribution License (the "License").
  273. // You may not use this file except in compliance with the License.
  274. //
  275. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  276. // or http://www.opensolaris.org/os/licensing.
  277. // See the License for the specific language governing permissions
  278. // and limitations under the License.
  279. //
  280. // When distributing Covered Code, include this CDDL HEADER in each
  281. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  282. // If applicable, add the following below this CDDL HEADER, with the
  283. // fields enclosed by brackets "[]" replaced with your own identifying
  284. // information: Portions Copyright [yyyy] [name of copyright owner]
  285. //
  286. // CDDL HEADER END
  287. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  288. // Use is subject to license terms.
  289. // Machine dependent types:
  290. //
  291. // intel ia32 Version
  292. type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
  293. // C11 requires sys/time_impl.h for the definition of the struct timespec.
  294. // CDDL HEADER START
  295. //
  296. // The contents of this file are subject to the terms of the
  297. // Common Development and Distribution License (the "License").
  298. // You may not use this file except in compliance with the License.
  299. //
  300. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  301. // or http://www.opensolaris.org/os/licensing.
  302. // See the License for the specific language governing permissions
  303. // and limitations under the License.
  304. //
  305. // When distributing Covered Code, include this CDDL HEADER in each
  306. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  307. // If applicable, add the following below this CDDL HEADER, with the
  308. // fields enclosed by brackets "[]" replaced with your own identifying
  309. // information: Portions Copyright [yyyy] [name of copyright owner]
  310. //
  311. // CDDL HEADER END
  312. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  313. // All Rights Reserved
  314. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  315. // Use is subject to license terms.
  316. //
  317. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  318. // Copyright 2016 Joyent, Inc.
  319. // Copyright 2021 Oxide Computer Company
  320. // DO NOT EDIT THIS FILE.
  321. //
  322. // It has been auto-edited by fixincludes from:
  323. //
  324. // "/usr/include/sys/feature_tests.h"
  325. //
  326. // This had to be done to correct non-standard usages in the
  327. // original, manufacturer supplied header file.
  328. // CDDL HEADER START
  329. //
  330. // The contents of this file are subject to the terms of the
  331. // Common Development and Distribution License (the "License").
  332. // You may not use this file except in compliance with the License.
  333. //
  334. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  335. // or http://www.opensolaris.org/os/licensing.
  336. // See the License for the specific language governing permissions
  337. // and limitations under the License.
  338. //
  339. // When distributing Covered Code, include this CDDL HEADER in each
  340. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  341. // If applicable, add the following below this CDDL HEADER, with the
  342. // fields enclosed by brackets "[]" replaced with your own identifying
  343. // information: Portions Copyright [yyyy] [name of copyright owner]
  344. //
  345. // CDDL HEADER END
  346. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  347. // Copyright 2016 Joyent, Inc.
  348. // Copyright 2022 Oxide Computer Company
  349. //
  350. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  351. // Use is subject to license terms.
  352. // CDDL HEADER START
  353. //
  354. // The contents of this file are subject to the terms of the
  355. // Common Development and Distribution License (the "License").
  356. // You may not use this file except in compliance with the License.
  357. //
  358. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  359. // or http://www.opensolaris.org/os/licensing.
  360. // See the License for the specific language governing permissions
  361. // and limitations under the License.
  362. //
  363. //
  364. // When distributing Covered Code, include this CDDL HEADER in each
  365. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  366. // If applicable, add the following below this CDDL HEADER, with the
  367. // fields enclosed by brackets "[]" replaced with your own identifying
  368. // information: Portions Copyright [yyyy] [name of copyright owner]
  369. //
  370. // CDDL HEADER END
  371. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  372. // Use is subject to license terms.
  373. // Copyright 2016 Joyent, Inc.
  374. // Machine dependent definitions moved to <sys/machtypes.h>.
  375. // CDDL HEADER START
  376. //
  377. // The contents of this file are subject to the terms of the
  378. // Common Development and Distribution License (the "License").
  379. // You may not use this file except in compliance with the License.
  380. //
  381. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  382. // or http://www.opensolaris.org/os/licensing.
  383. // See the License for the specific language governing permissions
  384. // and limitations under the License.
  385. //
  386. // When distributing Covered Code, include this CDDL HEADER in each
  387. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  388. // If applicable, add the following below this CDDL HEADER, with the
  389. // fields enclosed by brackets "[]" replaced with your own identifying
  390. // information: Portions Copyright [yyyy] [name of copyright owner]
  391. //
  392. // CDDL HEADER END
  393. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  394. // Use is subject to license terms.
  395. // Machine dependent types:
  396. //
  397. // intel ia32 Version
  398. type Label_t = X_label_t /* machtypes.h:59:54 */
  399. type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
  400. // Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
  401. // committee's working draft for the revision of the current ISO C standard,
  402. // ISO/IEC 9899:1990 Programming language - C. These are not currently
  403. // required by any standard but constitute a useful, general purpose set
  404. // of type definitions which is namespace clean with respect to all standards.
  405. // CDDL HEADER START
  406. //
  407. // The contents of this file are subject to the terms of the
  408. // Common Development and Distribution License, Version 1.0 only
  409. // (the "License"). You may not use this file except in compliance
  410. // with the License.
  411. //
  412. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  413. // or http://www.opensolaris.org/os/licensing.
  414. // See the License for the specific language governing permissions
  415. // and limitations under the License.
  416. //
  417. // When distributing Covered Code, include this CDDL HEADER in each
  418. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  419. // If applicable, add the following below this CDDL HEADER, with the
  420. // fields enclosed by brackets "[]" replaced with your own identifying
  421. // information: Portions Copyright [yyyy] [name of copyright owner]
  422. //
  423. // CDDL HEADER END
  424. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  425. //
  426. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  427. // Use is subject to license terms.
  428. // This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
  429. // of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
  430. // Programming language - C.
  431. //
  432. // Programs/Modules should not directly include this file. Access to the
  433. // types defined in this file should be through the inclusion of one of the
  434. // following files:
  435. //
  436. // <sys/types.h> Provides only the "_t" types defined in this
  437. // file which is a subset of the contents of
  438. // <inttypes.h>. (This can be appropriate for
  439. // all programs/modules except those claiming
  440. // ANSI-C conformance.)
  441. //
  442. // <sys/inttypes.h> Provides the Kernel and Driver appropriate
  443. // components of <inttypes.h>.
  444. //
  445. // <inttypes.h> For use by applications.
  446. //
  447. // See these files for more details.
  448. // DO NOT EDIT THIS FILE.
  449. //
  450. // It has been auto-edited by fixincludes from:
  451. //
  452. // "/usr/include/sys/feature_tests.h"
  453. //
  454. // This had to be done to correct non-standard usages in the
  455. // original, manufacturer supplied header file.
  456. // CDDL HEADER START
  457. //
  458. // The contents of this file are subject to the terms of the
  459. // Common Development and Distribution License (the "License").
  460. // You may not use this file except in compliance with the License.
  461. //
  462. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  463. // or http://www.opensolaris.org/os/licensing.
  464. // See the License for the specific language governing permissions
  465. // and limitations under the License.
  466. //
  467. // When distributing Covered Code, include this CDDL HEADER in each
  468. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  469. // If applicable, add the following below this CDDL HEADER, with the
  470. // fields enclosed by brackets "[]" replaced with your own identifying
  471. // information: Portions Copyright [yyyy] [name of copyright owner]
  472. //
  473. // CDDL HEADER END
  474. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  475. // Copyright 2016 Joyent, Inc.
  476. // Copyright 2022 Oxide Computer Company
  477. //
  478. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  479. // Use is subject to license terms.
  480. // Basic / Extended integer types
  481. //
  482. // The following defines the basic fixed-size integer types.
  483. //
  484. // Implementations are free to typedef them to Standard C integer types or
  485. // extensions that they support. If an implementation does not support one
  486. // of the particular integer data types below, then it should not define the
  487. // typedefs and macros corresponding to that data type. Note that int8_t
  488. // is not defined in -Xs mode on ISAs for which the ABI specifies "char"
  489. // as an unsigned entity because there is no way to define an eight bit
  490. // signed integral.
  491. type Int8_t = int8 /* int_types.h:75:16 */
  492. type Int16_t = int16 /* int_types.h:79:17 */
  493. type Int32_t = int32 /* int_types.h:80:15 */
  494. type Int64_t = int64 /* int_types.h:83:16 */
  495. type Uint8_t = uint8 /* int_types.h:91:24 */
  496. type Uint16_t = uint16 /* int_types.h:92:25 */
  497. type Uint32_t = uint32 /* int_types.h:93:23 */
  498. type Uint64_t = uint64 /* int_types.h:95:24 */
  499. // intmax_t and uintmax_t are to be the longest (in number of bits) signed
  500. // and unsigned integer types supported by the implementation.
  501. type Intmax_t = int64 /* int_types.h:107:19 */
  502. type Uintmax_t = uint64 /* int_types.h:108:19 */
  503. // intptr_t and uintptr_t are signed and unsigned integer types large enough
  504. // to hold any data pointer; that is, data pointers can be assigned into or
  505. // from these integer types without losing precision.
  506. type Intptr_t = int64 /* int_types.h:120:16 */
  507. type Uintptr_t = uint64 /* int_types.h:121:24 */
  508. // The following define the fastest integer types that can hold the
  509. // specified number of bits.
  510. type Int_fast8_t = int8 /* int_types.h:132:16 */
  511. type Int_fast16_t = int32 /* int_types.h:136:15 */
  512. type Int_fast32_t = int32 /* int_types.h:137:15 */
  513. type Int_fast64_t = int64 /* int_types.h:139:16 */
  514. type Uint_fast8_t = uint8 /* int_types.h:146:24 */
  515. type Uint_fast16_t = uint32 /* int_types.h:147:23 */
  516. type Uint_fast32_t = uint32 /* int_types.h:148:23 */
  517. type Uint_fast64_t = uint64 /* int_types.h:150:24 */
  518. // The following define the smallest integer types that can hold the
  519. // specified number of bits.
  520. type Int_least8_t = int8 /* int_types.h:162:16 */
  521. type Int_least16_t = int16 /* int_types.h:166:17 */
  522. type Int_least32_t = int32 /* int_types.h:167:15 */
  523. type Int_least64_t = int64 /* int_types.h:169:16 */
  524. // If these are changed, please update char16_t and char32_t in head/uchar.h.
  525. type Uint_least8_t = uint8 /* int_types.h:179:24 */
  526. type Uint_least16_t = uint16 /* int_types.h:180:25 */
  527. type Uint_least32_t = uint32 /* int_types.h:181:23 */
  528. type Uint_least64_t = uint64 /* int_types.h:183:24 */
  529. // Strictly conforming ANSI C environments prior to the 1999
  530. // revision of the C Standard (ISO/IEC 9899:1999) do not have
  531. // the long long data type.
  532. type Longlong_t = int64 /* types.h:72:20 */
  533. type U_longlong_t = uint64 /* types.h:73:28 */
  534. // These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
  535. // to use them instead of int32_t and uint32_t because DEC had
  536. // shipped 64-bit wide.
  537. type T_scalar_t = int32 /* types.h:92:18 */
  538. type T_uscalar_t = uint32 /* types.h:93:18 */
  539. // POSIX Extensions
  540. type Uchar_t = uint8 /* types.h:102:23 */
  541. type Ushort_t = uint16 /* types.h:103:24 */
  542. type Uint_t = uint32 /* types.h:104:22 */
  543. type Ulong_t = uint64 /* types.h:105:23 */
  544. type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
  545. type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
  546. type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
  547. // VM-related types
  548. type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
  549. type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
  550. type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
  551. type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
  552. type Sysid_t = int16 /* types.h:128:16 */
  553. type Index_t = int16 /* types.h:129:16 */
  554. type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
  555. type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
  556. // The size of off_t and related types depends on the setting of
  557. // _FILE_OFFSET_BITS. (Note that other system headers define other types
  558. // related to those defined here.)
  559. //
  560. // If _LARGEFILE64_SOURCE is defined, variants of these types that are
  561. // explicitly 64 bits wide become available.
  562. type Off_t = int64 /* types.h:145:15 */ // offsets within files
  563. type Off64_t = int64 /* types.h:152:16 */ // offsets within files
  564. type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
  565. type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
  566. type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
  567. type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
  568. type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
  569. type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
  570. type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
  571. type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
  572. type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
  573. // The boolean_t type has had a varied amount of exposure over the years in
  574. // terms of how its enumeration constants have been exposed. In particular, it
  575. // originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
  576. // B_TRUE and B_FALSE with an underscore. This check never included the
  577. // question of if we were in a strict ANSI C environment or whether extensions
  578. // were defined.
  579. //
  580. // Compilers such as clang started defaulting to always including an
  581. // XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
  582. // This would lead most software that had used the non-underscore versions to
  583. // need it. As such, we have adjusted the non-strict XOPEN environment to retain
  584. // its old behavior so as to minimize namespace pollution; however, we instead
  585. // include both variants of the definitions in the generally visible version
  586. // allowing software written in either world to hopefully end up in a good
  587. // place.
  588. //
  589. // This isn't perfect, but should hopefully minimize the pain for folks actually
  590. // trying to build software.
  591. type Boolean_t = uint32 /* types.h:215:69 */
  592. // The {u,}pad64_t types can be used in structures such that those structures
  593. // may be accessed by code produced by compilation environments which don't
  594. // support a 64 bit integral datatype. The intention is not to allow
  595. // use of these fields in such environments, but to maintain the alignment
  596. // and offsets of the structure.
  597. //
  598. // Similar comments for {u,}pad128_t.
  599. //
  600. // Note that these types do NOT generate any stronger alignment constraints
  601. // than those available in the underlying ABI. See <sys/isa_defs.h>
  602. type Pad64_t = int64 /* types.h:240:18 */
  603. type Upad64_t = uint64 /* types.h:241:18 */
  604. type Pad128_t = struct {
  605. F_q float64
  606. F__ccgo_pad1 [8]byte
  607. } /* types.h:257:3 */
  608. type Upad128_t = struct {
  609. F_q float64
  610. F__ccgo_pad1 [8]byte
  611. } /* types.h:262:3 */
  612. type Offset_t = int64 /* types.h:264:20 */
  613. type U_offset_t = uint64 /* types.h:265:22 */
  614. type Len_t = uint64 /* types.h:266:22 */
  615. type Diskaddr_t = uint64 /* types.h:267:22 */
  616. // Definitions remaining from previous partial support for 64-bit file
  617. // offsets. This partial support for devices greater than 2gb requires
  618. // compiler support for long long.
  619. type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
  620. type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
  621. type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
  622. // The following type is for various kinds of identifiers. The
  623. // actual type must be the same for all since some system calls
  624. // (such as sigsend) take arguments that may be any of these
  625. // types. The enumeration type idtype_t defined in sys/procset.h
  626. // is used to indicate what type of id is being specified --
  627. // a process id, process group id, session id, scheduling class id,
  628. // user id, group id, project id, task id or zone id.
  629. type Id_t = int32 /* types.h:329:14 */
  630. type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
  631. // Type useconds_t is an unsigned integral type capable of storing
  632. // values at least in the range of zero to 1,000,000.
  633. type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
  634. type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
  635. // Typedefs for dev_t components.
  636. type Major_t = uint32 /* types.h:351:16 */ // major part of device number
  637. type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
  638. // The data type of a thread priority.
  639. type Pri_t = int16 /* types.h:361:15 */
  640. // The data type for a CPU flags field. (Can be extended to larger unsigned
  641. // types, if needed, limited by ability to update atomically.)
  642. type Cpu_flag_t = uint16 /* types.h:367:18 */
  643. // For compatibility reasons the following typedefs (prefixed o_)
  644. // can't grow regardless of the EFT definition. Although,
  645. // applications should not explicitly use these typedefs
  646. // they may be included via a system header definition.
  647. // WARNING: These typedefs may be removed in a future
  648. // release.
  649. //
  650. // ex. the definitions in s5inode.h (now obsoleted)
  651. // remained small to preserve compatibility
  652. // in the S5 file system type.
  653. type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
  654. type O_dev_t = int16 /* types.h:381:15 */ // old device type
  655. type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
  656. type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
  657. type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
  658. type O_pid_t = int16 /* types.h:385:15 */ // old process id type
  659. type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
  660. // POSIX and XOPEN Declarations
  661. type Key_t = int32 /* types.h:392:13 */ // IPC key type
  662. type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
  663. type Uid_t = uint32 /* types.h:401:22 */ // UID type
  664. type Gid_t = uint32 /* types.h:404:15 */ // GID type
  665. type Datalink_id_t = uint32 /* types.h:406:18 */
  666. type Vrid_t = uint32 /* types.h:407:18 */
  667. type Taskid_t = int32 /* types.h:409:17 */
  668. type Projid_t = int32 /* types.h:410:17 */
  669. type Poolid_t = int32 /* types.h:411:14 */
  670. type Zoneid_t = int32 /* types.h:412:14 */
  671. type Ctid_t = int32 /* types.h:413:14 */
  672. // POSIX definitions are same as defined in thread.h and synch.h.
  673. // Any changes made to here should be reflected in corresponding
  674. // files as described in comments.
  675. type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
  676. type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
  677. // "Magic numbers" tagging synchronization object types
  678. type X_pthread_mutex = struct {
  679. F__pthread_mutex_flags struct {
  680. F__pthread_mutex_flag1 uint16
  681. F__pthread_mutex_flag2 uint8
  682. F__pthread_mutex_ceiling uint8
  683. F__pthread_mutex_type uint16
  684. F__pthread_mutex_magic uint16
  685. }
  686. F__pthread_mutex_lock struct {
  687. F__ccgo_pad1 [0]uint64
  688. F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
  689. }
  690. F__pthread_mutex_data uint64
  691. } /* types.h:429:9 */
  692. // = thread_key_t in thread.h
  693. // "Magic numbers" tagging synchronization object types
  694. type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
  695. type X_pthread_cond = struct {
  696. F__pthread_cond_flags struct {
  697. F__pthread_cond_flag [4]uint8
  698. F__pthread_cond_type uint16
  699. F__pthread_cond_magic uint16
  700. }
  701. F__pthread_cond_data uint64
  702. } /* types.h:450:9 */
  703. type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
  704. // UNIX 98 Extension
  705. type X_pthread_rwlock = struct {
  706. F__pthread_rwlock_readers int32
  707. F__pthread_rwlock_type uint16
  708. F__pthread_rwlock_magic uint16
  709. F__pthread_rwlock_mutex Pthread_mutex_t
  710. F__pthread_rwlock_readercv Pthread_cond_t
  711. F__pthread_rwlock_writercv Pthread_cond_t
  712. } /* types.h:462:9 */
  713. // UNIX 98 Extension
  714. type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
  715. // SUSV3
  716. type Pthread_barrier_t = struct {
  717. F__pthread_barrier_count uint32
  718. F__pthread_barrier_current uint32
  719. F__pthread_barrier_cycle uint64
  720. F__pthread_barrier_reserved uint64
  721. F__pthread_barrier_lock Pthread_mutex_t
  722. F__pthread_barrier_cond Pthread_cond_t
  723. } /* types.h:481:3 */
  724. type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
  725. // attributes for threads, dynamically allocated by library
  726. type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
  727. // attributes for threads, dynamically allocated by library
  728. type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
  729. // attributes for mutex, dynamically allocated by library
  730. type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
  731. // attributes for mutex, dynamically allocated by library
  732. type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
  733. // attributes for cond, dynamically allocated by library
  734. type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
  735. // attributes for cond, dynamically allocated by library
  736. type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
  737. // pthread_once
  738. type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
  739. // pthread_once
  740. type Pthread_once_t = X_once /* types.h:511:3 */
  741. // UNIX 98 Extensions
  742. // attributes for rwlock, dynamically allocated by library
  743. type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
  744. // UNIX 98 Extensions
  745. // attributes for rwlock, dynamically allocated by library
  746. type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
  747. // SUSV3
  748. // attributes for pthread_barrier_t, dynamically allocated by library
  749. type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
  750. type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
  751. type Nlink_t = uint32 /* types.h:532:16 */ // file link type
  752. type Pid_t = int32 /* types.h:533:13 */ // process id type
  753. type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
  754. type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
  755. type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
  756. // BEGIN CSTYLED
  757. type Unchar = uint8 /* types.h:580:23 */
  758. type Ushort = uint16 /* types.h:581:24 */
  759. type Uint = uint32 /* types.h:582:22 */
  760. type Ulong = uint64 /* types.h:583:23 */
  761. // END CSTYLED
  762. // The following is the value of type id_t to use to indicate the
  763. // caller's current id. See procset.h for the type idtype_t
  764. // which defines which kind of id is being specified.
  765. // The following value of type pfn_t is used to indicate
  766. // invalid page frame number.
  767. // BEGIN CSTYLED
  768. type U_char = uint8 /* types.h:650:23 */
  769. type U_short = uint16 /* types.h:651:24 */
  770. type U_int = uint32 /* types.h:652:22 */
  771. type U_long = uint64 /* types.h:653:23 */
  772. type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
  773. type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
  774. type Quad = Quad_t /* types.h:655:17 */ // used by UFS
  775. // END CSTYLED
  776. // Nested include for BSD/sockets source compatibility.
  777. // (The select macros used to be defined here).
  778. // CDDL HEADER START
  779. //
  780. // The contents of this file are subject to the terms of the
  781. // Common Development and Distribution License (the "License").
  782. // You may not use this file except in compliance with the License.
  783. //
  784. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  785. // or http://www.opensolaris.org/os/licensing.
  786. // See the License for the specific language governing permissions
  787. // and limitations under the License.
  788. //
  789. // When distributing Covered Code, include this CDDL HEADER in each
  790. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  791. // If applicable, add the following below this CDDL HEADER, with the
  792. // fields enclosed by brackets "[]" replaced with your own identifying
  793. // information: Portions Copyright [yyyy] [name of copyright owner]
  794. //
  795. // CDDL HEADER END
  796. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  797. //
  798. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  799. //
  800. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  801. // Use is subject to license terms.
  802. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  803. // All Rights Reserved
  804. // University Copyright- Copyright (c) 1982, 1986, 1988
  805. // The Regents of the University of California
  806. // All Rights Reserved
  807. //
  808. // University Acknowledgment- Portions of this document are derived from
  809. // software developed by the University of California, Berkeley, and its
  810. // contributors.
  811. // DO NOT EDIT THIS FILE.
  812. //
  813. // It has been auto-edited by fixincludes from:
  814. //
  815. // "/usr/include/sys/feature_tests.h"
  816. //
  817. // This had to be done to correct non-standard usages in the
  818. // original, manufacturer supplied header file.
  819. // CDDL HEADER START
  820. //
  821. // The contents of this file are subject to the terms of the
  822. // Common Development and Distribution License (the "License").
  823. // You may not use this file except in compliance with the License.
  824. //
  825. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  826. // or http://www.opensolaris.org/os/licensing.
  827. // See the License for the specific language governing permissions
  828. // and limitations under the License.
  829. //
  830. // When distributing Covered Code, include this CDDL HEADER in each
  831. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  832. // If applicable, add the following below this CDDL HEADER, with the
  833. // fields enclosed by brackets "[]" replaced with your own identifying
  834. // information: Portions Copyright [yyyy] [name of copyright owner]
  835. //
  836. // CDDL HEADER END
  837. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  838. // Copyright 2016 Joyent, Inc.
  839. // Copyright 2022 Oxide Computer Company
  840. //
  841. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  842. // Use is subject to license terms.
  843. // CDDL HEADER START
  844. //
  845. // The contents of this file are subject to the terms of the
  846. // Common Development and Distribution License, Version 1.0 only
  847. // (the "License"). You may not use this file except in compliance
  848. // with the License.
  849. //
  850. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  851. // or http://www.opensolaris.org/os/licensing.
  852. // See the License for the specific language governing permissions
  853. // and limitations under the License.
  854. //
  855. // When distributing Covered Code, include this CDDL HEADER in each
  856. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  857. // If applicable, add the following below this CDDL HEADER, with the
  858. // fields enclosed by brackets "[]" replaced with your own identifying
  859. // information: Portions Copyright [yyyy] [name of copyright owner]
  860. //
  861. // CDDL HEADER END
  862. // Copyright 2005 Sun Microsystems, Inc. All rights reserved.
  863. // Use is subject to license terms.
  864. // Implementation-private. This header should not be included
  865. // directly by an application. The application should instead
  866. // include <time.h> which includes this header conditionally
  867. // depending on which feature test macros are defined. By default,
  868. // this header is included by <time.h>. X/Open and POSIX
  869. // standards requirements result in this header being included
  870. // by <time.h> only under a restricted set of conditions.
  871. // DO NOT EDIT THIS FILE.
  872. //
  873. // It has been auto-edited by fixincludes from:
  874. //
  875. // "/usr/include/sys/feature_tests.h"
  876. //
  877. // This had to be done to correct non-standard usages in the
  878. // original, manufacturer supplied header file.
  879. // CDDL HEADER START
  880. //
  881. // The contents of this file are subject to the terms of the
  882. // Common Development and Distribution License (the "License").
  883. // You may not use this file except in compliance with the License.
  884. //
  885. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  886. // or http://www.opensolaris.org/os/licensing.
  887. // See the License for the specific language governing permissions
  888. // and limitations under the License.
  889. //
  890. // When distributing Covered Code, include this CDDL HEADER in each
  891. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  892. // If applicable, add the following below this CDDL HEADER, with the
  893. // fields enclosed by brackets "[]" replaced with your own identifying
  894. // information: Portions Copyright [yyyy] [name of copyright owner]
  895. //
  896. // CDDL HEADER END
  897. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  898. // Copyright 2016 Joyent, Inc.
  899. // Copyright 2022 Oxide Computer Company
  900. //
  901. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  902. // Use is subject to license terms.
  903. // Time expressed in seconds and nanoseconds
  904. type Timespec = struct {
  905. Ftv_sec int64
  906. Ftv_nsec int64
  907. } /* time_impl.h:57:9 */
  908. // used by UFS
  909. // END CSTYLED
  910. // Nested include for BSD/sockets source compatibility.
  911. // (The select macros used to be defined here).
  912. // CDDL HEADER START
  913. //
  914. // The contents of this file are subject to the terms of the
  915. // Common Development and Distribution License (the "License").
  916. // You may not use this file except in compliance with the License.
  917. //
  918. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  919. // or http://www.opensolaris.org/os/licensing.
  920. // See the License for the specific language governing permissions
  921. // and limitations under the License.
  922. //
  923. // When distributing Covered Code, include this CDDL HEADER in each
  924. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  925. // If applicable, add the following below this CDDL HEADER, with the
  926. // fields enclosed by brackets "[]" replaced with your own identifying
  927. // information: Portions Copyright [yyyy] [name of copyright owner]
  928. //
  929. // CDDL HEADER END
  930. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  931. //
  932. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  933. //
  934. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  935. // Use is subject to license terms.
  936. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  937. // All Rights Reserved
  938. // University Copyright- Copyright (c) 1982, 1986, 1988
  939. // The Regents of the University of California
  940. // All Rights Reserved
  941. //
  942. // University Acknowledgment- Portions of this document are derived from
  943. // software developed by the University of California, Berkeley, and its
  944. // contributors.
  945. // DO NOT EDIT THIS FILE.
  946. //
  947. // It has been auto-edited by fixincludes from:
  948. //
  949. // "/usr/include/sys/feature_tests.h"
  950. //
  951. // This had to be done to correct non-standard usages in the
  952. // original, manufacturer supplied header file.
  953. // CDDL HEADER START
  954. //
  955. // The contents of this file are subject to the terms of the
  956. // Common Development and Distribution License (the "License").
  957. // You may not use this file except in compliance with the License.
  958. //
  959. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  960. // or http://www.opensolaris.org/os/licensing.
  961. // See the License for the specific language governing permissions
  962. // and limitations under the License.
  963. //
  964. // When distributing Covered Code, include this CDDL HEADER in each
  965. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  966. // If applicable, add the following below this CDDL HEADER, with the
  967. // fields enclosed by brackets "[]" replaced with your own identifying
  968. // information: Portions Copyright [yyyy] [name of copyright owner]
  969. //
  970. // CDDL HEADER END
  971. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  972. // Copyright 2016 Joyent, Inc.
  973. // Copyright 2022 Oxide Computer Company
  974. //
  975. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  976. // Use is subject to license terms.
  977. // CDDL HEADER START
  978. //
  979. // The contents of this file are subject to the terms of the
  980. // Common Development and Distribution License, Version 1.0 only
  981. // (the "License"). You may not use this file except in compliance
  982. // with the License.
  983. //
  984. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  985. // or http://www.opensolaris.org/os/licensing.
  986. // See the License for the specific language governing permissions
  987. // and limitations under the License.
  988. //
  989. // When distributing Covered Code, include this CDDL HEADER in each
  990. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  991. // If applicable, add the following below this CDDL HEADER, with the
  992. // fields enclosed by brackets "[]" replaced with your own identifying
  993. // information: Portions Copyright [yyyy] [name of copyright owner]
  994. //
  995. // CDDL HEADER END
  996. // Copyright 2005 Sun Microsystems, Inc. All rights reserved.
  997. // Use is subject to license terms.
  998. // Implementation-private. This header should not be included
  999. // directly by an application. The application should instead
  1000. // include <time.h> which includes this header conditionally
  1001. // depending on which feature test macros are defined. By default,
  1002. // this header is included by <time.h>. X/Open and POSIX
  1003. // standards requirements result in this header being included
  1004. // by <time.h> only under a restricted set of conditions.
  1005. // DO NOT EDIT THIS FILE.
  1006. //
  1007. // It has been auto-edited by fixincludes from:
  1008. //
  1009. // "/usr/include/sys/feature_tests.h"
  1010. //
  1011. // This had to be done to correct non-standard usages in the
  1012. // original, manufacturer supplied header file.
  1013. // CDDL HEADER START
  1014. //
  1015. // The contents of this file are subject to the terms of the
  1016. // Common Development and Distribution License (the "License").
  1017. // You may not use this file except in compliance with the License.
  1018. //
  1019. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1020. // or http://www.opensolaris.org/os/licensing.
  1021. // See the License for the specific language governing permissions
  1022. // and limitations under the License.
  1023. //
  1024. // When distributing Covered Code, include this CDDL HEADER in each
  1025. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1026. // If applicable, add the following below this CDDL HEADER, with the
  1027. // fields enclosed by brackets "[]" replaced with your own identifying
  1028. // information: Portions Copyright [yyyy] [name of copyright owner]
  1029. //
  1030. // CDDL HEADER END
  1031. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1032. // Copyright 2016 Joyent, Inc.
  1033. // Copyright 2022 Oxide Computer Company
  1034. //
  1035. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1036. // Use is subject to license terms.
  1037. // Time expressed in seconds and nanoseconds
  1038. type Timespec_t = Timespec /* time_impl.h:60:3 */
  1039. type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
  1040. // The following has been left in for backward compatibility. Portable
  1041. // applications should not use the structure name timestruc.
  1042. // Timer specification
  1043. type Itimerspec = struct {
  1044. Fit_interval struct {
  1045. Ftv_sec int64
  1046. Ftv_nsec int64
  1047. }
  1048. Fit_value struct {
  1049. Ftv_sec int64
  1050. Ftv_nsec int64
  1051. }
  1052. } /* time_impl.h:95:9 */
  1053. // definition per SVr4
  1054. // The following has been left in for backward compatibility. Portable
  1055. // applications should not use the structure name timestruc.
  1056. // Timer specification
  1057. type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
  1058. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  1059. // All Rights Reserved
  1060. // Copyright (c) 1982, 1986, 1993 Regents of the University of California.
  1061. // All rights reserved. The Berkeley software License Agreement
  1062. // specifies the terms and conditions for redistribution.
  1063. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  1064. //
  1065. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  1066. // Use is subject to license terms.
  1067. //
  1068. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  1069. // Copyright 2016 Joyent, Inc.
  1070. // Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
  1071. // Copyright (c) 2013, 2016 by Delphix. All rights reserved.
  1072. // DO NOT EDIT THIS FILE.
  1073. //
  1074. // It has been auto-edited by fixincludes from:
  1075. //
  1076. // "/usr/include/sys/feature_tests.h"
  1077. //
  1078. // This had to be done to correct non-standard usages in the
  1079. // original, manufacturer supplied header file.
  1080. // CDDL HEADER START
  1081. //
  1082. // The contents of this file are subject to the terms of the
  1083. // Common Development and Distribution License (the "License").
  1084. // You may not use this file except in compliance with the License.
  1085. //
  1086. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1087. // or http://www.opensolaris.org/os/licensing.
  1088. // See the License for the specific language governing permissions
  1089. // and limitations under the License.
  1090. //
  1091. // When distributing Covered Code, include this CDDL HEADER in each
  1092. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1093. // If applicable, add the following below this CDDL HEADER, with the
  1094. // fields enclosed by brackets "[]" replaced with your own identifying
  1095. // information: Portions Copyright [yyyy] [name of copyright owner]
  1096. //
  1097. // CDDL HEADER END
  1098. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1099. // Copyright 2016 Joyent, Inc.
  1100. // Copyright 2022 Oxide Computer Company
  1101. //
  1102. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1103. // Use is subject to license terms.
  1104. // Structure returned by gettimeofday(2) system call,
  1105. // and used in other calls.
  1106. type Timeval = struct {
  1107. Ftv_sec int64
  1108. Ftv_usec int64
  1109. } /* time.h:54:1 */
  1110. type Timezone = struct {
  1111. Ftz_minuteswest int32
  1112. Ftz_dsttime int32
  1113. } /* time.h:86:1 */
  1114. // Needed for longlong_t type. Placement of this due to <sys/types.h>
  1115. // including <sys/select.h> which relies on the presense of the itimerval
  1116. // structure.
  1117. // CDDL HEADER START
  1118. //
  1119. // The contents of this file are subject to the terms of the
  1120. // Common Development and Distribution License (the "License").
  1121. // You may not use this file except in compliance with the License.
  1122. //
  1123. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1124. // or http://www.opensolaris.org/os/licensing.
  1125. // See the License for the specific language governing permissions
  1126. // and limitations under the License.
  1127. //
  1128. // When distributing Covered Code, include this CDDL HEADER in each
  1129. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1130. // If applicable, add the following below this CDDL HEADER, with the
  1131. // fields enclosed by brackets "[]" replaced with your own identifying
  1132. // information: Portions Copyright [yyyy] [name of copyright owner]
  1133. //
  1134. // CDDL HEADER END
  1135. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  1136. // All Rights Reserved
  1137. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  1138. // Use is subject to license terms.
  1139. //
  1140. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  1141. // Copyright 2016 Joyent, Inc.
  1142. // Copyright 2021 Oxide Computer Company
  1143. // Operations on timevals.
  1144. // Names of the interval timers, and structure
  1145. // defining a timer setting.
  1146. // time and when system is running on
  1147. // behalf of the process.
  1148. // time profiling of multithreaded
  1149. // programs.
  1150. type Itimerval = struct {
  1151. Fit_interval struct {
  1152. Ftv_sec int64
  1153. Ftv_usec int64
  1154. }
  1155. Fit_value struct {
  1156. Ftv_sec int64
  1157. Ftv_usec int64
  1158. }
  1159. } /* time.h:209:1 */
  1160. // Definitions for commonly used resolutions.
  1161. // Time expressed as a 64-bit nanosecond counter.
  1162. type Hrtime_t = int64 /* time.h:265:20 */
  1163. // The inclusion of <time.h> is historical and was added for
  1164. // backward compatibility in delta 1.2 when a number of definitions
  1165. // were moved out of <sys/time.h>. More recently, the timespec and
  1166. // itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
  1167. // _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
  1168. // which is now included by <time.h>. This change was due to POSIX
  1169. // 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
  1170. // non-X/Open applications, including this header will still make
  1171. // visible these definitions.
  1172. // CDDL HEADER START
  1173. //
  1174. // The contents of this file are subject to the terms of the
  1175. // Common Development and Distribution License (the "License").
  1176. // You may not use this file except in compliance with the License.
  1177. //
  1178. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1179. // or http://www.opensolaris.org/os/licensing.
  1180. // See the License for the specific language governing permissions
  1181. // and limitations under the License.
  1182. //
  1183. // When distributing Covered Code, include this CDDL HEADER in each
  1184. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1185. // If applicable, add the following below this CDDL HEADER, with the
  1186. // fields enclosed by brackets "[]" replaced with your own identifying
  1187. // information: Portions Copyright [yyyy] [name of copyright owner]
  1188. //
  1189. // CDDL HEADER END
  1190. // Copyright (c) 1988 AT&T
  1191. // All Rights Reserved
  1192. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  1193. //
  1194. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  1195. // Use is subject to license terms.
  1196. // Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
  1197. // Copyright 2016 Joyent, Inc.
  1198. // The inclusion of <sys/select.h> is needed for the FD_CLR,
  1199. // FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
  1200. // select() prototype defined in the XOpen specifications
  1201. // beginning with XSH4v2. Placement required after definition
  1202. // for itimerval.
  1203. // CDDL HEADER START
  1204. //
  1205. // The contents of this file are subject to the terms of the
  1206. // Common Development and Distribution License (the "License").
  1207. // You may not use this file except in compliance with the License.
  1208. //
  1209. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1210. // or http://www.opensolaris.org/os/licensing.
  1211. // See the License for the specific language governing permissions
  1212. // and limitations under the License.
  1213. //
  1214. // When distributing Covered Code, include this CDDL HEADER in each
  1215. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1216. // If applicable, add the following below this CDDL HEADER, with the
  1217. // fields enclosed by brackets "[]" replaced with your own identifying
  1218. // information: Portions Copyright [yyyy] [name of copyright owner]
  1219. //
  1220. // CDDL HEADER END
  1221. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  1222. //
  1223. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  1224. //
  1225. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  1226. // Use is subject to license terms.
  1227. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  1228. // All Rights Reserved
  1229. // University Copyright- Copyright (c) 1982, 1986, 1988
  1230. // The Regents of the University of California
  1231. // All Rights Reserved
  1232. //
  1233. // University Acknowledgment- Portions of this document are derived from
  1234. // software developed by the University of California, Berkeley, and its
  1235. // contributors.
  1236. // The sigset_t type is defined in <sys/signal.h> and duplicated
  1237. // in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
  1238. // now allows the visibility of signal.h in this header, however
  1239. // an order of inclusion problem occurs as a result of inclusion
  1240. // of <sys/select.h> in <signal.h> under certain conditions.
  1241. // Rather than include <sys/signal.h> here, we've duplicated
  1242. // the sigset_t type instead. This type is required for the XPG6
  1243. // introduced pselect() function also declared in this header.
  1244. type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
  1245. // Select uses bit masks of file descriptors in longs.
  1246. // These macros manipulate such bit fields.
  1247. // FD_SETSIZE may be defined by the user, but the default here
  1248. // should be >= RLIM_FD_MAX.
  1249. type Fd_mask = int64 /* select.h:92:14 */
  1250. type Fds_mask = int64 /* select.h:94:14 */
  1251. // The value of _NBBY needs to be consistant with the value
  1252. // of NBBY in <sys/param.h>.
  1253. type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
  1254. // The value of _NBBY needs to be consistant with the value
  1255. // of NBBY in <sys/param.h>.
  1256. type Fd_set = Fd_set1 /* select.h:125:3 */
  1257. // Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
  1258. // definition of the sigevent structure. Both require the inclusion
  1259. // of <signal.h> and <time.h> when using the timer_create() function.
  1260. // However, X/Open also specifies that the sigevent structure be defined
  1261. // in <time.h> as described in the header <signal.h>. This prevents
  1262. // compiler warnings for applications that only include <time.h> and not
  1263. // also <signal.h>. The sigval union and the sigevent structure is
  1264. // therefore defined both here and in <sys/siginfo.h> which gets included
  1265. // via inclusion of <signal.h>.
  1266. type Sigval = struct {
  1267. F__ccgo_pad1 [0]uint64
  1268. Fsival_int int32
  1269. F__ccgo_pad2 [4]byte
  1270. } /* time.h:125:1 */
  1271. type Sigevent = struct {
  1272. Fsigev_notify int32
  1273. Fsigev_signo int32
  1274. Fsigev_value struct {
  1275. F__ccgo_pad1 [0]uint64
  1276. Fsival_int int32
  1277. F__ccgo_pad2 [4]byte
  1278. }
  1279. Fsigev_notify_function uintptr
  1280. Fsigev_notify_attributes uintptr
  1281. F__sigev_pad2 int32
  1282. F__ccgo_pad1 [4]byte
  1283. } /* time.h:133:1 */
  1284. type Locale_t = uintptr /* time.h:292:24 */
  1285. var _ int8 /* gen.c:2:13: */