pthread_illumos_amd64.go 124 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059
  1. // Code generated by 'ccgo pthread/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_illumos_amd64.go -pkgname pthread', DO NOT EDIT.
  2. package pthread
  3. import (
  4. "math"
  5. "reflect"
  6. "sync/atomic"
  7. "unsafe"
  8. )
  9. var _ = math.Pi
  10. var _ reflect.Kind
  11. var _ atomic.Value
  12. var _ unsafe.Pointer
  13. const (
  14. 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. PTHREAD_BARRIER_SERIAL_THREAD = -2 // pthread.h:149:1:
  43. PTHREAD_CANCEL_ASYNCHRONOUS = 0x02 // pthread.h:133:1:
  44. PTHREAD_CANCEL_DEFERRED = 0x00 // pthread.h:132:1:
  45. PTHREAD_CANCEL_DISABLE = 0x01 // pthread.h:131:1:
  46. PTHREAD_CANCEL_ENABLE = 0x00 // pthread.h:130:1:
  47. PTHREAD_CREATE_DETACHED = 0x40 // pthread.h:52:1:
  48. PTHREAD_CREATE_JOINABLE = 0 // pthread.h:53:1:
  49. PTHREAD_EXPLICIT_SCHED = 0 // pthread.h:63:1:
  50. PTHREAD_INHERIT_SCHED = 1 // pthread.h:62:1:
  51. PTHREAD_MAX_NAMELEN_NP = 32 // pthread.h:152:1:
  52. PTHREAD_MUTEX_DEFAULT = 0 // pthread.h:80:1:
  53. PTHREAD_MUTEX_ERRORCHECK = 0x2 // pthread.h:78:1:
  54. PTHREAD_MUTEX_NORMAL = 0x0 // pthread.h:77:1:
  55. PTHREAD_MUTEX_RECURSIVE = 0x4 // pthread.h:79:1:
  56. PTHREAD_MUTEX_ROBUST = 0x40 // pthread.h:94:1:
  57. PTHREAD_MUTEX_ROBUST_NP = 64 // pthread.h:100:1:
  58. PTHREAD_MUTEX_STALLED = 0x0 // pthread.h:93:1:
  59. PTHREAD_MUTEX_STALL_NP = 0 // pthread.h:99:1:
  60. PTHREAD_ONCE_DONE = 1 // pthread.h:138:1:
  61. PTHREAD_ONCE_NOTDONE = 0 // pthread.h:137:1:
  62. PTHREAD_PRIO_INHERIT = 0x10 // pthread.h:86:1:
  63. PTHREAD_PRIO_NONE = 0x0 // pthread.h:85:1:
  64. PTHREAD_PRIO_PROTECT = 0x20 // pthread.h:87:1:
  65. PTHREAD_PROCESS_PRIVATE = 0 // pthread.h:71:1:
  66. PTHREAD_PROCESS_SHARED = 1 // pthread.h:70:1:
  67. PTHREAD_SCOPE_PROCESS = 0 // pthread.h:56:1:
  68. PTHREAD_SCOPE_SYSTEM = 0x01 // pthread.h:55:1:
  69. P_MYID = -1 // types.h:632:1:
  70. REG_LABEL_BP = 2 // machtypes.h:44:1:
  71. REG_LABEL_MAX = 8 // machtypes.h:51:1:
  72. REG_LABEL_PC = 0 // machtypes.h:42:1:
  73. REG_LABEL_R12 = 4 // machtypes.h:47:1:
  74. REG_LABEL_R13 = 5 // machtypes.h:48:1:
  75. REG_LABEL_R14 = 6 // machtypes.h:49:1:
  76. REG_LABEL_R15 = 7 // machtypes.h:50:1:
  77. REG_LABEL_RBX = 3 // machtypes.h:46:1:
  78. REG_LABEL_SP = 1 // machtypes.h:43:1:
  79. SCHED_FIFO = 1 // sched.h:48:1:
  80. SCHED_FSS = 5 // sched.h:52:1:
  81. SCHED_FX = 6 // sched.h:53:1:
  82. SCHED_IA = 4 // sched.h:51:1:
  83. SCHED_OTHER = 0 // sched.h:47:1:
  84. SCHED_RR = 2 // sched.h:49:1:
  85. SCHED_SYS = 3 // sched.h:50:1:
  86. SEC = 1 // time.h:244:1:
  87. TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
  88. TIMER_RELTIME = 0x0 // time_impl.h:133:1:
  89. TIME_UTC = 0x1 // time.h:306:1:
  90. X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
  91. X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
  92. X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
  93. X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
  94. X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
  95. X_CLOCKID_T = 0 // types.h:568:1:
  96. X_CLOCK_T = 0 // types.h:563:1:
  97. X_COND_MAGIC = 0x4356 // types.h:426:1:
  98. X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
  99. X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
  100. X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
  101. X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
  102. X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
  103. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  104. X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
  105. X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
  106. X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
  107. X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
  108. X_IEEE_754 = 0 // isa_defs.h:246:1:
  109. X_INT64_TYPE = 0 // int_types.h:82:1:
  110. X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
  111. X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
  112. X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
  113. X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
  114. X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
  115. X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
  116. X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
  117. X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
  118. X_LOCALE_T = 0 // time.h:291:1:
  119. X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
  120. X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
  121. X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
  122. X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
  123. X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
  124. X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
  125. X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
  126. X_LP64 = 1 // <predefined>:286:1:
  127. X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
  128. X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
  129. X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
  130. X_NBBY = 8 // select.h:100:1:
  131. X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
  132. X_OFF_T = 0 // types.h:142:1:
  133. X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
  134. X_PSM_MODULES = 0 // isa_defs.h:284:1:
  135. X_PTHREAD_H = 0 // pthread.h:32:1:
  136. X_PTRDIFF_T = 0 // types.h:112:1:
  137. X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
  138. X_RTC_CONFIG = 0 // isa_defs.h:285:1:
  139. X_RWL_MAGIC = 0x5257 // types.h:427:1:
  140. X_SCHED_H = 0 // sched.h:30:1:
  141. X_SCHED_NEXT = 7 // sched.h:54:1:
  142. X_SEMA_MAGIC = 0x534d // types.h:425:1:
  143. X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
  144. X_SIGEVENT = 0 // time.h:132:1:
  145. X_SIGSET_T = 0 // select.h:73:1:
  146. X_SIGVAL = 0 // time.h:124:1:
  147. X_SIZE_T = 0 // types.h:540:1:
  148. X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
  149. X_SSIZE_T = 0 // types.h:549:1:
  150. X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
  151. X_STDC_C11 = 0 // feature_tests.h:165:1:
  152. X_STDC_C99 = 0 // feature_tests.h:169:1:
  153. X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
  154. X_SUSECONDS_T = 0 // types.h:343:1:
  155. X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
  156. X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
  157. X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
  158. X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
  159. X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
  160. X_SYS_NULL_H = 0 // null.h:17:1:
  161. X_SYS_SELECT_H = 0 // select.h:45:1:
  162. X_SYS_TIME_H = 0 // time.h:27:1:
  163. X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
  164. X_SYS_TYPES_H = 0 // types.h:35:1:
  165. X_TIMER_T = 0 // types.h:573:1:
  166. X_TIME_H = 0 // time.h:37:1:
  167. X_TIME_T = 0 // types.h:558:1:
  168. X_UID_T = 0 // types.h:400:1:
  169. X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
  170. Sun = 1 // <predefined>:172:1:
  171. Unix = 1 // <predefined>:175:1:
  172. )
  173. // used for block sizes
  174. // The boolean_t type has had a varied amount of exposure over the years in
  175. // terms of how its enumeration constants have been exposed. In particular, it
  176. // originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
  177. // B_TRUE and B_FALSE with an underscore. This check never included the
  178. // question of if we were in a strict ANSI C environment or whether extensions
  179. // were defined.
  180. //
  181. // Compilers such as clang started defaulting to always including an
  182. // XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
  183. // This would lead most software that had used the non-underscore versions to
  184. // need it. As such, we have adjusted the non-strict XOPEN environment to retain
  185. // its old behavior so as to minimize namespace pollution; however, we instead
  186. // include both variants of the definitions in the generally visible version
  187. // allowing software written in either world to hopefully end up in a good
  188. // place.
  189. //
  190. // This isn't perfect, but should hopefully minimize the pain for folks actually
  191. // trying to build software.
  192. const ( /* types.h:215:1: */
  193. B_FALSE = 0
  194. B_TRUE = 1
  195. X_B_FALSE = 0
  196. X_B_TRUE = 1
  197. )
  198. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  199. type Size_t = uint64 /* <builtin>:9:23 */
  200. type Wchar_t = int32 /* <builtin>:15:24 */
  201. type X__int128_t = struct {
  202. Flo int64
  203. Fhi int64
  204. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  205. type X__uint128_t = struct {
  206. Flo uint64
  207. Fhi uint64
  208. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  209. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  210. type X__float128 = float64 /* <builtin>:47:21 */
  211. // CDDL HEADER START
  212. //
  213. // The contents of this file are subject to the terms of the
  214. // Common Development and Distribution License (the "License").
  215. // You may not use this file except in compliance with the License.
  216. //
  217. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  218. // or http://www.opensolaris.org/os/licensing.
  219. // See the License for the specific language governing permissions
  220. // and limitations under the License.
  221. //
  222. // When distributing Covered Code, include this CDDL HEADER in each
  223. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  224. // If applicable, add the following below this CDDL HEADER, with the
  225. // fields enclosed by brackets "[]" replaced with your own identifying
  226. // information: Portions Copyright [yyyy] [name of copyright owner]
  227. //
  228. // CDDL HEADER END
  229. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  230. // Copyright 2018 Joyent, Inc.
  231. // Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
  232. //
  233. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  234. // Use is subject to license terms.
  235. // DO NOT EDIT THIS FILE.
  236. //
  237. // It has been auto-edited by fixincludes from:
  238. //
  239. // "/usr/include/sys/feature_tests.h"
  240. //
  241. // This had to be done to correct non-standard usages in the
  242. // original, manufacturer supplied header file.
  243. // CDDL HEADER START
  244. //
  245. // The contents of this file are subject to the terms of the
  246. // Common Development and Distribution License (the "License").
  247. // You may not use this file except in compliance with the License.
  248. //
  249. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  250. // or http://www.opensolaris.org/os/licensing.
  251. // See the License for the specific language governing permissions
  252. // and limitations under the License.
  253. //
  254. // When distributing Covered Code, include this CDDL HEADER in each
  255. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  256. // If applicable, add the following below this CDDL HEADER, with the
  257. // fields enclosed by brackets "[]" replaced with your own identifying
  258. // information: Portions Copyright [yyyy] [name of copyright owner]
  259. //
  260. // CDDL HEADER END
  261. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  262. // Copyright 2016 Joyent, Inc.
  263. // Copyright 2022 Oxide Computer Company
  264. //
  265. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  266. // Use is subject to license terms.
  267. // CDDL HEADER START
  268. //
  269. // The contents of this file are subject to the terms of the
  270. // Common Development and Distribution License, Version 1.0 only
  271. // (the "License"). You may not use this file except in compliance
  272. // with the License.
  273. //
  274. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  275. // or http://www.opensolaris.org/os/licensing.
  276. // See the License for the specific language governing permissions
  277. // and limitations under the License.
  278. //
  279. // When distributing Covered Code, include this CDDL HEADER in each
  280. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  281. // If applicable, add the following below this CDDL HEADER, with the
  282. // fields enclosed by brackets "[]" replaced with your own identifying
  283. // information: Portions Copyright [yyyy] [name of copyright owner]
  284. //
  285. // CDDL HEADER END
  286. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  287. // Use is subject to license terms.
  288. // Copyright 2015 EveryCity Ltd. All rights reserved.
  289. // Copyright 2019 Joyent, Inc.
  290. // This file contains definitions designed to enable different compilers
  291. // to be used harmoniously on Solaris systems.
  292. // Allow for version tests for compiler bugs and features.
  293. // analogous to lint's PRINTFLIKEn
  294. // Handle the kernel printf routines that can take '%b' too
  295. // This one's pretty obvious -- the function never returns
  296. // The function is 'extern inline' and expects GNU C89 behaviour, not C99
  297. // behaviour.
  298. //
  299. // Should only be used on 'extern inline' definitions for GCC.
  300. // The function has control flow such that it may return multiple times (in
  301. // the manner of setjmp or vfork)
  302. // This is an appropriate label for functions that do not
  303. // modify their arguments, e.g. strlen()
  304. // This is a stronger form of __pure__. Can be used for functions
  305. // that do not modify their arguments and don't depend on global
  306. // memory.
  307. // This attribute, attached to a variable, means that the variable is meant to
  308. // be possibly unused. GCC will not produce a warning for this variable.
  309. // Shorthand versions for readability
  310. // In release build, disable warnings about variables
  311. // which are used only for debugging.
  312. // CDDL HEADER START
  313. //
  314. // The contents of this file are subject to the terms of the
  315. // Common Development and Distribution License (the "License").
  316. // You may not use this file except in compliance with the License.
  317. //
  318. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  319. // or http://www.opensolaris.org/os/licensing.
  320. // See the License for the specific language governing permissions
  321. // and limitations under the License.
  322. //
  323. //
  324. // When distributing Covered Code, include this CDDL HEADER in each
  325. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  326. // If applicable, add the following below this CDDL HEADER, with the
  327. // fields enclosed by brackets "[]" replaced with your own identifying
  328. // information: Portions Copyright [yyyy] [name of copyright owner]
  329. //
  330. // CDDL HEADER END
  331. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  332. // Use is subject to license terms.
  333. // Copyright 2016 Joyent, Inc.
  334. // This header file serves to group a set of well known defines and to
  335. // set these for each instruction set architecture. These defines may
  336. // be divided into two groups; characteristics of the processor and
  337. // implementation choices for Solaris on a processor.
  338. //
  339. // Processor Characteristics:
  340. //
  341. // _LITTLE_ENDIAN / _BIG_ENDIAN:
  342. // The natural byte order of the processor. A pointer to an int points
  343. // to the least/most significant byte of that int.
  344. //
  345. // _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
  346. // The processor specific direction of stack growth. A push onto the
  347. // stack increases/decreases the stack pointer, so it stores data at
  348. // successively higher/lower addresses. (Stackless machines ignored
  349. // without regrets).
  350. //
  351. // _LONG_LONG_HTOL / _LONG_LONG_LTOH:
  352. // A pointer to a long long points to the most/least significant long
  353. // within that long long.
  354. //
  355. // _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
  356. // The C compiler assigns bit fields from the high/low to the low/high end
  357. // of an int (most to least significant vs. least to most significant).
  358. //
  359. // _IEEE_754:
  360. // The processor (or supported implementations of the processor)
  361. // supports the ieee-754 floating point standard. No other floating
  362. // point standards are supported (or significant). Any other supported
  363. // floating point formats are expected to be cased on the ISA processor
  364. // symbol.
  365. //
  366. // _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
  367. // The C Compiler implements objects of type `char' as `unsigned' or
  368. // `signed' respectively. This is really an implementation choice of
  369. // the compiler writer, but it is specified in the ABI and tends to
  370. // be uniform across compilers for an instruction set architecture.
  371. // Hence, it has the properties of a processor characteristic.
  372. //
  373. // _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
  374. // _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
  375. // _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
  376. // The ABI defines alignment requirements of each of the primitive
  377. // object types. Some, if not all, may be hardware requirements as
  378. // well. The values are expressed in "byte-alignment" units.
  379. //
  380. // _MAX_ALIGNMENT:
  381. // The most stringent alignment requirement as specified by the ABI.
  382. // Equal to the maximum of all the above _XXX_ALIGNMENT values.
  383. //
  384. // _MAX_ALIGNMENT_TYPE:
  385. // The name of the C type that has the value descried in _MAX_ALIGNMENT.
  386. //
  387. // _ALIGNMENT_REQUIRED:
  388. // True or false (1 or 0) whether or not the hardware requires the ABI
  389. // alignment.
  390. //
  391. // _LONG_LONG_ALIGNMENT_32
  392. // The 32-bit ABI supported by a 64-bit kernel may have different
  393. // alignment requirements for primitive object types. The value of this
  394. // identifier is expressed in "byte-alignment" units.
  395. //
  396. // _HAVE_CPUID_INSN
  397. // This indicates that the architecture supports the 'cpuid'
  398. // instruction as defined by Intel. (Intel allows other vendors
  399. // to extend the instruction for their own purposes.)
  400. //
  401. //
  402. // Implementation Choices:
  403. //
  404. // _ILP32 / _LP64:
  405. // This specifies the compiler data type implementation as specified in
  406. // the relevant ABI. The choice between these is strongly influenced
  407. // by the underlying hardware, but is not absolutely tied to it.
  408. // Currently only two data type models are supported:
  409. //
  410. // _ILP32:
  411. // Int/Long/Pointer are 32 bits. This is the historical UNIX
  412. // and Solaris implementation. Due to its historical standing,
  413. // this is the default case.
  414. //
  415. // _LP64:
  416. // Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
  417. // implementation for 64-bit ABIs such as SPARC V9.
  418. //
  419. // _I32LPx:
  420. // A compilation environment where 'int' is 32-bit, and
  421. // longs and pointers are simply the same size.
  422. //
  423. // In all cases, Char is 8 bits and Short is 16 bits.
  424. //
  425. // _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
  426. // This specifies the form of the disk VTOC (or label):
  427. //
  428. // _SUNOS_VTOC_8:
  429. // This is a VTOC form which is upwardly compatible with the
  430. // SunOS 4.x disk label and allows 8 partitions per disk.
  431. //
  432. // _SUNOS_VTOC_16:
  433. // In this format the incore vtoc image matches the ondisk
  434. // version. It allows 16 slices per disk, and is not
  435. // compatible with the SunOS 4.x disk label.
  436. //
  437. // Note that these are not the only two VTOC forms possible and
  438. // additional forms may be added. One possible form would be the
  439. // SVr4 VTOC form. The symbol for that is reserved now, although
  440. // it is not implemented.
  441. //
  442. // _SVR4_VTOC_16:
  443. // This VTOC form is compatible with the System V Release 4
  444. // VTOC (as implemented on the SVr4 Intel and 3b ports) with
  445. // 16 partitions per disk.
  446. //
  447. //
  448. // _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
  449. // This describes the type of addresses used by system DMA:
  450. //
  451. // _DMA_USES_PHYSADDR:
  452. // This type of DMA, used in the x86 implementation,
  453. // requires physical addresses for DMA buffers. The 24-bit
  454. // addresses used by some legacy boards is the source of the
  455. // "low-memory" (<16MB) requirement for some devices using DMA.
  456. //
  457. // _DMA_USES_VIRTADDR:
  458. // This method of DMA allows the use of virtual addresses for
  459. // DMA transfers.
  460. //
  461. // _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
  462. // This indicates the presence/absence of an fdisk table.
  463. //
  464. // _FIRMWARE_NEEDS_FDISK
  465. // The fdisk table is required by system firmware. If present,
  466. // it allows a disk to be subdivided into multiple fdisk
  467. // partitions, each of which is equivalent to a separate,
  468. // virtual disk. This enables the co-existence of multiple
  469. // operating systems on a shared hard disk.
  470. //
  471. // _NO_FDISK_PRESENT
  472. // If the fdisk table is absent, it is assumed that the entire
  473. // media is allocated for a single operating system.
  474. //
  475. // _HAVE_TEM_FIRMWARE
  476. // Defined if this architecture has the (fallback) option of
  477. // using prom_* calls for doing I/O if a suitable kernel driver
  478. // is not available to do it.
  479. //
  480. // _DONT_USE_1275_GENERIC_NAMES
  481. // Controls whether or not device tree node names should
  482. // comply with the IEEE 1275 "Generic Names" Recommended
  483. // Practice. With _DONT_USE_GENERIC_NAMES, device-specific
  484. // names identifying the particular device will be used.
  485. //
  486. // __i386_COMPAT
  487. // This indicates whether the i386 ABI is supported as a *non-native*
  488. // mode for the platform. When this symbol is defined:
  489. // - 32-bit xstat-style system calls are enabled
  490. // - 32-bit xmknod-style system calls are enabled
  491. // - 32-bit system calls use i386 sizes -and- alignments
  492. //
  493. // Note that this is NOT defined for the i386 native environment!
  494. //
  495. // __x86
  496. // This is ONLY a synonym for defined(__i386) || defined(__amd64)
  497. // which is useful only insofar as these two architectures share
  498. // common attributes. Analogous to __sparc.
  499. //
  500. // _PSM_MODULES
  501. // This indicates whether or not the implementation uses PSM
  502. // modules for processor support, reading /etc/mach from inside
  503. // the kernel to extract a list.
  504. //
  505. // _RTC_CONFIG
  506. // This indicates whether or not the implementation uses /etc/rtc_config
  507. // to configure the real-time clock in the kernel.
  508. //
  509. // _UNIX_KRTLD
  510. // This indicates that the implementation uses a dynamically
  511. // linked unix + krtld to form the core kernel image at boot
  512. // time, or (in the absence of this symbol) a prelinked kernel image.
  513. //
  514. // _OBP
  515. // This indicates the firmware interface is OBP.
  516. //
  517. // _SOFT_HOSTID
  518. // This indicates that the implementation obtains the hostid
  519. // from the file /etc/hostid, rather than from hardware.
  520. // The following set of definitions characterize Solaris on AMD's
  521. // 64-bit systems.
  522. // Define the appropriate "processor characteristics"
  523. // Different alignment constraints for the i386 ABI in compatibility mode
  524. // Define the appropriate "implementation choices".
  525. // The feature test macro __i386 is generic for all processors implementing
  526. // the Intel 386 instruction set or a superset of it. Specifically, this
  527. // includes all members of the 386, 486, and Pentium family of processors.
  528. // Values of _POSIX_C_SOURCE
  529. //
  530. // undefined not a POSIX compilation
  531. // 1 POSIX.1-1990 compilation
  532. // 2 POSIX.2-1992 compilation
  533. // 199309L POSIX.1b-1993 compilation (Real Time)
  534. // 199506L POSIX.1c-1995 compilation (POSIX Threads)
  535. // 200112L POSIX.1-2001 compilation (Austin Group Revision)
  536. // 200809L POSIX.1-2008 compilation
  537. // The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
  538. // and _STDC_C99 are Sun implementation specific macros created in order to
  539. // compress common standards specified feature test macros for easier reading.
  540. // These macros should not be used by the application developer as
  541. // unexpected results may occur. Instead, the user should reference
  542. // standards(7) for correct usage of the standards feature test macros.
  543. //
  544. // __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
  545. // X/Open or POSIX or in the negative, when neither
  546. // X/Open or POSIX defines a symbol.
  547. //
  548. // _STRICT_STDC __STDC__ is specified by the C Standards and defined
  549. // by the compiler. For Sun compilers the value of
  550. // __STDC__ is either 1, 0, or not defined based on the
  551. // compilation mode (see cc(1)). When the value of
  552. // __STDC__ is 1 and in the absence of any other feature
  553. // test macros, the namespace available to the application
  554. // is limited to only those symbols defined by the C
  555. // Standard. _STRICT_STDC provides a more readable means
  556. // of identifying symbols defined by the standard, or in
  557. // the negative, symbols that are extensions to the C
  558. // Standard. See additional comments for GNU C differences.
  559. //
  560. // _STDC_C99 __STDC_VERSION__ is specified by the C standards and
  561. // defined by the compiler and indicates the version of
  562. // the C standard. A value of 199901L indicates a
  563. // compiler that complies with ISO/IEC 9899:1999, other-
  564. // wise known as the C99 standard.
  565. //
  566. // _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
  567. // is 201112L indicating a compiler that compiles with
  568. // ISO/IEC 9899:2011, otherwise known as the C11 standard.
  569. //
  570. // _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
  571. // by the standards, and the user has not explicitly
  572. // relaxed the strictness via __EXTENSIONS__.
  573. // ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
  574. // 99899:2011 specify the following predefined macro name:
  575. //
  576. // __STDC__ The integer constant 1, intended to indicate a conforming
  577. // implementation.
  578. //
  579. // Furthermore, a strictly conforming program shall use only those features
  580. // of the language and library specified in these standards. A conforming
  581. // implementation shall accept any strictly conforming program.
  582. //
  583. // Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
  584. // strictly conforming environments and __STDC__ to 0 for environments that
  585. // use ANSI C semantics but allow extensions to the C standard. For non-ANSI
  586. // C semantics, Sun's C compiler does not define __STDC__.
  587. //
  588. // The GNU C project interpretation is that __STDC__ should always be defined
  589. // to 1 for compilation modes that accept ANSI C syntax regardless of whether
  590. // or not extensions to the C standard are used. Violations of conforming
  591. // behavior are conditionally flagged as warnings via the use of the
  592. // -pedantic option. In addition to defining __STDC__ to 1, the GNU C
  593. // compiler also defines __STRICT_ANSI__ as a means of specifying strictly
  594. // conforming environments using the -ansi or -std=<standard> options.
  595. //
  596. // In the absence of any other compiler options, Sun and GNU set the value
  597. // of __STDC__ as follows when using the following options:
  598. //
  599. // Value of __STDC__ __STRICT_ANSI__
  600. //
  601. // cc -Xa (default) 0 undefined
  602. // cc -Xt (transitional) 0 undefined
  603. // cc -Xc (strictly conforming) 1 undefined
  604. // cc -Xs (K&R C) undefined undefined
  605. //
  606. // gcc (default) 1 undefined
  607. // gcc -ansi, -std={c89, c99,...) 1 defined
  608. // gcc -traditional (K&R) undefined undefined
  609. //
  610. // The default compilation modes for Sun C compilers versus GNU C compilers
  611. // results in a differing value for __STDC__ which results in a more
  612. // restricted namespace when using Sun compilers. To allow both GNU and Sun
  613. // interpretations to peacefully co-exist, we use the following Sun
  614. // implementation _STRICT_STDC_ macro:
  615. // Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
  616. // Use strict symbol visibility.
  617. // This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
  618. // governed by POSIX, but have not been governed by ISO C. One can go two ways
  619. // on what should happen if an application actively includes (not transitively)
  620. // a header that isn't part of the ISO C spec, we opt to say that if someone has
  621. // gone out of there way then they're doing it for a reason and that is an act
  622. // of non-compliance and therefore it's not up to us to hide away every symbol.
  623. //
  624. // In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
  625. // cases where in the past we have only used a POSIX related check and we don't
  626. // wish to make something stricter. Often applications are relying on the
  627. // ability to, or more realistically unwittingly, have _STRICT_STDC declared and
  628. // still use these interfaces.
  629. // Large file interfaces:
  630. //
  631. // _LARGEFILE_SOURCE
  632. // 1 large file-related additions to POSIX
  633. // interfaces requested (fseeko, etc.)
  634. // _LARGEFILE64_SOURCE
  635. // 1 transitional large-file-related interfaces
  636. // requested (seek64, stat64, etc.)
  637. //
  638. // The corresponding announcement macros are respectively:
  639. // _LFS_LARGEFILE
  640. // _LFS64_LARGEFILE
  641. // (These are set in <unistd.h>.)
  642. //
  643. // Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
  644. // well.
  645. //
  646. // The large file interfaces are made visible regardless of the initial values
  647. // of the feature test macros under certain circumstances:
  648. // - If no explicit standards-conforming environment is requested (neither
  649. // of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
  650. // __STDC__ does not imply standards conformance).
  651. // - Extended system interfaces are explicitly requested (__EXTENSIONS__
  652. // is defined).
  653. // - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
  654. // defined). (Note that this dependency is an artifact of the current
  655. // kernel implementation and may change in future releases.)
  656. // Large file compilation environment control:
  657. //
  658. // The setting of _FILE_OFFSET_BITS controls the size of various file-related
  659. // types and governs the mapping between file-related source function symbol
  660. // names and the corresponding binary entry points.
  661. //
  662. // In the 32-bit environment, the default value is 32; if not set, set it to
  663. // the default here, to simplify tests in other headers.
  664. //
  665. // In the 64-bit compilation environment, the only value allowed is 64.
  666. // Use of _XOPEN_SOURCE
  667. //
  668. // The following X/Open specifications are supported:
  669. //
  670. // X/Open Portability Guide, Issue 3 (XPG3)
  671. // X/Open CAE Specification, Issue 4 (XPG4)
  672. // X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
  673. // X/Open CAE Specification, Issue 5 (XPG5)
  674. // Open Group Technical Standard, Issue 6 (XPG6), also referred to as
  675. // IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
  676. // Open Group Technical Standard, Issue 7 (XPG7), also referred to as
  677. // IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
  678. //
  679. // XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
  680. // XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
  681. // Version 2 (SUSv2)
  682. // XPG6 is the result of a merge of the X/Open and POSIX specifications
  683. // and as such is also referred to as IEEE Std. 1003.1-2001 in
  684. // addition to UNIX 03 and SUSv3.
  685. // XPG7 is also referred to as UNIX 08 and SUSv4.
  686. //
  687. // When writing a conforming X/Open application, as per the specification
  688. // requirements, the appropriate feature test macros must be defined at
  689. // compile time. These are as follows. For more info, see standards(7).
  690. //
  691. // Feature Test Macro Specification
  692. // ------------------------------------------------ -------------
  693. // _XOPEN_SOURCE XPG3
  694. // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
  695. // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
  696. // _XOPEN_SOURCE = 500 XPG5
  697. // _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
  698. // _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
  699. //
  700. // In order to simplify the guards within the headers, the following
  701. // implementation private test macros have been created. Applications
  702. // must NOT use these private test macros as unexpected results will
  703. // occur.
  704. //
  705. // Note that in general, the use of these private macros is cumulative.
  706. // For example, the use of _XPG3 with no other restrictions on the X/Open
  707. // namespace will make the symbols visible for XPG3 through XPG6
  708. // compilation environments. The use of _XPG4_2 with no other X/Open
  709. // namespace restrictions indicates that the symbols were introduced in
  710. // XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
  711. // environments, but not for XPG3 or XPG4 compilation environments.
  712. //
  713. // _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
  714. // _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
  715. // _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
  716. // _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
  717. // _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
  718. // _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
  719. // X/Open Portability Guide, Issue 3
  720. // _XOPEN_VERSION is defined by the X/Open specifications and is not
  721. // normally defined by the application, except in the case of an XPG4
  722. // application. On the implementation side, _XOPEN_VERSION defined with
  723. // the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
  724. // with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
  725. // _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
  726. // application and with a value of 600 indicates an XPG6 (UNIX 03)
  727. // application and with a value of 700 indicates an XPG7 (UNIX 08).
  728. // The appropriate version is determined by the use of the
  729. // feature test macros described earlier. The value of _XOPEN_VERSION
  730. // defaults to 3 otherwise indicating support for XPG3 applications.
  731. // ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
  732. // conforming environments. ISO 9899:1999 says it does.
  733. //
  734. // The presence of _LONGLONG_TYPE says "long long exists" which is therefore
  735. // defined in all but strictly conforming environments that disallow it.
  736. // The following macro defines a value for the ISO C99 restrict
  737. // keyword so that _RESTRICT_KYWD resolves to "restrict" if
  738. // an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
  739. // if any other compiler is used. This allows for the use of single
  740. // prototype declarations regardless of compiler version.
  741. // The following macro defines a value for the ISO C11 _Noreturn
  742. // keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
  743. // an ISO C11 compiler is used and "" (null string) if any other
  744. // compiler is used. This allows for the use of single prototype
  745. // declarations regardless of compiler version.
  746. // ISO/IEC 9899:2011 Annex K
  747. // The following macro indicates header support for the ANSI C++
  748. // standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
  749. // The following macro indicates header support for the C99 standard,
  750. // ISO/IEC 9899:1999, Programming Languages - C.
  751. // The following macro indicates header support for the C11 standard,
  752. // ISO/IEC 9899:2011, Programming Languages - C.
  753. // The following macro indicates header support for the C11 standard,
  754. // ISO/IEC 9899:2011 Annex K, Programming Languages - C.
  755. // The following macro indicates header support for DTrace. The value is an
  756. // integer that corresponds to the major version number for DTrace.
  757. // CDDL HEADER START
  758. //
  759. // The contents of this file are subject to the terms of the
  760. // Common Development and Distribution License (the "License").
  761. // You may not use this file except in compliance with the License.
  762. //
  763. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  764. // or http://www.opensolaris.org/os/licensing.
  765. // See the License for the specific language governing permissions
  766. // and limitations under the License.
  767. //
  768. // When distributing Covered Code, include this CDDL HEADER in each
  769. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  770. // If applicable, add the following below this CDDL HEADER, with the
  771. // fields enclosed by brackets "[]" replaced with your own identifying
  772. // information: Portions Copyright [yyyy] [name of copyright owner]
  773. //
  774. // CDDL HEADER END
  775. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  776. // All Rights Reserved
  777. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  778. // Use is subject to license terms.
  779. //
  780. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  781. // Copyright 2016 Joyent, Inc.
  782. // Copyright 2021 Oxide Computer Company
  783. // DO NOT EDIT THIS FILE.
  784. //
  785. // It has been auto-edited by fixincludes from:
  786. //
  787. // "/usr/include/sys/feature_tests.h"
  788. //
  789. // This had to be done to correct non-standard usages in the
  790. // original, manufacturer supplied header file.
  791. // CDDL HEADER START
  792. //
  793. // The contents of this file are subject to the terms of the
  794. // Common Development and Distribution License (the "License").
  795. // You may not use this file except in compliance with the License.
  796. //
  797. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  798. // or http://www.opensolaris.org/os/licensing.
  799. // See the License for the specific language governing permissions
  800. // and limitations under the License.
  801. //
  802. // When distributing Covered Code, include this CDDL HEADER in each
  803. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  804. // If applicable, add the following below this CDDL HEADER, with the
  805. // fields enclosed by brackets "[]" replaced with your own identifying
  806. // information: Portions Copyright [yyyy] [name of copyright owner]
  807. //
  808. // CDDL HEADER END
  809. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  810. // Copyright 2016 Joyent, Inc.
  811. // Copyright 2022 Oxide Computer Company
  812. //
  813. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  814. // Use is subject to license terms.
  815. // CDDL HEADER START
  816. //
  817. // The contents of this file are subject to the terms of the
  818. // Common Development and Distribution License (the "License").
  819. // You may not use this file except in compliance with the License.
  820. //
  821. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  822. // or http://www.opensolaris.org/os/licensing.
  823. // See the License for the specific language governing permissions
  824. // and limitations under the License.
  825. //
  826. //
  827. // When distributing Covered Code, include this CDDL HEADER in each
  828. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  829. // If applicable, add the following below this CDDL HEADER, with the
  830. // fields enclosed by brackets "[]" replaced with your own identifying
  831. // information: Portions Copyright [yyyy] [name of copyright owner]
  832. //
  833. // CDDL HEADER END
  834. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  835. // Use is subject to license terms.
  836. // Copyright 2016 Joyent, Inc.
  837. // Machine dependent definitions moved to <sys/machtypes.h>.
  838. // CDDL HEADER START
  839. //
  840. // The contents of this file are subject to the terms of the
  841. // Common Development and Distribution License (the "License").
  842. // You may not use this file except in compliance with the License.
  843. //
  844. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  845. // or http://www.opensolaris.org/os/licensing.
  846. // See the License for the specific language governing permissions
  847. // and limitations under the License.
  848. //
  849. // When distributing Covered Code, include this CDDL HEADER in each
  850. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  851. // If applicable, add the following below this CDDL HEADER, with the
  852. // fields enclosed by brackets "[]" replaced with your own identifying
  853. // information: Portions Copyright [yyyy] [name of copyright owner]
  854. //
  855. // CDDL HEADER END
  856. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  857. // Use is subject to license terms.
  858. // Machine dependent types:
  859. //
  860. // intel ia32 Version
  861. type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
  862. // CDDL HEADER START
  863. //
  864. // The contents of this file are subject to the terms of the
  865. // Common Development and Distribution License (the "License").
  866. // You may not use this file except in compliance with the License.
  867. //
  868. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  869. // or http://www.opensolaris.org/os/licensing.
  870. // See the License for the specific language governing permissions
  871. // and limitations under the License.
  872. //
  873. // When distributing Covered Code, include this CDDL HEADER in each
  874. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  875. // If applicable, add the following below this CDDL HEADER, with the
  876. // fields enclosed by brackets "[]" replaced with your own identifying
  877. // information: Portions Copyright [yyyy] [name of copyright owner]
  878. //
  879. // CDDL HEADER END
  880. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  881. // Copyright 2018 Joyent, Inc.
  882. // Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
  883. //
  884. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  885. // Use is subject to license terms.
  886. // DO NOT EDIT THIS FILE.
  887. //
  888. // It has been auto-edited by fixincludes from:
  889. //
  890. // "/usr/include/sys/feature_tests.h"
  891. //
  892. // This had to be done to correct non-standard usages in the
  893. // original, manufacturer supplied header file.
  894. // CDDL HEADER START
  895. //
  896. // The contents of this file are subject to the terms of the
  897. // Common Development and Distribution License (the "License").
  898. // You may not use this file except in compliance with the License.
  899. //
  900. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  901. // or http://www.opensolaris.org/os/licensing.
  902. // See the License for the specific language governing permissions
  903. // and limitations under the License.
  904. //
  905. // When distributing Covered Code, include this CDDL HEADER in each
  906. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  907. // If applicable, add the following below this CDDL HEADER, with the
  908. // fields enclosed by brackets "[]" replaced with your own identifying
  909. // information: Portions Copyright [yyyy] [name of copyright owner]
  910. //
  911. // CDDL HEADER END
  912. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  913. // Copyright 2016 Joyent, Inc.
  914. // Copyright 2022 Oxide Computer Company
  915. //
  916. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  917. // Use is subject to license terms.
  918. // CDDL HEADER START
  919. //
  920. // The contents of this file are subject to the terms of the
  921. // Common Development and Distribution License, Version 1.0 only
  922. // (the "License"). You may not use this file except in compliance
  923. // with the License.
  924. //
  925. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  926. // or http://www.opensolaris.org/os/licensing.
  927. // See the License for the specific language governing permissions
  928. // and limitations under the License.
  929. //
  930. // When distributing Covered Code, include this CDDL HEADER in each
  931. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  932. // If applicable, add the following below this CDDL HEADER, with the
  933. // fields enclosed by brackets "[]" replaced with your own identifying
  934. // information: Portions Copyright [yyyy] [name of copyright owner]
  935. //
  936. // CDDL HEADER END
  937. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  938. // Use is subject to license terms.
  939. // Copyright 2015 EveryCity Ltd. All rights reserved.
  940. // Copyright 2019 Joyent, Inc.
  941. // This file contains definitions designed to enable different compilers
  942. // to be used harmoniously on Solaris systems.
  943. // Allow for version tests for compiler bugs and features.
  944. // analogous to lint's PRINTFLIKEn
  945. // Handle the kernel printf routines that can take '%b' too
  946. // This one's pretty obvious -- the function never returns
  947. // The function is 'extern inline' and expects GNU C89 behaviour, not C99
  948. // behaviour.
  949. //
  950. // Should only be used on 'extern inline' definitions for GCC.
  951. // The function has control flow such that it may return multiple times (in
  952. // the manner of setjmp or vfork)
  953. // This is an appropriate label for functions that do not
  954. // modify their arguments, e.g. strlen()
  955. // This is a stronger form of __pure__. Can be used for functions
  956. // that do not modify their arguments and don't depend on global
  957. // memory.
  958. // This attribute, attached to a variable, means that the variable is meant to
  959. // be possibly unused. GCC will not produce a warning for this variable.
  960. // Shorthand versions for readability
  961. // In release build, disable warnings about variables
  962. // which are used only for debugging.
  963. // CDDL HEADER START
  964. //
  965. // The contents of this file are subject to the terms of the
  966. // Common Development and Distribution License (the "License").
  967. // You may not use this file except in compliance with the License.
  968. //
  969. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  970. // or http://www.opensolaris.org/os/licensing.
  971. // See the License for the specific language governing permissions
  972. // and limitations under the License.
  973. //
  974. //
  975. // When distributing Covered Code, include this CDDL HEADER in each
  976. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  977. // If applicable, add the following below this CDDL HEADER, with the
  978. // fields enclosed by brackets "[]" replaced with your own identifying
  979. // information: Portions Copyright [yyyy] [name of copyright owner]
  980. //
  981. // CDDL HEADER END
  982. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  983. // Use is subject to license terms.
  984. // Copyright 2016 Joyent, Inc.
  985. // This header file serves to group a set of well known defines and to
  986. // set these for each instruction set architecture. These defines may
  987. // be divided into two groups; characteristics of the processor and
  988. // implementation choices for Solaris on a processor.
  989. //
  990. // Processor Characteristics:
  991. //
  992. // _LITTLE_ENDIAN / _BIG_ENDIAN:
  993. // The natural byte order of the processor. A pointer to an int points
  994. // to the least/most significant byte of that int.
  995. //
  996. // _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
  997. // The processor specific direction of stack growth. A push onto the
  998. // stack increases/decreases the stack pointer, so it stores data at
  999. // successively higher/lower addresses. (Stackless machines ignored
  1000. // without regrets).
  1001. //
  1002. // _LONG_LONG_HTOL / _LONG_LONG_LTOH:
  1003. // A pointer to a long long points to the most/least significant long
  1004. // within that long long.
  1005. //
  1006. // _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
  1007. // The C compiler assigns bit fields from the high/low to the low/high end
  1008. // of an int (most to least significant vs. least to most significant).
  1009. //
  1010. // _IEEE_754:
  1011. // The processor (or supported implementations of the processor)
  1012. // supports the ieee-754 floating point standard. No other floating
  1013. // point standards are supported (or significant). Any other supported
  1014. // floating point formats are expected to be cased on the ISA processor
  1015. // symbol.
  1016. //
  1017. // _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
  1018. // The C Compiler implements objects of type `char' as `unsigned' or
  1019. // `signed' respectively. This is really an implementation choice of
  1020. // the compiler writer, but it is specified in the ABI and tends to
  1021. // be uniform across compilers for an instruction set architecture.
  1022. // Hence, it has the properties of a processor characteristic.
  1023. //
  1024. // _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
  1025. // _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
  1026. // _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
  1027. // The ABI defines alignment requirements of each of the primitive
  1028. // object types. Some, if not all, may be hardware requirements as
  1029. // well. The values are expressed in "byte-alignment" units.
  1030. //
  1031. // _MAX_ALIGNMENT:
  1032. // The most stringent alignment requirement as specified by the ABI.
  1033. // Equal to the maximum of all the above _XXX_ALIGNMENT values.
  1034. //
  1035. // _MAX_ALIGNMENT_TYPE:
  1036. // The name of the C type that has the value descried in _MAX_ALIGNMENT.
  1037. //
  1038. // _ALIGNMENT_REQUIRED:
  1039. // True or false (1 or 0) whether or not the hardware requires the ABI
  1040. // alignment.
  1041. //
  1042. // _LONG_LONG_ALIGNMENT_32
  1043. // The 32-bit ABI supported by a 64-bit kernel may have different
  1044. // alignment requirements for primitive object types. The value of this
  1045. // identifier is expressed in "byte-alignment" units.
  1046. //
  1047. // _HAVE_CPUID_INSN
  1048. // This indicates that the architecture supports the 'cpuid'
  1049. // instruction as defined by Intel. (Intel allows other vendors
  1050. // to extend the instruction for their own purposes.)
  1051. //
  1052. //
  1053. // Implementation Choices:
  1054. //
  1055. // _ILP32 / _LP64:
  1056. // This specifies the compiler data type implementation as specified in
  1057. // the relevant ABI. The choice between these is strongly influenced
  1058. // by the underlying hardware, but is not absolutely tied to it.
  1059. // Currently only two data type models are supported:
  1060. //
  1061. // _ILP32:
  1062. // Int/Long/Pointer are 32 bits. This is the historical UNIX
  1063. // and Solaris implementation. Due to its historical standing,
  1064. // this is the default case.
  1065. //
  1066. // _LP64:
  1067. // Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
  1068. // implementation for 64-bit ABIs such as SPARC V9.
  1069. //
  1070. // _I32LPx:
  1071. // A compilation environment where 'int' is 32-bit, and
  1072. // longs and pointers are simply the same size.
  1073. //
  1074. // In all cases, Char is 8 bits and Short is 16 bits.
  1075. //
  1076. // _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
  1077. // This specifies the form of the disk VTOC (or label):
  1078. //
  1079. // _SUNOS_VTOC_8:
  1080. // This is a VTOC form which is upwardly compatible with the
  1081. // SunOS 4.x disk label and allows 8 partitions per disk.
  1082. //
  1083. // _SUNOS_VTOC_16:
  1084. // In this format the incore vtoc image matches the ondisk
  1085. // version. It allows 16 slices per disk, and is not
  1086. // compatible with the SunOS 4.x disk label.
  1087. //
  1088. // Note that these are not the only two VTOC forms possible and
  1089. // additional forms may be added. One possible form would be the
  1090. // SVr4 VTOC form. The symbol for that is reserved now, although
  1091. // it is not implemented.
  1092. //
  1093. // _SVR4_VTOC_16:
  1094. // This VTOC form is compatible with the System V Release 4
  1095. // VTOC (as implemented on the SVr4 Intel and 3b ports) with
  1096. // 16 partitions per disk.
  1097. //
  1098. //
  1099. // _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
  1100. // This describes the type of addresses used by system DMA:
  1101. //
  1102. // _DMA_USES_PHYSADDR:
  1103. // This type of DMA, used in the x86 implementation,
  1104. // requires physical addresses for DMA buffers. The 24-bit
  1105. // addresses used by some legacy boards is the source of the
  1106. // "low-memory" (<16MB) requirement for some devices using DMA.
  1107. //
  1108. // _DMA_USES_VIRTADDR:
  1109. // This method of DMA allows the use of virtual addresses for
  1110. // DMA transfers.
  1111. //
  1112. // _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
  1113. // This indicates the presence/absence of an fdisk table.
  1114. //
  1115. // _FIRMWARE_NEEDS_FDISK
  1116. // The fdisk table is required by system firmware. If present,
  1117. // it allows a disk to be subdivided into multiple fdisk
  1118. // partitions, each of which is equivalent to a separate,
  1119. // virtual disk. This enables the co-existence of multiple
  1120. // operating systems on a shared hard disk.
  1121. //
  1122. // _NO_FDISK_PRESENT
  1123. // If the fdisk table is absent, it is assumed that the entire
  1124. // media is allocated for a single operating system.
  1125. //
  1126. // _HAVE_TEM_FIRMWARE
  1127. // Defined if this architecture has the (fallback) option of
  1128. // using prom_* calls for doing I/O if a suitable kernel driver
  1129. // is not available to do it.
  1130. //
  1131. // _DONT_USE_1275_GENERIC_NAMES
  1132. // Controls whether or not device tree node names should
  1133. // comply with the IEEE 1275 "Generic Names" Recommended
  1134. // Practice. With _DONT_USE_GENERIC_NAMES, device-specific
  1135. // names identifying the particular device will be used.
  1136. //
  1137. // __i386_COMPAT
  1138. // This indicates whether the i386 ABI is supported as a *non-native*
  1139. // mode for the platform. When this symbol is defined:
  1140. // - 32-bit xstat-style system calls are enabled
  1141. // - 32-bit xmknod-style system calls are enabled
  1142. // - 32-bit system calls use i386 sizes -and- alignments
  1143. //
  1144. // Note that this is NOT defined for the i386 native environment!
  1145. //
  1146. // __x86
  1147. // This is ONLY a synonym for defined(__i386) || defined(__amd64)
  1148. // which is useful only insofar as these two architectures share
  1149. // common attributes. Analogous to __sparc.
  1150. //
  1151. // _PSM_MODULES
  1152. // This indicates whether or not the implementation uses PSM
  1153. // modules for processor support, reading /etc/mach from inside
  1154. // the kernel to extract a list.
  1155. //
  1156. // _RTC_CONFIG
  1157. // This indicates whether or not the implementation uses /etc/rtc_config
  1158. // to configure the real-time clock in the kernel.
  1159. //
  1160. // _UNIX_KRTLD
  1161. // This indicates that the implementation uses a dynamically
  1162. // linked unix + krtld to form the core kernel image at boot
  1163. // time, or (in the absence of this symbol) a prelinked kernel image.
  1164. //
  1165. // _OBP
  1166. // This indicates the firmware interface is OBP.
  1167. //
  1168. // _SOFT_HOSTID
  1169. // This indicates that the implementation obtains the hostid
  1170. // from the file /etc/hostid, rather than from hardware.
  1171. // The following set of definitions characterize Solaris on AMD's
  1172. // 64-bit systems.
  1173. // Define the appropriate "processor characteristics"
  1174. // Different alignment constraints for the i386 ABI in compatibility mode
  1175. // Define the appropriate "implementation choices".
  1176. // The feature test macro __i386 is generic for all processors implementing
  1177. // the Intel 386 instruction set or a superset of it. Specifically, this
  1178. // includes all members of the 386, 486, and Pentium family of processors.
  1179. // Values of _POSIX_C_SOURCE
  1180. //
  1181. // undefined not a POSIX compilation
  1182. // 1 POSIX.1-1990 compilation
  1183. // 2 POSIX.2-1992 compilation
  1184. // 199309L POSIX.1b-1993 compilation (Real Time)
  1185. // 199506L POSIX.1c-1995 compilation (POSIX Threads)
  1186. // 200112L POSIX.1-2001 compilation (Austin Group Revision)
  1187. // 200809L POSIX.1-2008 compilation
  1188. // The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
  1189. // and _STDC_C99 are Sun implementation specific macros created in order to
  1190. // compress common standards specified feature test macros for easier reading.
  1191. // These macros should not be used by the application developer as
  1192. // unexpected results may occur. Instead, the user should reference
  1193. // standards(7) for correct usage of the standards feature test macros.
  1194. //
  1195. // __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
  1196. // X/Open or POSIX or in the negative, when neither
  1197. // X/Open or POSIX defines a symbol.
  1198. //
  1199. // _STRICT_STDC __STDC__ is specified by the C Standards and defined
  1200. // by the compiler. For Sun compilers the value of
  1201. // __STDC__ is either 1, 0, or not defined based on the
  1202. // compilation mode (see cc(1)). When the value of
  1203. // __STDC__ is 1 and in the absence of any other feature
  1204. // test macros, the namespace available to the application
  1205. // is limited to only those symbols defined by the C
  1206. // Standard. _STRICT_STDC provides a more readable means
  1207. // of identifying symbols defined by the standard, or in
  1208. // the negative, symbols that are extensions to the C
  1209. // Standard. See additional comments for GNU C differences.
  1210. //
  1211. // _STDC_C99 __STDC_VERSION__ is specified by the C standards and
  1212. // defined by the compiler and indicates the version of
  1213. // the C standard. A value of 199901L indicates a
  1214. // compiler that complies with ISO/IEC 9899:1999, other-
  1215. // wise known as the C99 standard.
  1216. //
  1217. // _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
  1218. // is 201112L indicating a compiler that compiles with
  1219. // ISO/IEC 9899:2011, otherwise known as the C11 standard.
  1220. //
  1221. // _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
  1222. // by the standards, and the user has not explicitly
  1223. // relaxed the strictness via __EXTENSIONS__.
  1224. // ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
  1225. // 99899:2011 specify the following predefined macro name:
  1226. //
  1227. // __STDC__ The integer constant 1, intended to indicate a conforming
  1228. // implementation.
  1229. //
  1230. // Furthermore, a strictly conforming program shall use only those features
  1231. // of the language and library specified in these standards. A conforming
  1232. // implementation shall accept any strictly conforming program.
  1233. //
  1234. // Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
  1235. // strictly conforming environments and __STDC__ to 0 for environments that
  1236. // use ANSI C semantics but allow extensions to the C standard. For non-ANSI
  1237. // C semantics, Sun's C compiler does not define __STDC__.
  1238. //
  1239. // The GNU C project interpretation is that __STDC__ should always be defined
  1240. // to 1 for compilation modes that accept ANSI C syntax regardless of whether
  1241. // or not extensions to the C standard are used. Violations of conforming
  1242. // behavior are conditionally flagged as warnings via the use of the
  1243. // -pedantic option. In addition to defining __STDC__ to 1, the GNU C
  1244. // compiler also defines __STRICT_ANSI__ as a means of specifying strictly
  1245. // conforming environments using the -ansi or -std=<standard> options.
  1246. //
  1247. // In the absence of any other compiler options, Sun and GNU set the value
  1248. // of __STDC__ as follows when using the following options:
  1249. //
  1250. // Value of __STDC__ __STRICT_ANSI__
  1251. //
  1252. // cc -Xa (default) 0 undefined
  1253. // cc -Xt (transitional) 0 undefined
  1254. // cc -Xc (strictly conforming) 1 undefined
  1255. // cc -Xs (K&R C) undefined undefined
  1256. //
  1257. // gcc (default) 1 undefined
  1258. // gcc -ansi, -std={c89, c99,...) 1 defined
  1259. // gcc -traditional (K&R) undefined undefined
  1260. //
  1261. // The default compilation modes for Sun C compilers versus GNU C compilers
  1262. // results in a differing value for __STDC__ which results in a more
  1263. // restricted namespace when using Sun compilers. To allow both GNU and Sun
  1264. // interpretations to peacefully co-exist, we use the following Sun
  1265. // implementation _STRICT_STDC_ macro:
  1266. // Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
  1267. // Use strict symbol visibility.
  1268. // This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
  1269. // governed by POSIX, but have not been governed by ISO C. One can go two ways
  1270. // on what should happen if an application actively includes (not transitively)
  1271. // a header that isn't part of the ISO C spec, we opt to say that if someone has
  1272. // gone out of there way then they're doing it for a reason and that is an act
  1273. // of non-compliance and therefore it's not up to us to hide away every symbol.
  1274. //
  1275. // In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
  1276. // cases where in the past we have only used a POSIX related check and we don't
  1277. // wish to make something stricter. Often applications are relying on the
  1278. // ability to, or more realistically unwittingly, have _STRICT_STDC declared and
  1279. // still use these interfaces.
  1280. // Large file interfaces:
  1281. //
  1282. // _LARGEFILE_SOURCE
  1283. // 1 large file-related additions to POSIX
  1284. // interfaces requested (fseeko, etc.)
  1285. // _LARGEFILE64_SOURCE
  1286. // 1 transitional large-file-related interfaces
  1287. // requested (seek64, stat64, etc.)
  1288. //
  1289. // The corresponding announcement macros are respectively:
  1290. // _LFS_LARGEFILE
  1291. // _LFS64_LARGEFILE
  1292. // (These are set in <unistd.h>.)
  1293. //
  1294. // Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
  1295. // well.
  1296. //
  1297. // The large file interfaces are made visible regardless of the initial values
  1298. // of the feature test macros under certain circumstances:
  1299. // - If no explicit standards-conforming environment is requested (neither
  1300. // of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
  1301. // __STDC__ does not imply standards conformance).
  1302. // - Extended system interfaces are explicitly requested (__EXTENSIONS__
  1303. // is defined).
  1304. // - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
  1305. // defined). (Note that this dependency is an artifact of the current
  1306. // kernel implementation and may change in future releases.)
  1307. // Large file compilation environment control:
  1308. //
  1309. // The setting of _FILE_OFFSET_BITS controls the size of various file-related
  1310. // types and governs the mapping between file-related source function symbol
  1311. // names and the corresponding binary entry points.
  1312. //
  1313. // In the 32-bit environment, the default value is 32; if not set, set it to
  1314. // the default here, to simplify tests in other headers.
  1315. //
  1316. // In the 64-bit compilation environment, the only value allowed is 64.
  1317. // Use of _XOPEN_SOURCE
  1318. //
  1319. // The following X/Open specifications are supported:
  1320. //
  1321. // X/Open Portability Guide, Issue 3 (XPG3)
  1322. // X/Open CAE Specification, Issue 4 (XPG4)
  1323. // X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
  1324. // X/Open CAE Specification, Issue 5 (XPG5)
  1325. // Open Group Technical Standard, Issue 6 (XPG6), also referred to as
  1326. // IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
  1327. // Open Group Technical Standard, Issue 7 (XPG7), also referred to as
  1328. // IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
  1329. //
  1330. // XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
  1331. // XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
  1332. // Version 2 (SUSv2)
  1333. // XPG6 is the result of a merge of the X/Open and POSIX specifications
  1334. // and as such is also referred to as IEEE Std. 1003.1-2001 in
  1335. // addition to UNIX 03 and SUSv3.
  1336. // XPG7 is also referred to as UNIX 08 and SUSv4.
  1337. //
  1338. // When writing a conforming X/Open application, as per the specification
  1339. // requirements, the appropriate feature test macros must be defined at
  1340. // compile time. These are as follows. For more info, see standards(7).
  1341. //
  1342. // Feature Test Macro Specification
  1343. // ------------------------------------------------ -------------
  1344. // _XOPEN_SOURCE XPG3
  1345. // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
  1346. // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
  1347. // _XOPEN_SOURCE = 500 XPG5
  1348. // _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
  1349. // _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
  1350. //
  1351. // In order to simplify the guards within the headers, the following
  1352. // implementation private test macros have been created. Applications
  1353. // must NOT use these private test macros as unexpected results will
  1354. // occur.
  1355. //
  1356. // Note that in general, the use of these private macros is cumulative.
  1357. // For example, the use of _XPG3 with no other restrictions on the X/Open
  1358. // namespace will make the symbols visible for XPG3 through XPG6
  1359. // compilation environments. The use of _XPG4_2 with no other X/Open
  1360. // namespace restrictions indicates that the symbols were introduced in
  1361. // XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
  1362. // environments, but not for XPG3 or XPG4 compilation environments.
  1363. //
  1364. // _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
  1365. // _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
  1366. // _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
  1367. // _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
  1368. // _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
  1369. // _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
  1370. // X/Open Portability Guide, Issue 3
  1371. // _XOPEN_VERSION is defined by the X/Open specifications and is not
  1372. // normally defined by the application, except in the case of an XPG4
  1373. // application. On the implementation side, _XOPEN_VERSION defined with
  1374. // the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
  1375. // with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
  1376. // _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
  1377. // application and with a value of 600 indicates an XPG6 (UNIX 03)
  1378. // application and with a value of 700 indicates an XPG7 (UNIX 08).
  1379. // The appropriate version is determined by the use of the
  1380. // feature test macros described earlier. The value of _XOPEN_VERSION
  1381. // defaults to 3 otherwise indicating support for XPG3 applications.
  1382. // ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
  1383. // conforming environments. ISO 9899:1999 says it does.
  1384. //
  1385. // The presence of _LONGLONG_TYPE says "long long exists" which is therefore
  1386. // defined in all but strictly conforming environments that disallow it.
  1387. // The following macro defines a value for the ISO C99 restrict
  1388. // keyword so that _RESTRICT_KYWD resolves to "restrict" if
  1389. // an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
  1390. // if any other compiler is used. This allows for the use of single
  1391. // prototype declarations regardless of compiler version.
  1392. // The following macro defines a value for the ISO C11 _Noreturn
  1393. // keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
  1394. // an ISO C11 compiler is used and "" (null string) if any other
  1395. // compiler is used. This allows for the use of single prototype
  1396. // declarations regardless of compiler version.
  1397. // ISO/IEC 9899:2011 Annex K
  1398. // The following macro indicates header support for the ANSI C++
  1399. // standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
  1400. // The following macro indicates header support for the C99 standard,
  1401. // ISO/IEC 9899:1999, Programming Languages - C.
  1402. // The following macro indicates header support for the C11 standard,
  1403. // ISO/IEC 9899:2011, Programming Languages - C.
  1404. // The following macro indicates header support for the C11 standard,
  1405. // ISO/IEC 9899:2011 Annex K, Programming Languages - C.
  1406. // The following macro indicates header support for DTrace. The value is an
  1407. // integer that corresponds to the major version number for DTrace.
  1408. // CDDL HEADER START
  1409. //
  1410. // The contents of this file are subject to the terms of the
  1411. // Common Development and Distribution License (the "License").
  1412. // You may not use this file except in compliance with the License.
  1413. //
  1414. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1415. // or http://www.opensolaris.org/os/licensing.
  1416. // See the License for the specific language governing permissions
  1417. // and limitations under the License.
  1418. //
  1419. // When distributing Covered Code, include this CDDL HEADER in each
  1420. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1421. // If applicable, add the following below this CDDL HEADER, with the
  1422. // fields enclosed by brackets "[]" replaced with your own identifying
  1423. // information: Portions Copyright [yyyy] [name of copyright owner]
  1424. //
  1425. // CDDL HEADER END
  1426. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  1427. // All Rights Reserved
  1428. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  1429. // Use is subject to license terms.
  1430. //
  1431. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  1432. // Copyright 2016 Joyent, Inc.
  1433. // Copyright 2021 Oxide Computer Company
  1434. // DO NOT EDIT THIS FILE.
  1435. //
  1436. // It has been auto-edited by fixincludes from:
  1437. //
  1438. // "/usr/include/sys/feature_tests.h"
  1439. //
  1440. // This had to be done to correct non-standard usages in the
  1441. // original, manufacturer supplied header file.
  1442. // CDDL HEADER START
  1443. //
  1444. // The contents of this file are subject to the terms of the
  1445. // Common Development and Distribution License (the "License").
  1446. // You may not use this file except in compliance with the License.
  1447. //
  1448. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1449. // or http://www.opensolaris.org/os/licensing.
  1450. // See the License for the specific language governing permissions
  1451. // and limitations under the License.
  1452. //
  1453. // When distributing Covered Code, include this CDDL HEADER in each
  1454. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1455. // If applicable, add the following below this CDDL HEADER, with the
  1456. // fields enclosed by brackets "[]" replaced with your own identifying
  1457. // information: Portions Copyright [yyyy] [name of copyright owner]
  1458. //
  1459. // CDDL HEADER END
  1460. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1461. // Copyright 2016 Joyent, Inc.
  1462. // Copyright 2022 Oxide Computer Company
  1463. //
  1464. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1465. // Use is subject to license terms.
  1466. // CDDL HEADER START
  1467. //
  1468. // The contents of this file are subject to the terms of the
  1469. // Common Development and Distribution License (the "License").
  1470. // You may not use this file except in compliance with the License.
  1471. //
  1472. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1473. // or http://www.opensolaris.org/os/licensing.
  1474. // See the License for the specific language governing permissions
  1475. // and limitations under the License.
  1476. //
  1477. //
  1478. // When distributing Covered Code, include this CDDL HEADER in each
  1479. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1480. // If applicable, add the following below this CDDL HEADER, with the
  1481. // fields enclosed by brackets "[]" replaced with your own identifying
  1482. // information: Portions Copyright [yyyy] [name of copyright owner]
  1483. //
  1484. // CDDL HEADER END
  1485. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  1486. // Use is subject to license terms.
  1487. // Copyright 2016 Joyent, Inc.
  1488. // Machine dependent definitions moved to <sys/machtypes.h>.
  1489. // CDDL HEADER START
  1490. //
  1491. // The contents of this file are subject to the terms of the
  1492. // Common Development and Distribution License (the "License").
  1493. // You may not use this file except in compliance with the License.
  1494. //
  1495. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1496. // or http://www.opensolaris.org/os/licensing.
  1497. // See the License for the specific language governing permissions
  1498. // and limitations under the License.
  1499. //
  1500. // When distributing Covered Code, include this CDDL HEADER in each
  1501. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1502. // If applicable, add the following below this CDDL HEADER, with the
  1503. // fields enclosed by brackets "[]" replaced with your own identifying
  1504. // information: Portions Copyright [yyyy] [name of copyright owner]
  1505. //
  1506. // CDDL HEADER END
  1507. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  1508. // Use is subject to license terms.
  1509. // Machine dependent types:
  1510. //
  1511. // intel ia32 Version
  1512. type Label_t = X_label_t /* machtypes.h:59:54 */
  1513. type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
  1514. // Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
  1515. // committee's working draft for the revision of the current ISO C standard,
  1516. // ISO/IEC 9899:1990 Programming language - C. These are not currently
  1517. // required by any standard but constitute a useful, general purpose set
  1518. // of type definitions which is namespace clean with respect to all standards.
  1519. // CDDL HEADER START
  1520. //
  1521. // The contents of this file are subject to the terms of the
  1522. // Common Development and Distribution License, Version 1.0 only
  1523. // (the "License"). You may not use this file except in compliance
  1524. // with the License.
  1525. //
  1526. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1527. // or http://www.opensolaris.org/os/licensing.
  1528. // See the License for the specific language governing permissions
  1529. // and limitations under the License.
  1530. //
  1531. // When distributing Covered Code, include this CDDL HEADER in each
  1532. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1533. // If applicable, add the following below this CDDL HEADER, with the
  1534. // fields enclosed by brackets "[]" replaced with your own identifying
  1535. // information: Portions Copyright [yyyy] [name of copyright owner]
  1536. //
  1537. // CDDL HEADER END
  1538. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  1539. //
  1540. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  1541. // Use is subject to license terms.
  1542. // This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
  1543. // of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
  1544. // Programming language - C.
  1545. //
  1546. // Programs/Modules should not directly include this file. Access to the
  1547. // types defined in this file should be through the inclusion of one of the
  1548. // following files:
  1549. //
  1550. // <sys/types.h> Provides only the "_t" types defined in this
  1551. // file which is a subset of the contents of
  1552. // <inttypes.h>. (This can be appropriate for
  1553. // all programs/modules except those claiming
  1554. // ANSI-C conformance.)
  1555. //
  1556. // <sys/inttypes.h> Provides the Kernel and Driver appropriate
  1557. // components of <inttypes.h>.
  1558. //
  1559. // <inttypes.h> For use by applications.
  1560. //
  1561. // See these files for more details.
  1562. // DO NOT EDIT THIS FILE.
  1563. //
  1564. // It has been auto-edited by fixincludes from:
  1565. //
  1566. // "/usr/include/sys/feature_tests.h"
  1567. //
  1568. // This had to be done to correct non-standard usages in the
  1569. // original, manufacturer supplied header file.
  1570. // CDDL HEADER START
  1571. //
  1572. // The contents of this file are subject to the terms of the
  1573. // Common Development and Distribution License (the "License").
  1574. // You may not use this file except in compliance with the License.
  1575. //
  1576. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1577. // or http://www.opensolaris.org/os/licensing.
  1578. // See the License for the specific language governing permissions
  1579. // and limitations under the License.
  1580. //
  1581. // When distributing Covered Code, include this CDDL HEADER in each
  1582. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1583. // If applicable, add the following below this CDDL HEADER, with the
  1584. // fields enclosed by brackets "[]" replaced with your own identifying
  1585. // information: Portions Copyright [yyyy] [name of copyright owner]
  1586. //
  1587. // CDDL HEADER END
  1588. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1589. // Copyright 2016 Joyent, Inc.
  1590. // Copyright 2022 Oxide Computer Company
  1591. //
  1592. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1593. // Use is subject to license terms.
  1594. // Basic / Extended integer types
  1595. //
  1596. // The following defines the basic fixed-size integer types.
  1597. //
  1598. // Implementations are free to typedef them to Standard C integer types or
  1599. // extensions that they support. If an implementation does not support one
  1600. // of the particular integer data types below, then it should not define the
  1601. // typedefs and macros corresponding to that data type. Note that int8_t
  1602. // is not defined in -Xs mode on ISAs for which the ABI specifies "char"
  1603. // as an unsigned entity because there is no way to define an eight bit
  1604. // signed integral.
  1605. type Int8_t = int8 /* int_types.h:75:16 */
  1606. type Int16_t = int16 /* int_types.h:79:17 */
  1607. type Int32_t = int32 /* int_types.h:80:15 */
  1608. type Int64_t = int64 /* int_types.h:83:16 */
  1609. type Uint8_t = uint8 /* int_types.h:91:24 */
  1610. type Uint16_t = uint16 /* int_types.h:92:25 */
  1611. type Uint32_t = uint32 /* int_types.h:93:23 */
  1612. type Uint64_t = uint64 /* int_types.h:95:24 */
  1613. // intmax_t and uintmax_t are to be the longest (in number of bits) signed
  1614. // and unsigned integer types supported by the implementation.
  1615. type Intmax_t = int64 /* int_types.h:107:19 */
  1616. type Uintmax_t = uint64 /* int_types.h:108:19 */
  1617. // intptr_t and uintptr_t are signed and unsigned integer types large enough
  1618. // to hold any data pointer; that is, data pointers can be assigned into or
  1619. // from these integer types without losing precision.
  1620. type Intptr_t = int64 /* int_types.h:120:16 */
  1621. type Uintptr_t = uint64 /* int_types.h:121:24 */
  1622. // The following define the fastest integer types that can hold the
  1623. // specified number of bits.
  1624. type Int_fast8_t = int8 /* int_types.h:132:16 */
  1625. type Int_fast16_t = int32 /* int_types.h:136:15 */
  1626. type Int_fast32_t = int32 /* int_types.h:137:15 */
  1627. type Int_fast64_t = int64 /* int_types.h:139:16 */
  1628. type Uint_fast8_t = uint8 /* int_types.h:146:24 */
  1629. type Uint_fast16_t = uint32 /* int_types.h:147:23 */
  1630. type Uint_fast32_t = uint32 /* int_types.h:148:23 */
  1631. type Uint_fast64_t = uint64 /* int_types.h:150:24 */
  1632. // The following define the smallest integer types that can hold the
  1633. // specified number of bits.
  1634. type Int_least8_t = int8 /* int_types.h:162:16 */
  1635. type Int_least16_t = int16 /* int_types.h:166:17 */
  1636. type Int_least32_t = int32 /* int_types.h:167:15 */
  1637. type Int_least64_t = int64 /* int_types.h:169:16 */
  1638. // If these are changed, please update char16_t and char32_t in head/uchar.h.
  1639. type Uint_least8_t = uint8 /* int_types.h:179:24 */
  1640. type Uint_least16_t = uint16 /* int_types.h:180:25 */
  1641. type Uint_least32_t = uint32 /* int_types.h:181:23 */
  1642. type Uint_least64_t = uint64 /* int_types.h:183:24 */
  1643. // Strictly conforming ANSI C environments prior to the 1999
  1644. // revision of the C Standard (ISO/IEC 9899:1999) do not have
  1645. // the long long data type.
  1646. type Longlong_t = int64 /* types.h:72:20 */
  1647. type U_longlong_t = uint64 /* types.h:73:28 */
  1648. // These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
  1649. // to use them instead of int32_t and uint32_t because DEC had
  1650. // shipped 64-bit wide.
  1651. type T_scalar_t = int32 /* types.h:92:18 */
  1652. type T_uscalar_t = uint32 /* types.h:93:18 */
  1653. // POSIX Extensions
  1654. type Uchar_t = uint8 /* types.h:102:23 */
  1655. type Ushort_t = uint16 /* types.h:103:24 */
  1656. type Uint_t = uint32 /* types.h:104:22 */
  1657. type Ulong_t = uint64 /* types.h:105:23 */
  1658. type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
  1659. type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
  1660. type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
  1661. // VM-related types
  1662. type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
  1663. type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
  1664. type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
  1665. type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
  1666. type Sysid_t = int16 /* types.h:128:16 */
  1667. type Index_t = int16 /* types.h:129:16 */
  1668. type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
  1669. type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
  1670. // The size of off_t and related types depends on the setting of
  1671. // _FILE_OFFSET_BITS. (Note that other system headers define other types
  1672. // related to those defined here.)
  1673. //
  1674. // If _LARGEFILE64_SOURCE is defined, variants of these types that are
  1675. // explicitly 64 bits wide become available.
  1676. type Off_t = int64 /* types.h:145:15 */ // offsets within files
  1677. type Off64_t = int64 /* types.h:152:16 */ // offsets within files
  1678. type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
  1679. type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
  1680. type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
  1681. type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
  1682. type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
  1683. type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
  1684. type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
  1685. type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
  1686. type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
  1687. // The boolean_t type has had a varied amount of exposure over the years in
  1688. // terms of how its enumeration constants have been exposed. In particular, it
  1689. // originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
  1690. // B_TRUE and B_FALSE with an underscore. This check never included the
  1691. // question of if we were in a strict ANSI C environment or whether extensions
  1692. // were defined.
  1693. //
  1694. // Compilers such as clang started defaulting to always including an
  1695. // XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
  1696. // This would lead most software that had used the non-underscore versions to
  1697. // need it. As such, we have adjusted the non-strict XOPEN environment to retain
  1698. // its old behavior so as to minimize namespace pollution; however, we instead
  1699. // include both variants of the definitions in the generally visible version
  1700. // allowing software written in either world to hopefully end up in a good
  1701. // place.
  1702. //
  1703. // This isn't perfect, but should hopefully minimize the pain for folks actually
  1704. // trying to build software.
  1705. type Boolean_t = uint32 /* types.h:215:69 */
  1706. // The {u,}pad64_t types can be used in structures such that those structures
  1707. // may be accessed by code produced by compilation environments which don't
  1708. // support a 64 bit integral datatype. The intention is not to allow
  1709. // use of these fields in such environments, but to maintain the alignment
  1710. // and offsets of the structure.
  1711. //
  1712. // Similar comments for {u,}pad128_t.
  1713. //
  1714. // Note that these types do NOT generate any stronger alignment constraints
  1715. // than those available in the underlying ABI. See <sys/isa_defs.h>
  1716. type Pad64_t = int64 /* types.h:240:18 */
  1717. type Upad64_t = uint64 /* types.h:241:18 */
  1718. type Pad128_t = struct {
  1719. F_q float64
  1720. F__ccgo_pad1 [8]byte
  1721. } /* types.h:257:3 */
  1722. type Upad128_t = struct {
  1723. F_q float64
  1724. F__ccgo_pad1 [8]byte
  1725. } /* types.h:262:3 */
  1726. type Offset_t = int64 /* types.h:264:20 */
  1727. type U_offset_t = uint64 /* types.h:265:22 */
  1728. type Len_t = uint64 /* types.h:266:22 */
  1729. type Diskaddr_t = uint64 /* types.h:267:22 */
  1730. // Definitions remaining from previous partial support for 64-bit file
  1731. // offsets. This partial support for devices greater than 2gb requires
  1732. // compiler support for long long.
  1733. type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
  1734. type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
  1735. type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
  1736. // The following type is for various kinds of identifiers. The
  1737. // actual type must be the same for all since some system calls
  1738. // (such as sigsend) take arguments that may be any of these
  1739. // types. The enumeration type idtype_t defined in sys/procset.h
  1740. // is used to indicate what type of id is being specified --
  1741. // a process id, process group id, session id, scheduling class id,
  1742. // user id, group id, project id, task id or zone id.
  1743. type Id_t = int32 /* types.h:329:14 */
  1744. type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
  1745. // Type useconds_t is an unsigned integral type capable of storing
  1746. // values at least in the range of zero to 1,000,000.
  1747. type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
  1748. type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
  1749. // Typedefs for dev_t components.
  1750. type Major_t = uint32 /* types.h:351:16 */ // major part of device number
  1751. type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
  1752. // The data type of a thread priority.
  1753. type Pri_t = int16 /* types.h:361:15 */
  1754. // The data type for a CPU flags field. (Can be extended to larger unsigned
  1755. // types, if needed, limited by ability to update atomically.)
  1756. type Cpu_flag_t = uint16 /* types.h:367:18 */
  1757. // For compatibility reasons the following typedefs (prefixed o_)
  1758. // can't grow regardless of the EFT definition. Although,
  1759. // applications should not explicitly use these typedefs
  1760. // they may be included via a system header definition.
  1761. // WARNING: These typedefs may be removed in a future
  1762. // release.
  1763. //
  1764. // ex. the definitions in s5inode.h (now obsoleted)
  1765. // remained small to preserve compatibility
  1766. // in the S5 file system type.
  1767. type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
  1768. type O_dev_t = int16 /* types.h:381:15 */ // old device type
  1769. type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
  1770. type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
  1771. type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
  1772. type O_pid_t = int16 /* types.h:385:15 */ // old process id type
  1773. type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
  1774. // POSIX and XOPEN Declarations
  1775. type Key_t = int32 /* types.h:392:13 */ // IPC key type
  1776. type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
  1777. type Uid_t = uint32 /* types.h:401:22 */ // UID type
  1778. type Gid_t = uint32 /* types.h:404:15 */ // GID type
  1779. type Datalink_id_t = uint32 /* types.h:406:18 */
  1780. type Vrid_t = uint32 /* types.h:407:18 */
  1781. type Taskid_t = int32 /* types.h:409:17 */
  1782. type Projid_t = int32 /* types.h:410:17 */
  1783. type Poolid_t = int32 /* types.h:411:14 */
  1784. type Zoneid_t = int32 /* types.h:412:14 */
  1785. type Ctid_t = int32 /* types.h:413:14 */
  1786. // POSIX definitions are same as defined in thread.h and synch.h.
  1787. // Any changes made to here should be reflected in corresponding
  1788. // files as described in comments.
  1789. type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
  1790. type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
  1791. // "Magic numbers" tagging synchronization object types
  1792. type X_pthread_mutex = struct {
  1793. F__pthread_mutex_flags struct {
  1794. F__pthread_mutex_flag1 uint16
  1795. F__pthread_mutex_flag2 uint8
  1796. F__pthread_mutex_ceiling uint8
  1797. F__pthread_mutex_type uint16
  1798. F__pthread_mutex_magic uint16
  1799. }
  1800. F__pthread_mutex_lock struct {
  1801. F__ccgo_pad1 [0]uint64
  1802. F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
  1803. }
  1804. F__pthread_mutex_data uint64
  1805. } /* types.h:429:9 */
  1806. // = thread_key_t in thread.h
  1807. // "Magic numbers" tagging synchronization object types
  1808. type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
  1809. type X_pthread_cond = struct {
  1810. F__pthread_cond_flags struct {
  1811. F__pthread_cond_flag [4]uint8
  1812. F__pthread_cond_type uint16
  1813. F__pthread_cond_magic uint16
  1814. }
  1815. F__pthread_cond_data uint64
  1816. } /* types.h:450:9 */
  1817. type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
  1818. // UNIX 98 Extension
  1819. type X_pthread_rwlock = struct {
  1820. F__pthread_rwlock_readers int32
  1821. F__pthread_rwlock_type uint16
  1822. F__pthread_rwlock_magic uint16
  1823. F__pthread_rwlock_mutex Pthread_mutex_t
  1824. F__pthread_rwlock_readercv Pthread_cond_t
  1825. F__pthread_rwlock_writercv Pthread_cond_t
  1826. } /* types.h:462:9 */
  1827. // UNIX 98 Extension
  1828. type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
  1829. // SUSV3
  1830. type Pthread_barrier_t = struct {
  1831. F__pthread_barrier_count uint32
  1832. F__pthread_barrier_current uint32
  1833. F__pthread_barrier_cycle uint64
  1834. F__pthread_barrier_reserved uint64
  1835. F__pthread_barrier_lock Pthread_mutex_t
  1836. F__pthread_barrier_cond Pthread_cond_t
  1837. } /* types.h:481:3 */
  1838. type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
  1839. // attributes for threads, dynamically allocated by library
  1840. type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
  1841. // attributes for threads, dynamically allocated by library
  1842. type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
  1843. // attributes for mutex, dynamically allocated by library
  1844. type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
  1845. // attributes for mutex, dynamically allocated by library
  1846. type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
  1847. // attributes for cond, dynamically allocated by library
  1848. type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
  1849. // attributes for cond, dynamically allocated by library
  1850. type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
  1851. // pthread_once
  1852. type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
  1853. // pthread_once
  1854. type Pthread_once_t = X_once /* types.h:511:3 */
  1855. // UNIX 98 Extensions
  1856. // attributes for rwlock, dynamically allocated by library
  1857. type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
  1858. // UNIX 98 Extensions
  1859. // attributes for rwlock, dynamically allocated by library
  1860. type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
  1861. // SUSV3
  1862. // attributes for pthread_barrier_t, dynamically allocated by library
  1863. type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
  1864. type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
  1865. type Nlink_t = uint32 /* types.h:532:16 */ // file link type
  1866. type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
  1867. type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
  1868. type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
  1869. type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
  1870. type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
  1871. type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
  1872. // BEGIN CSTYLED
  1873. type Unchar = uint8 /* types.h:580:23 */
  1874. type Ushort = uint16 /* types.h:581:24 */
  1875. type Uint = uint32 /* types.h:582:22 */
  1876. type Ulong = uint64 /* types.h:583:23 */
  1877. // END CSTYLED
  1878. // The following is the value of type id_t to use to indicate the
  1879. // caller's current id. See procset.h for the type idtype_t
  1880. // which defines which kind of id is being specified.
  1881. // The following value of type pfn_t is used to indicate
  1882. // invalid page frame number.
  1883. // BEGIN CSTYLED
  1884. type U_char = uint8 /* types.h:650:23 */
  1885. type U_short = uint16 /* types.h:651:24 */
  1886. type U_int = uint32 /* types.h:652:22 */
  1887. type U_long = uint64 /* types.h:653:23 */
  1888. type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
  1889. type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
  1890. type Quad = Quad_t /* types.h:655:17 */ // used by UFS
  1891. // END CSTYLED
  1892. // Nested include for BSD/sockets source compatibility.
  1893. // (The select macros used to be defined here).
  1894. // CDDL HEADER START
  1895. //
  1896. // The contents of this file are subject to the terms of the
  1897. // Common Development and Distribution License (the "License").
  1898. // You may not use this file except in compliance with the License.
  1899. //
  1900. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1901. // or http://www.opensolaris.org/os/licensing.
  1902. // See the License for the specific language governing permissions
  1903. // and limitations under the License.
  1904. //
  1905. // When distributing Covered Code, include this CDDL HEADER in each
  1906. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1907. // If applicable, add the following below this CDDL HEADER, with the
  1908. // fields enclosed by brackets "[]" replaced with your own identifying
  1909. // information: Portions Copyright [yyyy] [name of copyright owner]
  1910. //
  1911. // CDDL HEADER END
  1912. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  1913. //
  1914. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  1915. //
  1916. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  1917. // Use is subject to license terms.
  1918. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  1919. // All Rights Reserved
  1920. // University Copyright- Copyright (c) 1982, 1986, 1988
  1921. // The Regents of the University of California
  1922. // All Rights Reserved
  1923. //
  1924. // University Acknowledgment- Portions of this document are derived from
  1925. // software developed by the University of California, Berkeley, and its
  1926. // contributors.
  1927. // DO NOT EDIT THIS FILE.
  1928. //
  1929. // It has been auto-edited by fixincludes from:
  1930. //
  1931. // "/usr/include/sys/feature_tests.h"
  1932. //
  1933. // This had to be done to correct non-standard usages in the
  1934. // original, manufacturer supplied header file.
  1935. // CDDL HEADER START
  1936. //
  1937. // The contents of this file are subject to the terms of the
  1938. // Common Development and Distribution License (the "License").
  1939. // You may not use this file except in compliance with the License.
  1940. //
  1941. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1942. // or http://www.opensolaris.org/os/licensing.
  1943. // See the License for the specific language governing permissions
  1944. // and limitations under the License.
  1945. //
  1946. // When distributing Covered Code, include this CDDL HEADER in each
  1947. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1948. // If applicable, add the following below this CDDL HEADER, with the
  1949. // fields enclosed by brackets "[]" replaced with your own identifying
  1950. // information: Portions Copyright [yyyy] [name of copyright owner]
  1951. //
  1952. // CDDL HEADER END
  1953. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1954. // Copyright 2016 Joyent, Inc.
  1955. // Copyright 2022 Oxide Computer Company
  1956. //
  1957. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1958. // Use is subject to license terms.
  1959. // CDDL HEADER START
  1960. //
  1961. // The contents of this file are subject to the terms of the
  1962. // Common Development and Distribution License, Version 1.0 only
  1963. // (the "License"). You may not use this file except in compliance
  1964. // with the License.
  1965. //
  1966. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1967. // or http://www.opensolaris.org/os/licensing.
  1968. // See the License for the specific language governing permissions
  1969. // and limitations under the License.
  1970. //
  1971. // When distributing Covered Code, include this CDDL HEADER in each
  1972. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1973. // If applicable, add the following below this CDDL HEADER, with the
  1974. // fields enclosed by brackets "[]" replaced with your own identifying
  1975. // information: Portions Copyright [yyyy] [name of copyright owner]
  1976. //
  1977. // CDDL HEADER END
  1978. // Copyright 2005 Sun Microsystems, Inc. All rights reserved.
  1979. // Use is subject to license terms.
  1980. // Implementation-private. This header should not be included
  1981. // directly by an application. The application should instead
  1982. // include <time.h> which includes this header conditionally
  1983. // depending on which feature test macros are defined. By default,
  1984. // this header is included by <time.h>. X/Open and POSIX
  1985. // standards requirements result in this header being included
  1986. // by <time.h> only under a restricted set of conditions.
  1987. // DO NOT EDIT THIS FILE.
  1988. //
  1989. // It has been auto-edited by fixincludes from:
  1990. //
  1991. // "/usr/include/sys/feature_tests.h"
  1992. //
  1993. // This had to be done to correct non-standard usages in the
  1994. // original, manufacturer supplied header file.
  1995. // CDDL HEADER START
  1996. //
  1997. // The contents of this file are subject to the terms of the
  1998. // Common Development and Distribution License (the "License").
  1999. // You may not use this file except in compliance with the License.
  2000. //
  2001. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2002. // or http://www.opensolaris.org/os/licensing.
  2003. // See the License for the specific language governing permissions
  2004. // and limitations under the License.
  2005. //
  2006. // When distributing Covered Code, include this CDDL HEADER in each
  2007. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2008. // If applicable, add the following below this CDDL HEADER, with the
  2009. // fields enclosed by brackets "[]" replaced with your own identifying
  2010. // information: Portions Copyright [yyyy] [name of copyright owner]
  2011. //
  2012. // CDDL HEADER END
  2013. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2014. // Copyright 2016 Joyent, Inc.
  2015. // Copyright 2022 Oxide Computer Company
  2016. //
  2017. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2018. // Use is subject to license terms.
  2019. // Time expressed in seconds and nanoseconds
  2020. type Timespec = struct {
  2021. Ftv_sec int64
  2022. Ftv_nsec int64
  2023. } /* time_impl.h:57:9 */
  2024. // used by UFS
  2025. // END CSTYLED
  2026. // Nested include for BSD/sockets source compatibility.
  2027. // (The select macros used to be defined here).
  2028. // CDDL HEADER START
  2029. //
  2030. // The contents of this file are subject to the terms of the
  2031. // Common Development and Distribution License (the "License").
  2032. // You may not use this file except in compliance with the License.
  2033. //
  2034. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2035. // or http://www.opensolaris.org/os/licensing.
  2036. // See the License for the specific language governing permissions
  2037. // and limitations under the License.
  2038. //
  2039. // When distributing Covered Code, include this CDDL HEADER in each
  2040. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2041. // If applicable, add the following below this CDDL HEADER, with the
  2042. // fields enclosed by brackets "[]" replaced with your own identifying
  2043. // information: Portions Copyright [yyyy] [name of copyright owner]
  2044. //
  2045. // CDDL HEADER END
  2046. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2047. //
  2048. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2049. //
  2050. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  2051. // Use is subject to license terms.
  2052. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2053. // All Rights Reserved
  2054. // University Copyright- Copyright (c) 1982, 1986, 1988
  2055. // The Regents of the University of California
  2056. // All Rights Reserved
  2057. //
  2058. // University Acknowledgment- Portions of this document are derived from
  2059. // software developed by the University of California, Berkeley, and its
  2060. // contributors.
  2061. // DO NOT EDIT THIS FILE.
  2062. //
  2063. // It has been auto-edited by fixincludes from:
  2064. //
  2065. // "/usr/include/sys/feature_tests.h"
  2066. //
  2067. // This had to be done to correct non-standard usages in the
  2068. // original, manufacturer supplied header file.
  2069. // CDDL HEADER START
  2070. //
  2071. // The contents of this file are subject to the terms of the
  2072. // Common Development and Distribution License (the "License").
  2073. // You may not use this file except in compliance with the License.
  2074. //
  2075. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2076. // or http://www.opensolaris.org/os/licensing.
  2077. // See the License for the specific language governing permissions
  2078. // and limitations under the License.
  2079. //
  2080. // When distributing Covered Code, include this CDDL HEADER in each
  2081. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2082. // If applicable, add the following below this CDDL HEADER, with the
  2083. // fields enclosed by brackets "[]" replaced with your own identifying
  2084. // information: Portions Copyright [yyyy] [name of copyright owner]
  2085. //
  2086. // CDDL HEADER END
  2087. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2088. // Copyright 2016 Joyent, Inc.
  2089. // Copyright 2022 Oxide Computer Company
  2090. //
  2091. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2092. // Use is subject to license terms.
  2093. // CDDL HEADER START
  2094. //
  2095. // The contents of this file are subject to the terms of the
  2096. // Common Development and Distribution License, Version 1.0 only
  2097. // (the "License"). You may not use this file except in compliance
  2098. // with the License.
  2099. //
  2100. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2101. // or http://www.opensolaris.org/os/licensing.
  2102. // See the License for the specific language governing permissions
  2103. // and limitations under the License.
  2104. //
  2105. // When distributing Covered Code, include this CDDL HEADER in each
  2106. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2107. // If applicable, add the following below this CDDL HEADER, with the
  2108. // fields enclosed by brackets "[]" replaced with your own identifying
  2109. // information: Portions Copyright [yyyy] [name of copyright owner]
  2110. //
  2111. // CDDL HEADER END
  2112. // Copyright 2005 Sun Microsystems, Inc. All rights reserved.
  2113. // Use is subject to license terms.
  2114. // Implementation-private. This header should not be included
  2115. // directly by an application. The application should instead
  2116. // include <time.h> which includes this header conditionally
  2117. // depending on which feature test macros are defined. By default,
  2118. // this header is included by <time.h>. X/Open and POSIX
  2119. // standards requirements result in this header being included
  2120. // by <time.h> only under a restricted set of conditions.
  2121. // DO NOT EDIT THIS FILE.
  2122. //
  2123. // It has been auto-edited by fixincludes from:
  2124. //
  2125. // "/usr/include/sys/feature_tests.h"
  2126. //
  2127. // This had to be done to correct non-standard usages in the
  2128. // original, manufacturer supplied header file.
  2129. // CDDL HEADER START
  2130. //
  2131. // The contents of this file are subject to the terms of the
  2132. // Common Development and Distribution License (the "License").
  2133. // You may not use this file except in compliance with the License.
  2134. //
  2135. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2136. // or http://www.opensolaris.org/os/licensing.
  2137. // See the License for the specific language governing permissions
  2138. // and limitations under the License.
  2139. //
  2140. // When distributing Covered Code, include this CDDL HEADER in each
  2141. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2142. // If applicable, add the following below this CDDL HEADER, with the
  2143. // fields enclosed by brackets "[]" replaced with your own identifying
  2144. // information: Portions Copyright [yyyy] [name of copyright owner]
  2145. //
  2146. // CDDL HEADER END
  2147. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2148. // Copyright 2016 Joyent, Inc.
  2149. // Copyright 2022 Oxide Computer Company
  2150. //
  2151. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2152. // Use is subject to license terms.
  2153. // Time expressed in seconds and nanoseconds
  2154. type Timespec_t = Timespec /* time_impl.h:60:3 */
  2155. type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
  2156. // The following has been left in for backward compatibility. Portable
  2157. // applications should not use the structure name timestruc.
  2158. // Timer specification
  2159. type Itimerspec = struct {
  2160. Fit_interval struct {
  2161. Ftv_sec int64
  2162. Ftv_nsec int64
  2163. }
  2164. Fit_value struct {
  2165. Ftv_sec int64
  2166. Ftv_nsec int64
  2167. }
  2168. } /* time_impl.h:95:9 */
  2169. // definition per SVr4
  2170. // The following has been left in for backward compatibility. Portable
  2171. // applications should not use the structure name timestruc.
  2172. // Timer specification
  2173. type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
  2174. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2175. // All Rights Reserved
  2176. // Copyright (c) 1982, 1986, 1993 Regents of the University of California.
  2177. // All rights reserved. The Berkeley software License Agreement
  2178. // specifies the terms and conditions for redistribution.
  2179. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2180. //
  2181. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  2182. // Use is subject to license terms.
  2183. //
  2184. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2185. // Copyright 2016 Joyent, Inc.
  2186. // Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
  2187. // Copyright (c) 2013, 2016 by Delphix. All rights reserved.
  2188. // DO NOT EDIT THIS FILE.
  2189. //
  2190. // It has been auto-edited by fixincludes from:
  2191. //
  2192. // "/usr/include/sys/feature_tests.h"
  2193. //
  2194. // This had to be done to correct non-standard usages in the
  2195. // original, manufacturer supplied header file.
  2196. // CDDL HEADER START
  2197. //
  2198. // The contents of this file are subject to the terms of the
  2199. // Common Development and Distribution License (the "License").
  2200. // You may not use this file except in compliance with the License.
  2201. //
  2202. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2203. // or http://www.opensolaris.org/os/licensing.
  2204. // See the License for the specific language governing permissions
  2205. // and limitations under the License.
  2206. //
  2207. // When distributing Covered Code, include this CDDL HEADER in each
  2208. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2209. // If applicable, add the following below this CDDL HEADER, with the
  2210. // fields enclosed by brackets "[]" replaced with your own identifying
  2211. // information: Portions Copyright [yyyy] [name of copyright owner]
  2212. //
  2213. // CDDL HEADER END
  2214. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2215. // Copyright 2016 Joyent, Inc.
  2216. // Copyright 2022 Oxide Computer Company
  2217. //
  2218. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2219. // Use is subject to license terms.
  2220. // Structure returned by gettimeofday(2) system call,
  2221. // and used in other calls.
  2222. type Timeval = struct {
  2223. Ftv_sec int64
  2224. Ftv_usec int64
  2225. } /* time.h:54:1 */
  2226. type Timezone = struct {
  2227. Ftz_minuteswest int32
  2228. Ftz_dsttime int32
  2229. } /* time.h:86:1 */
  2230. // Needed for longlong_t type. Placement of this due to <sys/types.h>
  2231. // including <sys/select.h> which relies on the presense of the itimerval
  2232. // structure.
  2233. // CDDL HEADER START
  2234. //
  2235. // The contents of this file are subject to the terms of the
  2236. // Common Development and Distribution License (the "License").
  2237. // You may not use this file except in compliance with the License.
  2238. //
  2239. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2240. // or http://www.opensolaris.org/os/licensing.
  2241. // See the License for the specific language governing permissions
  2242. // and limitations under the License.
  2243. //
  2244. // When distributing Covered Code, include this CDDL HEADER in each
  2245. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2246. // If applicable, add the following below this CDDL HEADER, with the
  2247. // fields enclosed by brackets "[]" replaced with your own identifying
  2248. // information: Portions Copyright [yyyy] [name of copyright owner]
  2249. //
  2250. // CDDL HEADER END
  2251. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2252. // All Rights Reserved
  2253. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  2254. // Use is subject to license terms.
  2255. //
  2256. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2257. // Copyright 2016 Joyent, Inc.
  2258. // Copyright 2021 Oxide Computer Company
  2259. // Operations on timevals.
  2260. // Names of the interval timers, and structure
  2261. // defining a timer setting.
  2262. // time and when system is running on
  2263. // behalf of the process.
  2264. // time profiling of multithreaded
  2265. // programs.
  2266. type Itimerval = struct {
  2267. Fit_interval struct {
  2268. Ftv_sec int64
  2269. Ftv_usec int64
  2270. }
  2271. Fit_value struct {
  2272. Ftv_sec int64
  2273. Ftv_usec int64
  2274. }
  2275. } /* time.h:209:1 */
  2276. // Definitions for commonly used resolutions.
  2277. // Time expressed as a 64-bit nanosecond counter.
  2278. type Hrtime_t = int64 /* time.h:265:20 */
  2279. // The inclusion of <time.h> is historical and was added for
  2280. // backward compatibility in delta 1.2 when a number of definitions
  2281. // were moved out of <sys/time.h>. More recently, the timespec and
  2282. // itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
  2283. // _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
  2284. // which is now included by <time.h>. This change was due to POSIX
  2285. // 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
  2286. // non-X/Open applications, including this header will still make
  2287. // visible these definitions.
  2288. // CDDL HEADER START
  2289. //
  2290. // The contents of this file are subject to the terms of the
  2291. // Common Development and Distribution License (the "License").
  2292. // You may not use this file except in compliance with the License.
  2293. //
  2294. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2295. // or http://www.opensolaris.org/os/licensing.
  2296. // See the License for the specific language governing permissions
  2297. // and limitations under the License.
  2298. //
  2299. // When distributing Covered Code, include this CDDL HEADER in each
  2300. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2301. // If applicable, add the following below this CDDL HEADER, with the
  2302. // fields enclosed by brackets "[]" replaced with your own identifying
  2303. // information: Portions Copyright [yyyy] [name of copyright owner]
  2304. //
  2305. // CDDL HEADER END
  2306. // Copyright (c) 1988 AT&T
  2307. // All Rights Reserved
  2308. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2309. //
  2310. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  2311. // Use is subject to license terms.
  2312. // Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
  2313. // Copyright 2016 Joyent, Inc.
  2314. // DO NOT EDIT THIS FILE.
  2315. //
  2316. // It has been auto-edited by fixincludes from:
  2317. //
  2318. // "/usr/include/sys/feature_tests.h"
  2319. //
  2320. // This had to be done to correct non-standard usages in the
  2321. // original, manufacturer supplied header file.
  2322. // CDDL HEADER START
  2323. //
  2324. // The contents of this file are subject to the terms of the
  2325. // Common Development and Distribution License (the "License").
  2326. // You may not use this file except in compliance with the License.
  2327. //
  2328. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2329. // or http://www.opensolaris.org/os/licensing.
  2330. // See the License for the specific language governing permissions
  2331. // and limitations under the License.
  2332. //
  2333. // When distributing Covered Code, include this CDDL HEADER in each
  2334. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2335. // If applicable, add the following below this CDDL HEADER, with the
  2336. // fields enclosed by brackets "[]" replaced with your own identifying
  2337. // information: Portions Copyright [yyyy] [name of copyright owner]
  2338. //
  2339. // CDDL HEADER END
  2340. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2341. // Copyright 2016 Joyent, Inc.
  2342. // Copyright 2022 Oxide Computer Company
  2343. //
  2344. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2345. // Use is subject to license terms.
  2346. // CDDL HEADER START
  2347. //
  2348. // The contents of this file are subject to the terms of the
  2349. // Common Development and Distribution License, Version 1.0 only
  2350. // (the "License"). You may not use this file except in compliance
  2351. // with the License.
  2352. //
  2353. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2354. // or http://www.opensolaris.org/os/licensing.
  2355. // See the License for the specific language governing permissions
  2356. // and limitations under the License.
  2357. //
  2358. // When distributing Covered Code, include this CDDL HEADER in each
  2359. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2360. // If applicable, add the following below this CDDL HEADER, with the
  2361. // fields enclosed by brackets "[]" replaced with your own identifying
  2362. // information: Portions Copyright [yyyy] [name of copyright owner]
  2363. //
  2364. // CDDL HEADER END
  2365. // Copyright (c) 1988 AT&T
  2366. // All Rights Reserved
  2367. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2368. // Copyright 2014 PALO, Richard.
  2369. //
  2370. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  2371. // Use is subject to license terms.
  2372. // An application should not include this header directly. Instead it
  2373. // should be included only through the inclusion of other Sun headers.
  2374. //
  2375. // The contents of this header is limited to identifiers specified in the
  2376. // C Standard. Any new identifiers specified in future amendments to the
  2377. // C Standard must be placed in this header. If these new identifiers
  2378. // are required to also be in the C++ Standard "std" namespace, then for
  2379. // anything other than macro definitions, corresponding "using" directives
  2380. // must also be added to <time.h.h>.
  2381. // DO NOT EDIT THIS FILE.
  2382. //
  2383. // It has been auto-edited by fixincludes from:
  2384. //
  2385. // "/usr/include/sys/feature_tests.h"
  2386. //
  2387. // This had to be done to correct non-standard usages in the
  2388. // original, manufacturer supplied header file.
  2389. // CDDL HEADER START
  2390. //
  2391. // The contents of this file are subject to the terms of the
  2392. // Common Development and Distribution License (the "License").
  2393. // You may not use this file except in compliance with the License.
  2394. //
  2395. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2396. // or http://www.opensolaris.org/os/licensing.
  2397. // See the License for the specific language governing permissions
  2398. // and limitations under the License.
  2399. //
  2400. // When distributing Covered Code, include this CDDL HEADER in each
  2401. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2402. // If applicable, add the following below this CDDL HEADER, with the
  2403. // fields enclosed by brackets "[]" replaced with your own identifying
  2404. // information: Portions Copyright [yyyy] [name of copyright owner]
  2405. //
  2406. // CDDL HEADER END
  2407. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2408. // Copyright 2016 Joyent, Inc.
  2409. // Copyright 2022 Oxide Computer Company
  2410. //
  2411. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2412. // Use is subject to license terms.
  2413. // This file and its contents are supplied under the terms of the
  2414. // Common Development and Distribution License ("CDDL"), version 1.0.
  2415. // You may only use this file in accordance with the terms of version
  2416. // 1.0 of the CDDL.
  2417. //
  2418. // A full copy of the text of the CDDL should have accompanied this
  2419. // source. A copy of the CDDL is also available via the Internet at
  2420. // http://www.illumos.org/license/CDDL.
  2421. // Copyright 2014-2016 PALO, Richard.
  2422. // DO NOT EDIT THIS FILE.
  2423. //
  2424. // It has been auto-edited by fixincludes from:
  2425. //
  2426. // "/usr/include/sys/feature_tests.h"
  2427. //
  2428. // This had to be done to correct non-standard usages in the
  2429. // original, manufacturer supplied header file.
  2430. // CDDL HEADER START
  2431. //
  2432. // The contents of this file are subject to the terms of the
  2433. // Common Development and Distribution License (the "License").
  2434. // You may not use this file except in compliance with the License.
  2435. //
  2436. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2437. // or http://www.opensolaris.org/os/licensing.
  2438. // See the License for the specific language governing permissions
  2439. // and limitations under the License.
  2440. //
  2441. // When distributing Covered Code, include this CDDL HEADER in each
  2442. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2443. // If applicable, add the following below this CDDL HEADER, with the
  2444. // fields enclosed by brackets "[]" replaced with your own identifying
  2445. // information: Portions Copyright [yyyy] [name of copyright owner]
  2446. //
  2447. // CDDL HEADER END
  2448. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2449. // Copyright 2016 Joyent, Inc.
  2450. // Copyright 2022 Oxide Computer Company
  2451. //
  2452. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2453. // Use is subject to license terms.
  2454. // POSIX.1-2008 requires that the NULL macro be cast to type void *.
  2455. type Tm = struct {
  2456. Ftm_sec int32
  2457. Ftm_min int32
  2458. Ftm_hour int32
  2459. Ftm_mday int32
  2460. Ftm_mon int32
  2461. Ftm_year int32
  2462. Ftm_wday int32
  2463. Ftm_yday int32
  2464. Ftm_isdst int32
  2465. } /* time_iso.h:80:1 */
  2466. // Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
  2467. // definition of the sigevent structure. Both require the inclusion
  2468. // of <signal.h> and <time.h> when using the timer_create() function.
  2469. // However, X/Open also specifies that the sigevent structure be defined
  2470. // in <time.h> as described in the header <signal.h>. This prevents
  2471. // compiler warnings for applications that only include <time.h> and not
  2472. // also <signal.h>. The sigval union and the sigevent structure is
  2473. // therefore defined both here and in <sys/siginfo.h> which gets included
  2474. // via inclusion of <signal.h>.
  2475. type Sigval = struct {
  2476. F__ccgo_pad1 [0]uint64
  2477. Fsival_int int32
  2478. F__ccgo_pad2 [4]byte
  2479. } /* time.h:125:1 */
  2480. type Sigevent = struct {
  2481. Fsigev_notify int32
  2482. Fsigev_signo int32
  2483. Fsigev_value struct {
  2484. F__ccgo_pad1 [0]uint64
  2485. Fsival_int int32
  2486. F__ccgo_pad2 [4]byte
  2487. }
  2488. Fsigev_notify_function uintptr
  2489. Fsigev_notify_attributes uintptr
  2490. F__sigev_pad2 int32
  2491. F__ccgo_pad1 [4]byte
  2492. } /* time.h:133:1 */
  2493. type Locale_t = uintptr /* time.h:292:24 */
  2494. // The inclusion of <sys/select.h> is needed for the FD_CLR,
  2495. // FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
  2496. // select() prototype defined in the XOpen specifications
  2497. // beginning with XSH4v2. Placement required after definition
  2498. // for itimerval.
  2499. // CDDL HEADER START
  2500. //
  2501. // The contents of this file are subject to the terms of the
  2502. // Common Development and Distribution License (the "License").
  2503. // You may not use this file except in compliance with the License.
  2504. //
  2505. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2506. // or http://www.opensolaris.org/os/licensing.
  2507. // See the License for the specific language governing permissions
  2508. // and limitations under the License.
  2509. //
  2510. // When distributing Covered Code, include this CDDL HEADER in each
  2511. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2512. // If applicable, add the following below this CDDL HEADER, with the
  2513. // fields enclosed by brackets "[]" replaced with your own identifying
  2514. // information: Portions Copyright [yyyy] [name of copyright owner]
  2515. //
  2516. // CDDL HEADER END
  2517. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2518. //
  2519. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2520. //
  2521. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  2522. // Use is subject to license terms.
  2523. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2524. // All Rights Reserved
  2525. // University Copyright- Copyright (c) 1982, 1986, 1988
  2526. // The Regents of the University of California
  2527. // All Rights Reserved
  2528. //
  2529. // University Acknowledgment- Portions of this document are derived from
  2530. // software developed by the University of California, Berkeley, and its
  2531. // contributors.
  2532. // The sigset_t type is defined in <sys/signal.h> and duplicated
  2533. // in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
  2534. // now allows the visibility of signal.h in this header, however
  2535. // an order of inclusion problem occurs as a result of inclusion
  2536. // of <sys/select.h> in <signal.h> under certain conditions.
  2537. // Rather than include <sys/signal.h> here, we've duplicated
  2538. // the sigset_t type instead. This type is required for the XPG6
  2539. // introduced pselect() function also declared in this header.
  2540. type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
  2541. // Select uses bit masks of file descriptors in longs.
  2542. // These macros manipulate such bit fields.
  2543. // FD_SETSIZE may be defined by the user, but the default here
  2544. // should be >= RLIM_FD_MAX.
  2545. type Fd_mask = int64 /* select.h:92:14 */
  2546. type Fds_mask = int64 /* select.h:94:14 */
  2547. // The value of _NBBY needs to be consistant with the value
  2548. // of NBBY in <sys/param.h>.
  2549. type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
  2550. // The value of _NBBY needs to be consistant with the value
  2551. // of NBBY in <sys/param.h>.
  2552. type Fd_set = Fd_set1 /* select.h:125:3 */
  2553. // _VOID was defined to be either void or char but this is not
  2554. // required because previous SunOS compilers have accepted the void
  2555. // type. However, because many system header and source files use the
  2556. // void keyword, the volatile keyword, and ANSI C function prototypes,
  2557. // non-ANSI compilers cannot compile the system anyway. The _VOID macro
  2558. // should therefore not be used and remains for source compatibility
  2559. // only.
  2560. // CSTYLED
  2561. // CDDL HEADER START
  2562. //
  2563. // The contents of this file are subject to the terms of the
  2564. // Common Development and Distribution License (the "License").
  2565. // You may not use this file except in compliance with the License.
  2566. //
  2567. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2568. // or http://www.opensolaris.org/os/licensing.
  2569. // See the License for the specific language governing permissions
  2570. // and limitations under the License.
  2571. //
  2572. // When distributing Covered Code, include this CDDL HEADER in each
  2573. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2574. // If applicable, add the following below this CDDL HEADER, with the
  2575. // fields enclosed by brackets "[]" replaced with your own identifying
  2576. // information: Portions Copyright [yyyy] [name of copyright owner]
  2577. //
  2578. // CDDL HEADER END
  2579. // Copyright (c) 1988 AT&T
  2580. // All Rights Reserved
  2581. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2582. //
  2583. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  2584. // Use is subject to license terms.
  2585. // Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
  2586. // Copyright 2016 Joyent, Inc.
  2587. // CDDL HEADER START
  2588. //
  2589. // The contents of this file are subject to the terms of the
  2590. // Common Development and Distribution License (the "License").
  2591. // You may not use this file except in compliance with the License.
  2592. //
  2593. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2594. // or http://www.opensolaris.org/os/licensing.
  2595. // See the License for the specific language governing permissions
  2596. // and limitations under the License.
  2597. //
  2598. // When distributing Covered Code, include this CDDL HEADER in each
  2599. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2600. // If applicable, add the following below this CDDL HEADER, with the
  2601. // fields enclosed by brackets "[]" replaced with your own identifying
  2602. // information: Portions Copyright [yyyy] [name of copyright owner]
  2603. //
  2604. // CDDL HEADER END
  2605. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2606. //
  2607. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  2608. // Use is subject to license terms.
  2609. // CDDL HEADER START
  2610. //
  2611. // The contents of this file are subject to the terms of the
  2612. // Common Development and Distribution License (the "License").
  2613. // You may not use this file except in compliance with the License.
  2614. //
  2615. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2616. // or http://www.opensolaris.org/os/licensing.
  2617. // See the License for the specific language governing permissions
  2618. // and limitations under the License.
  2619. //
  2620. // When distributing Covered Code, include this CDDL HEADER in each
  2621. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2622. // If applicable, add the following below this CDDL HEADER, with the
  2623. // fields enclosed by brackets "[]" replaced with your own identifying
  2624. // information: Portions Copyright [yyyy] [name of copyright owner]
  2625. //
  2626. // CDDL HEADER END
  2627. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2628. // All Rights Reserved
  2629. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  2630. // Use is subject to license terms.
  2631. //
  2632. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2633. // Copyright 2016 Joyent, Inc.
  2634. // Copyright 2021 Oxide Computer Company
  2635. // CDDL HEADER START
  2636. //
  2637. // The contents of this file are subject to the terms of the
  2638. // Common Development and Distribution License (the "License").
  2639. // You may not use this file except in compliance with the License.
  2640. //
  2641. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2642. // or http://www.opensolaris.org/os/licensing.
  2643. // See the License for the specific language governing permissions
  2644. // and limitations under the License.
  2645. //
  2646. // When distributing Covered Code, include this CDDL HEADER in each
  2647. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2648. // If applicable, add the following below this CDDL HEADER, with the
  2649. // fields enclosed by brackets "[]" replaced with your own identifying
  2650. // information: Portions Copyright [yyyy] [name of copyright owner]
  2651. //
  2652. // CDDL HEADER END
  2653. // Copyright (c) 1988 AT&T
  2654. // All Rights Reserved
  2655. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2656. //
  2657. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  2658. // Use is subject to license terms.
  2659. // Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
  2660. // Copyright 2016 Joyent, Inc.
  2661. type Sched_param = struct {
  2662. Fsched_priority int32
  2663. Fsched_pad [8]int32
  2664. } /* sched.h:39:1 */
  2665. // Thread related attribute values defined as in thread.h.
  2666. // These are defined as bit pattern in thread.h.
  2667. // Any change here should be reflected in thread.h.
  2668. // detach
  2669. // scope
  2670. // Other attributes which are not defined in thread.h
  2671. // inherit
  2672. // Value of process-shared attribute
  2673. // These are defined as values defined in sys/synch.h
  2674. // Any change here should be reflected in sys/synch.h.
  2675. // mutex types
  2676. // keep these in synch which sys/synch.h lock flags
  2677. // Mutex protocol values. Keep these in synch with sys/synch.h lock types.
  2678. // Mutex robust attribute values.
  2679. // Keep these in synch with sys/synch.h lock types.
  2680. // Historical solaris-specific names,
  2681. // from before pthread_mutexattr_getrobust() became standardized
  2682. // macros - default initializers defined as in synch.h
  2683. // Any change here should be reflected in synch.h.
  2684. //
  2685. // NOTE:
  2686. // Make sure that any change in the macros is consistent with the definition
  2687. // of the corresponding types in sys/types.h (e.g. PTHREAD_MUTEX_INITIALIZER
  2688. // should be consistent with the definition for pthread_mutex_t).
  2689. // cancellation type and state
  2690. // pthread_once related values
  2691. // The key to be created by pthread_key_create_once_np()
  2692. // must be statically initialized with PTHREAD_ONCE_KEY_NP.
  2693. // This must be the same as THR_ONCE_KEY in <thread.h>
  2694. // barriers
  2695. // For pthread_{get,set}name_np().
  2696. // cancellation cleanup structure
  2697. type X_cleanup = struct{ Fpthread_cleanup_pad [4]uint64 } /* pthread.h:159:9 */
  2698. // Thread related attribute values defined as in thread.h.
  2699. // These are defined as bit pattern in thread.h.
  2700. // Any change here should be reflected in thread.h.
  2701. // detach
  2702. // scope
  2703. // Other attributes which are not defined in thread.h
  2704. // inherit
  2705. // Value of process-shared attribute
  2706. // These are defined as values defined in sys/synch.h
  2707. // Any change here should be reflected in sys/synch.h.
  2708. // mutex types
  2709. // keep these in synch which sys/synch.h lock flags
  2710. // Mutex protocol values. Keep these in synch with sys/synch.h lock types.
  2711. // Mutex robust attribute values.
  2712. // Keep these in synch with sys/synch.h lock types.
  2713. // Historical solaris-specific names,
  2714. // from before pthread_mutexattr_getrobust() became standardized
  2715. // macros - default initializers defined as in synch.h
  2716. // Any change here should be reflected in synch.h.
  2717. //
  2718. // NOTE:
  2719. // Make sure that any change in the macros is consistent with the definition
  2720. // of the corresponding types in sys/types.h (e.g. PTHREAD_MUTEX_INITIALIZER
  2721. // should be consistent with the definition for pthread_mutex_t).
  2722. // cancellation type and state
  2723. // pthread_once related values
  2724. // The key to be created by pthread_key_create_once_np()
  2725. // must be statically initialized with PTHREAD_ONCE_KEY_NP.
  2726. // This must be the same as THR_ONCE_KEY in <thread.h>
  2727. // barriers
  2728. // For pthread_{get,set}name_np().
  2729. // cancellation cleanup structure
  2730. type X_cleanup_t = X_cleanup /* pthread.h:161:3 */
  2731. type X_Voidfp = uintptr /* pthread.h:171:14 */
  2732. var _ int8 /* gen.c:2:13: */