signal_linux_ppc64le.go 130 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776
  1. // Code generated by 'ccgo signal/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 signal/signal_linux_ppc64le.go -pkgname signal', DO NOT EDIT.
  2. package signal
  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. AT_DCACHEBSIZE = 19 // auxvec.h:9:1:
  15. AT_ICACHEBSIZE = 20 // auxvec.h:10:1:
  16. AT_IGNOREPPC = 22 // auxvec.h:13:1:
  17. AT_L1D_CACHEGEOMETRY = 43 // auxvec.h:45:1:
  18. AT_L1D_CACHESIZE = 42 // auxvec.h:44:1:
  19. AT_L1I_CACHEGEOMETRY = 41 // auxvec.h:43:1:
  20. AT_L1I_CACHESIZE = 40 // auxvec.h:42:1:
  21. AT_L2_CACHEGEOMETRY = 45 // auxvec.h:47:1:
  22. AT_L2_CACHESIZE = 44 // auxvec.h:46:1:
  23. AT_L3_CACHEGEOMETRY = 47 // auxvec.h:49:1:
  24. AT_L3_CACHESIZE = 46 // auxvec.h:48:1:
  25. AT_SYSINFO_EHDR = 33 // auxvec.h:18:1:
  26. AT_UCACHEBSIZE = 21 // auxvec.h:11:1:
  27. AT_VECTOR_SIZE_ARCH = 14 // auxvec.h:51:1:
  28. ELF_NEBB = 3 // elf.h:98:1:
  29. ELF_NFPREG = 33 // elf.h:94:1:
  30. ELF_NGREG = 48 // elf.h:93:1:
  31. ELF_NPKEY = 3 // elf.h:100:1:
  32. ELF_NPMU = 5 // elf.h:99:1:
  33. ELF_NTMSPRREG = 3 // elf.h:97:1:
  34. ELF_NVMX = 34 // elf.h:95:1:
  35. ELF_NVRREG = 34 // elf.h:114:1:
  36. ELF_NVRREG32 = 33 // elf.h:113:1:
  37. ELF_NVSRHALFREG = 32 // elf.h:115:1:
  38. ELF_NVSX = 32 // elf.h:96:1:
  39. MINSIGSTKSZ = 4096 // sigstack.h:27:1:
  40. NFPREG = 33 // ucontext.h:89:1:
  41. NGREG = 48 // ucontext.h:88:1:
  42. NSIG = 65 // signal.h:181:1:
  43. NVRREG = 34 // ucontext.h:90:1:
  44. PPC_BREAKPOINT_CONDITION_AND = 0x00000001 // ptrace.h:259:1:
  45. PPC_BREAKPOINT_CONDITION_AND_OR = 0x00000003 // ptrace.h:262:1:
  46. PPC_BREAKPOINT_CONDITION_BE_ALL = 0x00ff0000 // ptrace.h:263:1:
  47. PPC_BREAKPOINT_CONDITION_BE_SHIFT = 16 // ptrace.h:264:1:
  48. PPC_BREAKPOINT_CONDITION_EXACT = 1 // ptrace.h:260:1:
  49. PPC_BREAKPOINT_CONDITION_MODE = 0x00000003 // ptrace.h:257:1:
  50. PPC_BREAKPOINT_CONDITION_NONE = 0x00000000 // ptrace.h:258:1:
  51. PPC_BREAKPOINT_CONDITION_OR = 0x00000002 // ptrace.h:261:1:
  52. PPC_BREAKPOINT_MODE_EXACT = 0x00000000 // ptrace.h:249:1:
  53. PPC_BREAKPOINT_MODE_MASK = 0x00000003 // ptrace.h:252:1:
  54. PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE = 0x00000002 // ptrace.h:251:1:
  55. PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE = 0x00000001 // ptrace.h:250:1:
  56. PPC_BREAKPOINT_TRIGGER_EXECUTE = 0x00000001 // ptrace.h:240:1:
  57. PPC_BREAKPOINT_TRIGGER_READ = 0x00000002 // ptrace.h:241:1:
  58. PPC_BREAKPOINT_TRIGGER_RW = 6 // ptrace.h:243:1:
  59. PPC_BREAKPOINT_TRIGGER_WRITE = 0x00000004 // ptrace.h:242:1:
  60. PPC_DEBUG_FEATURE_DATA_BP_ARCH_31 = 0x0000000000000020 // ptrace.h:221:1:
  61. PPC_DEBUG_FEATURE_DATA_BP_DAWR = 0x0000000000000010 // ptrace.h:220:1:
  62. PPC_DEBUG_FEATURE_DATA_BP_MASK = 0x0000000000000008 // ptrace.h:219:1:
  63. PPC_DEBUG_FEATURE_DATA_BP_RANGE = 0x0000000000000004 // ptrace.h:218:1:
  64. PPC_DEBUG_FEATURE_INSN_BP_MASK = 0x0000000000000002 // ptrace.h:217:1:
  65. PPC_DEBUG_FEATURE_INSN_BP_RANGE = 0x0000000000000001 // ptrace.h:216:1:
  66. PPC_FEATURE2_ARCH_2_07 = 0x80000000 // cputable.h:40:1:
  67. PPC_FEATURE2_ARCH_3_00 = 0x00800000 // cputable.h:48:1:
  68. PPC_FEATURE2_ARCH_3_1 = 0x00040000 // cputable.h:53:1:
  69. PPC_FEATURE2_DARN = 0x00200000 // cputable.h:50:1:
  70. PPC_FEATURE2_DSCR = 0x20000000 // cputable.h:42:1:
  71. PPC_FEATURE2_EBB = 0x10000000 // cputable.h:43:1:
  72. PPC_FEATURE2_HAS_IEEE128 = 0x00400000 // cputable.h:49:1:
  73. PPC_FEATURE2_HTM = 0x40000000 // cputable.h:41:1:
  74. PPC_FEATURE2_HTM_NOSC = 0x01000000 // cputable.h:47:1:
  75. PPC_FEATURE2_HTM_NO_SUSPEND = 0x00080000 // cputable.h:52:1:
  76. PPC_FEATURE2_ISEL = 0x08000000 // cputable.h:44:1:
  77. PPC_FEATURE2_MMA = 0x00020000 // cputable.h:54:1:
  78. PPC_FEATURE2_SCV = 0x00100000 // cputable.h:51:1:
  79. PPC_FEATURE2_TAR = 0x04000000 // cputable.h:45:1:
  80. PPC_FEATURE2_VEC_CRYPTO = 0x02000000 // cputable.h:46:1:
  81. PPC_FEATURE_32 = 0x80000000 // cputable.h:6:1:
  82. PPC_FEATURE_601_INSTR = 0x20000000 // cputable.h:8:1:
  83. PPC_FEATURE_64 = 0x40000000 // cputable.h:7:1:
  84. PPC_FEATURE_ARCH_2_05 = 0x00001000 // cputable.h:25:1:
  85. PPC_FEATURE_ARCH_2_06 = 0x00000100 // cputable.h:29:1:
  86. PPC_FEATURE_BOOKE = 0x00008000 // cputable.h:22:1:
  87. PPC_FEATURE_CELL = 0x00010000 // cputable.h:21:1:
  88. PPC_FEATURE_HAS_4xxMAC = 0x02000000 // cputable.h:12:1:
  89. PPC_FEATURE_HAS_ALTIVEC = 0x10000000 // cputable.h:9:1:
  90. PPC_FEATURE_HAS_DFP = 0x00000400 // cputable.h:27:1:
  91. PPC_FEATURE_HAS_EFP_DOUBLE = 0x00200000 // cputable.h:16:1:
  92. PPC_FEATURE_HAS_EFP_SINGLE = 0x00400000 // cputable.h:15:1:
  93. PPC_FEATURE_HAS_FPU = 0x08000000 // cputable.h:10:1:
  94. PPC_FEATURE_HAS_MMU = 0x04000000 // cputable.h:11:1:
  95. PPC_FEATURE_HAS_SPE = 0x00800000 // cputable.h:14:1:
  96. PPC_FEATURE_HAS_VSX = 0x00000080 // cputable.h:30:1:
  97. PPC_FEATURE_ICACHE_SNOOP = 0x00002000 // cputable.h:24:1:
  98. PPC_FEATURE_NO_TB = 0x00100000 // cputable.h:17:1:
  99. PPC_FEATURE_PA6T = 0x00000800 // cputable.h:26:1:
  100. PPC_FEATURE_POWER4 = 0x00080000 // cputable.h:18:1:
  101. PPC_FEATURE_POWER5 = 0x00040000 // cputable.h:19:1:
  102. PPC_FEATURE_POWER5_PLUS = 0x00020000 // cputable.h:20:1:
  103. PPC_FEATURE_POWER6_EXT = 0x00000200 // cputable.h:28:1:
  104. PPC_FEATURE_PPC_LE = 0x00000001 // cputable.h:37:1:
  105. PPC_FEATURE_PSERIES_PERFMON_COMPAT = 0x00000040 // cputable.h:32:1:
  106. PPC_FEATURE_SMT = 0x00004000 // cputable.h:23:1:
  107. PPC_FEATURE_TRUE_LE = 0x00000002 // cputable.h:36:1:
  108. PPC_FEATURE_UNIFIED_CACHE = 0x01000000 // cputable.h:13:1:
  109. PPC_PTRACE_DELHWDEBUG = 0x87 // ptrace.h:197:1:
  110. PPC_PTRACE_GETHWDBGINFO = 0x89 // ptrace.h:195:1:
  111. PPC_PTRACE_PEEKDATA_3264 = 0x94 // ptrace.h:187:1:
  112. PPC_PTRACE_PEEKTEXT_3264 = 0x95 // ptrace.h:186:1:
  113. PPC_PTRACE_PEEKUSR_3264 = 0x91 // ptrace.h:190:1:
  114. PPC_PTRACE_POKEDATA_3264 = 0x92 // ptrace.h:189:1:
  115. PPC_PTRACE_POKETEXT_3264 = 0x93 // ptrace.h:188:1:
  116. PPC_PTRACE_POKEUSR_3264 = 0x90 // ptrace.h:191:1:
  117. PPC_PTRACE_SETHWDEBUG = 0x88 // ptrace.h:196:1:
  118. PTRACE_GETEVRREGS = 0x14 // ptrace.h:157:1:
  119. PTRACE_GETFPREGS = 0xe // ptrace.h:180:1:
  120. PTRACE_GETREGS = 0xc // ptrace.h:178:1:
  121. PTRACE_GETREGS64 = 0x16 // ptrace.h:182:1:
  122. PTRACE_GETVRREGS = 0x12 // ptrace.h:152:1:
  123. PTRACE_GETVSRREGS = 0x1b // ptrace.h:161:1:
  124. PTRACE_GET_DEBUGREG = 0x19 // ptrace.h:172:1:
  125. PTRACE_SETEVRREGS = 0x15 // ptrace.h:158:1:
  126. PTRACE_SETFPREGS = 0xf // ptrace.h:181:1:
  127. PTRACE_SETREGS = 0xd // ptrace.h:179:1:
  128. PTRACE_SETREGS64 = 0x17 // ptrace.h:183:1:
  129. PTRACE_SETVRREGS = 0x13 // ptrace.h:153:1:
  130. PTRACE_SETVSRREGS = 0x1c // ptrace.h:162:1:
  131. PTRACE_SET_DEBUGREG = 0x1a // ptrace.h:173:1:
  132. PTRACE_SINGLEBLOCK = 0x100 // ptrace.h:193:1:
  133. PTRACE_SYSEMU = 0x1d // ptrace.h:165:1:
  134. PTRACE_SYSEMU_SINGLESTEP = 0x1e // ptrace.h:166:1:
  135. PT_CCR = 38 // ptrace.h:103:1:
  136. PT_CTR = 35 // ptrace.h:100:1:
  137. PT_DAR = 41 // ptrace.h:110:1:
  138. PT_DSCR = 44 // ptrace.h:113:1:
  139. PT_DSISR = 42 // ptrace.h:111:1:
  140. PT_FPR0 = 48 // ptrace.h:116:1:
  141. PT_FPSCR = 80 // ptrace.h:125:1:
  142. PT_LNK = 36 // ptrace.h:101:1:
  143. PT_MSR = 33 // ptrace.h:98:1:
  144. PT_NIP = 32 // ptrace.h:97:1:
  145. PT_ORIG_R3 = 34 // ptrace.h:99:1:
  146. PT_R0 = 0 // ptrace.h:64:1:
  147. PT_R1 = 1 // ptrace.h:65:1:
  148. PT_R10 = 10 // ptrace.h:74:1:
  149. PT_R11 = 11 // ptrace.h:75:1:
  150. PT_R12 = 12 // ptrace.h:76:1:
  151. PT_R13 = 13 // ptrace.h:77:1:
  152. PT_R14 = 14 // ptrace.h:78:1:
  153. PT_R15 = 15 // ptrace.h:79:1:
  154. PT_R16 = 16 // ptrace.h:80:1:
  155. PT_R17 = 17 // ptrace.h:81:1:
  156. PT_R18 = 18 // ptrace.h:82:1:
  157. PT_R19 = 19 // ptrace.h:83:1:
  158. PT_R2 = 2 // ptrace.h:66:1:
  159. PT_R20 = 20 // ptrace.h:84:1:
  160. PT_R21 = 21 // ptrace.h:85:1:
  161. PT_R22 = 22 // ptrace.h:86:1:
  162. PT_R23 = 23 // ptrace.h:87:1:
  163. PT_R24 = 24 // ptrace.h:88:1:
  164. PT_R25 = 25 // ptrace.h:89:1:
  165. PT_R26 = 26 // ptrace.h:90:1:
  166. PT_R27 = 27 // ptrace.h:91:1:
  167. PT_R28 = 28 // ptrace.h:92:1:
  168. PT_R29 = 29 // ptrace.h:93:1:
  169. PT_R3 = 3 // ptrace.h:67:1:
  170. PT_R30 = 30 // ptrace.h:94:1:
  171. PT_R31 = 31 // ptrace.h:95:1:
  172. PT_R4 = 4 // ptrace.h:68:1:
  173. PT_R5 = 5 // ptrace.h:69:1:
  174. PT_R6 = 6 // ptrace.h:70:1:
  175. PT_R7 = 7 // ptrace.h:71:1:
  176. PT_R8 = 8 // ptrace.h:72:1:
  177. PT_R9 = 9 // ptrace.h:73:1:
  178. PT_REGS_COUNT = 44 // ptrace.h:114:1:
  179. PT_RESULT = 43 // ptrace.h:112:1:
  180. PT_SOFTE = 39 // ptrace.h:107:1:
  181. PT_TRAP = 40 // ptrace.h:109:1:
  182. PT_VR0 = 82 // ptrace.h:128:1:
  183. PT_VRSAVE = 148 // ptrace.h:130:1:
  184. PT_VSCR = 147 // ptrace.h:129:1:
  185. PT_VSR0 = 150 // ptrace.h:136:1:
  186. PT_VSR31 = 212 // ptrace.h:137:1:
  187. PT_XER = 37 // ptrace.h:102:1:
  188. R_PPC64_ADDR14 = 7 // elf.h:175:1:
  189. R_PPC64_ADDR14_BRNTAKEN = 9 // elf.h:177:1:
  190. R_PPC64_ADDR14_BRTAKEN = 8 // elf.h:176:1:
  191. R_PPC64_ADDR16 = 3 // elf.h:171:1:
  192. R_PPC64_ADDR16_DS = 56 // elf.h:225:1:
  193. R_PPC64_ADDR16_HA = 6 // elf.h:174:1:
  194. R_PPC64_ADDR16_HI = 5 // elf.h:173:1:
  195. R_PPC64_ADDR16_HIGHER = 39 // elf.h:207:1:
  196. R_PPC64_ADDR16_HIGHERA = 40 // elf.h:208:1:
  197. R_PPC64_ADDR16_HIGHEST = 41 // elf.h:209:1:
  198. R_PPC64_ADDR16_HIGHESTA = 42 // elf.h:210:1:
  199. R_PPC64_ADDR16_LO = 4 // elf.h:172:1:
  200. R_PPC64_ADDR16_LO_DS = 57 // elf.h:226:1:
  201. R_PPC64_ADDR24 = 2 // elf.h:170:1:
  202. R_PPC64_ADDR30 = 37 // elf.h:205:1:
  203. R_PPC64_ADDR32 = 1 // elf.h:169:1:
  204. R_PPC64_ADDR64 = 38 // elf.h:206:1:
  205. R_PPC64_COPY = 19 // elf.h:187:1:
  206. R_PPC64_DTPMOD64 = 68 // elf.h:239:1:
  207. R_PPC64_DTPREL16 = 74 // elf.h:245:1:
  208. R_PPC64_DTPREL16_DS = 101 // elf.h:272:1:
  209. R_PPC64_DTPREL16_HA = 77 // elf.h:248:1:
  210. R_PPC64_DTPREL16_HI = 76 // elf.h:247:1:
  211. R_PPC64_DTPREL16_HIGHER = 103 // elf.h:274:1:
  212. R_PPC64_DTPREL16_HIGHERA = 104 // elf.h:275:1:
  213. R_PPC64_DTPREL16_HIGHEST = 105 // elf.h:276:1:
  214. R_PPC64_DTPREL16_HIGHESTA = 106 // elf.h:277:1:
  215. R_PPC64_DTPREL16_LO = 75 // elf.h:246:1:
  216. R_PPC64_DTPREL16_LO_DS = 102 // elf.h:273:1:
  217. R_PPC64_DTPREL64 = 78 // elf.h:249:1:
  218. R_PPC64_ENTRY = 118 // elf.h:282:1:
  219. R_PPC64_GLOB_DAT = 20 // elf.h:188:1:
  220. R_PPC64_GOT16 = 14 // elf.h:182:1:
  221. R_PPC64_GOT16_DS = 58 // elf.h:227:1:
  222. R_PPC64_GOT16_HA = 17 // elf.h:185:1:
  223. R_PPC64_GOT16_HI = 16 // elf.h:184:1:
  224. R_PPC64_GOT16_LO = 15 // elf.h:183:1:
  225. R_PPC64_GOT16_LO_DS = 59 // elf.h:228:1:
  226. R_PPC64_GOT_DTPREL16_DS = 91 // elf.h:262:1:
  227. R_PPC64_GOT_DTPREL16_HA = 94 // elf.h:265:1:
  228. R_PPC64_GOT_DTPREL16_HI = 93 // elf.h:264:1:
  229. R_PPC64_GOT_DTPREL16_LO_DS = 92 // elf.h:263:1:
  230. R_PPC64_GOT_TLSGD16 = 79 // elf.h:250:1:
  231. R_PPC64_GOT_TLSGD16_HA = 82 // elf.h:253:1:
  232. R_PPC64_GOT_TLSGD16_HI = 81 // elf.h:252:1:
  233. R_PPC64_GOT_TLSGD16_LO = 80 // elf.h:251:1:
  234. R_PPC64_GOT_TLSLD16 = 83 // elf.h:254:1:
  235. R_PPC64_GOT_TLSLD16_HA = 86 // elf.h:257:1:
  236. R_PPC64_GOT_TLSLD16_HI = 85 // elf.h:256:1:
  237. R_PPC64_GOT_TLSLD16_LO = 84 // elf.h:255:1:
  238. R_PPC64_GOT_TPREL16_DS = 87 // elf.h:258:1:
  239. R_PPC64_GOT_TPREL16_HA = 90 // elf.h:261:1:
  240. R_PPC64_GOT_TPREL16_HI = 89 // elf.h:260:1:
  241. R_PPC64_GOT_TPREL16_LO_DS = 88 // elf.h:259:1:
  242. R_PPC64_JMP_SLOT = 21 // elf.h:189:1:
  243. R_PPC64_NONE = 0 // elf.h:168:1:
  244. R_PPC64_NUM = 253 // elf.h:290:1:
  245. R_PPC64_PLT16_HA = 31 // elf.h:199:1:
  246. R_PPC64_PLT16_HI = 30 // elf.h:198:1:
  247. R_PPC64_PLT16_LO = 29 // elf.h:197:1:
  248. R_PPC64_PLT16_LO_DS = 60 // elf.h:229:1:
  249. R_PPC64_PLT32 = 27 // elf.h:195:1:
  250. R_PPC64_PLT64 = 45 // elf.h:213:1:
  251. R_PPC64_PLTGOT16 = 52 // elf.h:220:1:
  252. R_PPC64_PLTGOT16_DS = 65 // elf.h:234:1:
  253. R_PPC64_PLTGOT16_HA = 55 // elf.h:223:1:
  254. R_PPC64_PLTGOT16_HI = 54 // elf.h:222:1:
  255. R_PPC64_PLTGOT16_LO = 53 // elf.h:221:1:
  256. R_PPC64_PLTGOT16_LO_DS = 66 // elf.h:235:1:
  257. R_PPC64_PLTREL32 = 28 // elf.h:196:1:
  258. R_PPC64_PLTREL64 = 46 // elf.h:214:1:
  259. R_PPC64_REL14 = 11 // elf.h:179:1:
  260. R_PPC64_REL14_BRNTAKEN = 13 // elf.h:181:1:
  261. R_PPC64_REL14_BRTAKEN = 12 // elf.h:180:1:
  262. R_PPC64_REL16 = 249 // elf.h:284:1:
  263. R_PPC64_REL16_HA = 252 // elf.h:287:1:
  264. R_PPC64_REL16_HI = 251 // elf.h:286:1:
  265. R_PPC64_REL16_LO = 250 // elf.h:285:1:
  266. R_PPC64_REL24 = 10 // elf.h:178:1:
  267. R_PPC64_REL32 = 26 // elf.h:194:1:
  268. R_PPC64_REL64 = 44 // elf.h:212:1:
  269. R_PPC64_RELATIVE = 22 // elf.h:190:1:
  270. R_PPC64_SECTOFF = 33 // elf.h:201:1:
  271. R_PPC64_SECTOFF_DS = 61 // elf.h:230:1:
  272. R_PPC64_SECTOFF_HA = 36 // elf.h:204:1:
  273. R_PPC64_SECTOFF_HI = 35 // elf.h:203:1:
  274. R_PPC64_SECTOFF_LO = 34 // elf.h:202:1:
  275. R_PPC64_SECTOFF_LO_DS = 62 // elf.h:231:1:
  276. R_PPC64_TLS = 67 // elf.h:238:1:
  277. R_PPC64_TLSGD = 107 // elf.h:278:1:
  278. R_PPC64_TLSLD = 108 // elf.h:279:1:
  279. R_PPC64_TOC = 51 // elf.h:219:1:
  280. R_PPC64_TOC16 = 47 // elf.h:215:1:
  281. R_PPC64_TOC16_DS = 63 // elf.h:232:1:
  282. R_PPC64_TOC16_HA = 50 // elf.h:218:1:
  283. R_PPC64_TOC16_HI = 49 // elf.h:217:1:
  284. R_PPC64_TOC16_LO = 48 // elf.h:216:1:
  285. R_PPC64_TOC16_LO_DS = 64 // elf.h:233:1:
  286. R_PPC64_TOCSAVE = 109 // elf.h:280:1:
  287. R_PPC64_TPREL16 = 69 // elf.h:240:1:
  288. R_PPC64_TPREL16_DS = 95 // elf.h:266:1:
  289. R_PPC64_TPREL16_HA = 72 // elf.h:243:1:
  290. R_PPC64_TPREL16_HI = 71 // elf.h:242:1:
  291. R_PPC64_TPREL16_HIGHER = 97 // elf.h:268:1:
  292. R_PPC64_TPREL16_HIGHERA = 98 // elf.h:269:1:
  293. R_PPC64_TPREL16_HIGHEST = 99 // elf.h:270:1:
  294. R_PPC64_TPREL16_HIGHESTA = 100 // elf.h:271:1:
  295. R_PPC64_TPREL16_LO = 70 // elf.h:241:1:
  296. R_PPC64_TPREL16_LO_DS = 96 // elf.h:267:1:
  297. R_PPC64_TPREL64 = 73 // elf.h:244:1:
  298. R_PPC64_UADDR16 = 25 // elf.h:193:1:
  299. R_PPC64_UADDR32 = 24 // elf.h:192:1:
  300. R_PPC64_UADDR64 = 43 // elf.h:211:1:
  301. R_PPC_ADDR14 = 7 // elf.h:28:1:
  302. R_PPC_ADDR14_BRNTAKEN = 9 // elf.h:30:1:
  303. R_PPC_ADDR14_BRTAKEN = 8 // elf.h:29:1:
  304. R_PPC_ADDR16 = 3 // elf.h:24:1:
  305. R_PPC_ADDR16_HA = 6 // elf.h:27:1:
  306. R_PPC_ADDR16_HI = 5 // elf.h:26:1:
  307. R_PPC_ADDR16_LO = 4 // elf.h:25:1:
  308. R_PPC_ADDR24 = 2 // elf.h:23:1:
  309. R_PPC_ADDR32 = 1 // elf.h:22:1:
  310. R_PPC_COPY = 19 // elf.h:40:1:
  311. R_PPC_DTPMOD32 = 68 // elf.h:61:1:
  312. R_PPC_DTPREL16 = 74 // elf.h:67:1:
  313. R_PPC_DTPREL16_HA = 77 // elf.h:70:1:
  314. R_PPC_DTPREL16_HI = 76 // elf.h:69:1:
  315. R_PPC_DTPREL16_LO = 75 // elf.h:68:1:
  316. R_PPC_DTPREL32 = 78 // elf.h:71:1:
  317. R_PPC_GLOB_DAT = 20 // elf.h:41:1:
  318. R_PPC_GOT16 = 14 // elf.h:35:1:
  319. R_PPC_GOT16_HA = 17 // elf.h:38:1:
  320. R_PPC_GOT16_HI = 16 // elf.h:37:1:
  321. R_PPC_GOT16_LO = 15 // elf.h:36:1:
  322. R_PPC_GOT_DTPREL16 = 91 // elf.h:84:1:
  323. R_PPC_GOT_DTPREL16_HA = 94 // elf.h:87:1:
  324. R_PPC_GOT_DTPREL16_HI = 93 // elf.h:86:1:
  325. R_PPC_GOT_DTPREL16_LO = 92 // elf.h:85:1:
  326. R_PPC_GOT_TLSGD16 = 79 // elf.h:72:1:
  327. R_PPC_GOT_TLSGD16_HA = 82 // elf.h:75:1:
  328. R_PPC_GOT_TLSGD16_HI = 81 // elf.h:74:1:
  329. R_PPC_GOT_TLSGD16_LO = 80 // elf.h:73:1:
  330. R_PPC_GOT_TLSLD16 = 83 // elf.h:76:1:
  331. R_PPC_GOT_TLSLD16_HA = 86 // elf.h:79:1:
  332. R_PPC_GOT_TLSLD16_HI = 85 // elf.h:78:1:
  333. R_PPC_GOT_TLSLD16_LO = 84 // elf.h:77:1:
  334. R_PPC_GOT_TPREL16 = 87 // elf.h:80:1:
  335. R_PPC_GOT_TPREL16_HA = 90 // elf.h:83:1:
  336. R_PPC_GOT_TPREL16_HI = 89 // elf.h:82:1:
  337. R_PPC_GOT_TPREL16_LO = 88 // elf.h:81:1:
  338. R_PPC_JMP_SLOT = 21 // elf.h:42:1:
  339. R_PPC_LOCAL24PC = 23 // elf.h:44:1:
  340. R_PPC_NONE = 0 // elf.h:21:1:
  341. R_PPC_NUM = 95 // elf.h:90:1:
  342. R_PPC_PLT16_HA = 31 // elf.h:52:1:
  343. R_PPC_PLT16_HI = 30 // elf.h:51:1:
  344. R_PPC_PLT16_LO = 29 // elf.h:50:1:
  345. R_PPC_PLT32 = 27 // elf.h:48:1:
  346. R_PPC_PLTREL24 = 18 // elf.h:39:1:
  347. R_PPC_PLTREL32 = 28 // elf.h:49:1:
  348. R_PPC_REL14 = 11 // elf.h:32:1:
  349. R_PPC_REL14_BRNTAKEN = 13 // elf.h:34:1:
  350. R_PPC_REL14_BRTAKEN = 12 // elf.h:33:1:
  351. R_PPC_REL24 = 10 // elf.h:31:1:
  352. R_PPC_REL32 = 26 // elf.h:47:1:
  353. R_PPC_RELATIVE = 22 // elf.h:43:1:
  354. R_PPC_SDAREL16 = 32 // elf.h:53:1:
  355. R_PPC_SECTOFF = 33 // elf.h:54:1:
  356. R_PPC_SECTOFF_HA = 36 // elf.h:57:1:
  357. R_PPC_SECTOFF_HI = 35 // elf.h:56:1:
  358. R_PPC_SECTOFF_LO = 34 // elf.h:55:1:
  359. R_PPC_TLS = 67 // elf.h:60:1:
  360. R_PPC_TPREL16 = 69 // elf.h:62:1:
  361. R_PPC_TPREL16_HA = 72 // elf.h:65:1:
  362. R_PPC_TPREL16_HI = 71 // elf.h:64:1:
  363. R_PPC_TPREL16_LO = 70 // elf.h:63:1:
  364. R_PPC_TPREL32 = 73 // elf.h:66:1:
  365. R_PPC_UADDR16 = 25 // elf.h:46:1:
  366. R_PPC_UADDR32 = 24 // elf.h:45:1:
  367. SA_INTERRUPT = 0x20000000 // sigaction.h:70:1:
  368. SA_NOCLDSTOP = 1 // sigaction.h:56:1:
  369. SA_NOCLDWAIT = 2 // sigaction.h:57:1:
  370. SA_NODEFER = 0x40000000 // sigaction.h:65:1:
  371. SA_NOMASK = 1073741824 // sigaction.h:73:1:
  372. SA_ONESHOT = 2147483648 // sigaction.h:74:1:
  373. SA_ONSTACK = 0x08000000 // sigaction.h:61:1:
  374. SA_RESETHAND = 0x80000000 // sigaction.h:67:1:
  375. SA_RESTART = 0x10000000 // sigaction.h:64:1:
  376. SA_SIGINFO = 4 // sigaction.h:58:1:
  377. SA_STACK = 134217728 // sigaction.h:75:1:
  378. SIGABRT = 6 // signum-generic.h:50:1:
  379. SIGALRM = 14 // signum-generic.h:63:1:
  380. SIGBUS = 7 // signum.h:35:1:
  381. SIGCHLD = 17 // signum.h:41:1:
  382. SIGCLD = 17 // signum-generic.h:88:1:
  383. SIGCONT = 18 // signum.h:43:1:
  384. SIGFPE = 8 // signum-generic.h:51:1:
  385. SIGHUP = 1 // signum-generic.h:56:1:
  386. SIGILL = 4 // signum-generic.h:49:1:
  387. SIGINT = 2 // signum-generic.h:48:1:
  388. SIGIO = 29 // signum-generic.h:86:1:
  389. SIGIOT = 6 // signum-generic.h:87:1:
  390. SIGKILL = 9 // signum-generic.h:59:1:
  391. SIGPIPE = 13 // signum-generic.h:62:1:
  392. SIGPOLL = 29 // signum.h:51:1:
  393. SIGPROF = 27 // signum-generic.h:77:1:
  394. SIGPWR = 30 // signum.h:32:1:
  395. SIGQUIT = 3 // signum-generic.h:57:1:
  396. SIGSEGV = 11 // signum-generic.h:52:1:
  397. SIGSTKFLT = 16 // signum.h:31:1:
  398. SIGSTKSZ = 16384 // sigstack.h:30:1:
  399. SIGSTOP = 19 // signum.h:45:1:
  400. SIGSYS = 31 // signum.h:53:1:
  401. SIGTERM = 15 // signum-generic.h:53:1:
  402. SIGTRAP = 5 // signum-generic.h:58:1:
  403. SIGTSTP = 20 // signum.h:47:1:
  404. SIGTTIN = 21 // signum-generic.h:71:1:
  405. SIGTTOU = 22 // signum-generic.h:72:1:
  406. SIGURG = 23 // signum.h:49:1:
  407. SIGUSR1 = 10 // signum.h:37:1:
  408. SIGUSR2 = 12 // signum.h:39:1:
  409. SIGVTALRM = 26 // signum-generic.h:76:1:
  410. SIGWINCH = 28 // signum-generic.h:83:1:
  411. SIGXCPU = 24 // signum-generic.h:74:1:
  412. SIGXFSZ = 25 // signum-generic.h:75:1:
  413. SIG_BLOCK = 0 // sigaction.h:79:1:
  414. SIG_SETMASK = 2 // sigaction.h:81:1:
  415. SIG_UNBLOCK = 1 // sigaction.h:80:1:
  416. X_ARCH_PPC = 1 // <predefined>:198:1:
  417. X_ARCH_PPC64 = 1 // <predefined>:402:1:
  418. X_ARCH_PPCGR = 1 // <predefined>:15:1:
  419. X_ARCH_PPCSQ = 1 // <predefined>:43:1:
  420. X_ARCH_PWR4 = 1 // <predefined>:381:1:
  421. X_ARCH_PWR5 = 1 // <predefined>:90:1:
  422. X_ARCH_PWR5X = 1 // <predefined>:137:1:
  423. X_ARCH_PWR6 = 1 // <predefined>:91:1:
  424. X_ARCH_PWR7 = 1 // <predefined>:92:1:
  425. X_ARCH_PWR8 = 1 // <predefined>:93:1:
  426. X_ASM_GENERIC_INT_L64_H = 0 // int-l64.h:10:1:
  427. X_ASM_POWERPC_AUXVEC_H = 0 // auxvec.h:3:1:
  428. X_ASM_POWERPC_ELF_H = 0 // elf.h:11:1:
  429. X_ASM_POWERPC_POSIX_TYPES_H = 0 // posix_types.h:3:1:
  430. X_ASM_POWERPC_PTRACE_H = 0 // ptrace.h:25:1:
  431. X_ASM_POWERPC_SIGCONTEXT_H = 0 // sigcontext.h:3:1:
  432. X_ASM_POWERPC_TYPES_H = 0 // types.h:15:1:
  433. X_ATFILE_SOURCE = 1 // features.h:342:1:
  434. X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
  435. X_BITS_ENDIAN_H = 1 // endian.h:20:1:
  436. X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:21:1:
  437. X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
  438. X_BITS_SIGACTION_H = 1 // sigaction.h:20:1:
  439. X_BITS_SIGCONTEXT_H = 1 // sigcontext.h:19:1:
  440. X_BITS_SIGEVENT_CONSTS_H = 1 // sigevent-consts.h:20:1:
  441. X_BITS_SIGINFO_ARCH_H = 1 // siginfo-arch.h:3:1:
  442. X_BITS_SIGINFO_CONSTS_H = 1 // siginfo-consts.h:20:1:
  443. X_BITS_SIGNUM_GENERIC_H = 1 // signum-generic.h:20:1:
  444. X_BITS_SIGNUM_H = 1 // signum.h:20:1:
  445. X_BITS_SIGSTACK_H = 1 // sigstack.h:20:1:
  446. X_BITS_SIGTHREAD_H = 1 // sigthread.h:20:1:
  447. X_BITS_SS_FLAGS_H = 1 // ss_flags.h:20:1:
  448. X_BITS_TIME64_H = 1 // time64.h:24:1:
  449. X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
  450. X_BITS_TYPES_H = 1 // types.h:24:1:
  451. X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
  452. X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
  453. X_CALL_ELF = 2 // <predefined>:415:1:
  454. X_CALL_LINUX = 1 // <predefined>:123:1:
  455. X_DEFAULT_SOURCE = 1 // features.h:227:1:
  456. X_FEATURES_H = 1 // features.h:19:1:
  457. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  458. X_GCC_SIZE_T = 0 // stddef.h:195:1:
  459. X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
  460. X_LINUX_TYPES_H = 0 // types.h:3:1:
  461. X_LITTLE_ENDIAN = 1 // <predefined>:37:1:
  462. X_LP64 = 1 // <predefined>:335:1:
  463. X_NSIG = 65 // signum-generic.h:100:1:
  464. X_POSIX_C_SOURCE = 200809 // features.h:281:1:
  465. X_POSIX_SOURCE = 1 // features.h:279:1:
  466. X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
  467. X_SIGNAL_H = 0 // signal.h:23:1:
  468. X_SIZET_ = 0 // stddef.h:196:1:
  469. X_SIZE_T = 0 // stddef.h:183:1:
  470. X_SIZE_T_ = 0 // stddef.h:188:1:
  471. X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
  472. X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
  473. X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
  474. X_STDC_PREDEF_H = 1 // <predefined>:203:1:
  475. X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
  476. X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
  477. X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
  478. X_SYS_UCONTEXT_H = 1 // ucontext.h:19:1:
  479. X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
  480. X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
  481. X_T_SIZE = 0 // stddef.h:186:1:
  482. X_T_SIZE_ = 0 // stddef.h:185:1:
  483. Linux = 1 // <predefined>:263:1:
  484. Unix = 1 // <predefined>:222:1:
  485. )
  486. // POSIX names to access some of the members.
  487. // sigevent constants. Linux version.
  488. // Copyright (C) 1997-2020 Free Software Foundation, Inc.
  489. // This file is part of the GNU C Library.
  490. //
  491. // The GNU C Library is free software; you can redistribute it and/or
  492. // modify it under the terms of the GNU Lesser General Public
  493. // License as published by the Free Software Foundation; either
  494. // version 2.1 of the License, or (at your option) any later version.
  495. //
  496. // The GNU C Library is distributed in the hope that it will be useful,
  497. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  498. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  499. // Lesser General Public License for more details.
  500. //
  501. // You should have received a copy of the GNU Lesser General Public
  502. // License along with the GNU C Library; if not, see
  503. // <https://www.gnu.org/licenses/>.
  504. // `sigev_notify' values.
  505. const ( /* sigevent-consts.h:27:1: */
  506. SIGEV_SIGNAL = 0 // Notify via signal.
  507. SIGEV_NONE = 1 // Other notification: meaningless.
  508. SIGEV_THREAD = 2 // Deliver via thread creation.
  509. SIGEV_THREAD_ID = 4
  510. )
  511. // `si_code' values for SIGSEGV signal.
  512. const ( /* siginfo-consts.h:119:1: */
  513. SEGV_MAPERR = 1 // Address not mapped to object.
  514. SEGV_ACCERR = 2 // Invalid permissions for mapped object.
  515. SEGV_BNDERR = 3 // Bounds checking failure.
  516. SEGV_PKUERR = 4 // Protection key checking failure.
  517. SEGV_ACCADI = 5 // ADI not enabled for mapped object.
  518. SEGV_ADIDERR = 6 // Disrupting MCD error.
  519. SEGV_ADIPERR = 7
  520. )
  521. // `si_code' values for SIGBUS signal.
  522. const ( /* siginfo-consts.h:138:1: */
  523. BUS_ADRALN = 1 // Invalid address alignment.
  524. BUS_ADRERR = 2 // Non-existant physical address.
  525. BUS_OBJERR = 3 // Object specific hardware error.
  526. BUS_MCEERR_AR = 4 // Hardware memory error: action required.
  527. BUS_MCEERR_AO = 5
  528. )
  529. // `si_code' values for SIGCHLD signal.
  530. const ( /* siginfo-consts.h:172:1: */
  531. CLD_EXITED = 1 // Child has exited.
  532. CLD_KILLED = 2 // Child was killed.
  533. CLD_DUMPED = 3 // Child terminated abnormally.
  534. CLD_TRAPPED = 4 // Traced child has trapped.
  535. CLD_STOPPED = 5 // Child has stopped.
  536. CLD_CONTINUED = 6
  537. )
  538. // `si_code' values for SIGPOLL signal.
  539. const ( /* siginfo-consts.h:189:1: */
  540. POLL_IN = 1 // Data input available.
  541. POLL_OUT = 2 // Output buffers available.
  542. POLL_MSG = 3 // Input message available.
  543. POLL_ERR = 4 // I/O error.
  544. POLL_PRI = 5 // High priority input available.
  545. POLL_HUP = 6
  546. )
  547. // X/Open requires some more fields with fixed names.
  548. // siginfo constants. Linux version.
  549. // Copyright (C) 1997-2020 Free Software Foundation, Inc.
  550. // This file is part of the GNU C Library.
  551. //
  552. // The GNU C Library is free software; you can redistribute it and/or
  553. // modify it under the terms of the GNU Lesser General Public
  554. // License as published by the Free Software Foundation; either
  555. // version 2.1 of the License, or (at your option) any later version.
  556. //
  557. // The GNU C Library is distributed in the hope that it will be useful,
  558. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  559. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  560. // Lesser General Public License for more details.
  561. //
  562. // You should have received a copy of the GNU Lesser General Public
  563. // License along with the GNU C Library; if not, see
  564. // <https://www.gnu.org/licenses/>.
  565. // Most of these constants are uniform across all architectures, but there
  566. // is one exception.
  567. // Architecture-specific adjustments to siginfo_t.
  568. // Values for `si_code'. Positive values are reserved for kernel-generated
  569. //
  570. // signals.
  571. const ( /* siginfo-consts.h:35:1: */
  572. SI_ASYNCNL = -60 // Sent by asynch name lookup completion.
  573. SI_DETHREAD = -7 // Sent by execve killing subsidiary
  574. // threads.
  575. SI_TKILL = -6 // Sent by tkill.
  576. SI_SIGIO = -5 // Sent by queued SIGIO.
  577. SI_ASYNCIO = -4 // Sent by AIO completion.
  578. SI_MESGQ = -3 // Sent by real time mesq state change.
  579. SI_TIMER = -2 // Sent by timer expiration.
  580. SI_QUEUE = -1 // Sent by sigqueue.
  581. SI_USER = 0 // Sent by kill, sigsend.
  582. SI_KERNEL = 128
  583. )
  584. // `si_code' values for SIGILL signal.
  585. const ( /* siginfo-consts.h:71:1: */
  586. ILL_ILLOPC = 1 // Illegal opcode.
  587. ILL_ILLOPN = 2 // Illegal operand.
  588. ILL_ILLADR = 3 // Illegal addressing mode.
  589. ILL_ILLTRP = 4 // Illegal trap.
  590. ILL_PRVOPC = 5 // Privileged opcode.
  591. ILL_PRVREG = 6 // Privileged register.
  592. ILL_COPROC = 7 // Coprocessor error.
  593. ILL_BADSTK = 8 // Internal stack error.
  594. ILL_BADIADDR = 9
  595. )
  596. // `si_code' values for SIGFPE signal.
  597. const ( /* siginfo-consts.h:94:1: */
  598. FPE_INTDIV = 1 // Integer divide by zero.
  599. FPE_INTOVF = 2 // Integer overflow.
  600. FPE_FLTDIV = 3 // Floating point divide by zero.
  601. FPE_FLTOVF = 4 // Floating point overflow.
  602. FPE_FLTUND = 5 // Floating point underflow.
  603. FPE_FLTRES = 6 // Floating point inexact result.
  604. FPE_FLTINV = 7 // Floating point invalid operation.
  605. FPE_FLTSUB = 8 // Subscript out of range.
  606. FPE_FLTUNK = 14 // Undiagnosed floating-point exception.
  607. FPE_CONDTRAP = 15
  608. )
  609. // sigstack, sigaltstack definitions.
  610. // Copyright (C) 1998-2020 Free Software Foundation, Inc.
  611. // This file is part of the GNU C Library.
  612. //
  613. // The GNU C Library is free software; you can redistribute it and/or
  614. // modify it under the terms of the GNU Lesser General Public
  615. // License as published by the Free Software Foundation; either
  616. // version 2.1 of the License, or (at your option) any later version.
  617. //
  618. // The GNU C Library is distributed in the hope that it will be useful,
  619. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  620. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  621. // Lesser General Public License for more details.
  622. //
  623. // You should have received a copy of the GNU Lesser General Public
  624. // License along with the GNU C Library; if not, see
  625. // <https://www.gnu.org/licenses/>.
  626. // Minimum stack size for a signal handler.
  627. // System default stack size.
  628. // ss_flags values for stack_t. Linux version.
  629. // Copyright (C) 1998-2020 Free Software Foundation, Inc.
  630. // This file is part of the GNU C Library.
  631. //
  632. // The GNU C Library is free software; you can redistribute it and/or
  633. // modify it under the terms of the GNU Lesser General Public
  634. // License as published by the Free Software Foundation; either
  635. // version 2.1 of the License, or (at your option) any later version.
  636. //
  637. // The GNU C Library is distributed in the hope that it will be useful,
  638. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  639. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  640. // Lesser General Public License for more details.
  641. //
  642. // You should have received a copy of the GNU Lesser General Public
  643. // License along with the GNU C Library; if not, see
  644. // <https://www.gnu.org/licenses/>.
  645. // Possible values for `ss_flags'.
  646. const ( /* ss_flags.h:27:1: */
  647. SS_ONSTACK = 1
  648. SS_DISABLE = 2
  649. )
  650. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  651. type Size_t = uint64 /* <builtin>:9:23 */
  652. type Wchar_t = int32 /* <builtin>:15:24 */
  653. type X__int128_t = struct {
  654. Flo int64
  655. Fhi int64
  656. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  657. type X__uint128_t = struct {
  658. Flo uint64
  659. Fhi uint64
  660. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  661. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  662. type X__ieee128 = float64 /* <builtin>:47:21 */
  663. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  664. // This file is part of the GNU C Library.
  665. //
  666. // The GNU C Library is free software; you can redistribute it and/or
  667. // modify it under the terms of the GNU Lesser General Public
  668. // License as published by the Free Software Foundation; either
  669. // version 2.1 of the License, or (at your option) any later version.
  670. //
  671. // The GNU C Library is distributed in the hope that it will be useful,
  672. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  673. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  674. // Lesser General Public License for more details.
  675. //
  676. // You should have received a copy of the GNU Lesser General Public
  677. // License along with the GNU C Library; if not, see
  678. // <https://www.gnu.org/licenses/>.
  679. // ISO C99 Standard: 7.14 Signal handling <signal.h>
  680. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  681. // This file is part of the GNU C Library.
  682. //
  683. // The GNU C Library is free software; you can redistribute it and/or
  684. // modify it under the terms of the GNU Lesser General Public
  685. // License as published by the Free Software Foundation; either
  686. // version 2.1 of the License, or (at your option) any later version.
  687. //
  688. // The GNU C Library is distributed in the hope that it will be useful,
  689. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  690. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  691. // Lesser General Public License for more details.
  692. //
  693. // You should have received a copy of the GNU Lesser General Public
  694. // License along with the GNU C Library; if not, see
  695. // <https://www.gnu.org/licenses/>.
  696. // These are defined by the user (or the compiler)
  697. // to specify the desired environment:
  698. //
  699. // __STRICT_ANSI__ ISO Standard C.
  700. // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
  701. // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
  702. // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
  703. // __STDC_WANT_LIB_EXT2__
  704. // Extensions to ISO C99 from TR 27431-2:2010.
  705. // __STDC_WANT_IEC_60559_BFP_EXT__
  706. // Extensions to ISO C11 from TS 18661-1:2014.
  707. // __STDC_WANT_IEC_60559_FUNCS_EXT__
  708. // Extensions to ISO C11 from TS 18661-4:2015.
  709. // __STDC_WANT_IEC_60559_TYPES_EXT__
  710. // Extensions to ISO C11 from TS 18661-3:2015.
  711. //
  712. // _POSIX_SOURCE IEEE Std 1003.1.
  713. // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
  714. // if >=199309L, add IEEE Std 1003.1b-1993;
  715. // if >=199506L, add IEEE Std 1003.1c-1995;
  716. // if >=200112L, all of IEEE 1003.1-2004
  717. // if >=200809L, all of IEEE 1003.1-2008
  718. // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
  719. // Single Unix conformance is wanted, to 600 for the
  720. // sixth revision, to 700 for the seventh revision.
  721. // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
  722. // _LARGEFILE_SOURCE Some more functions for correct standard I/O.
  723. // _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
  724. // _FILE_OFFSET_BITS=N Select default filesystem interface.
  725. // _ATFILE_SOURCE Additional *at interfaces.
  726. // _GNU_SOURCE All of the above, plus GNU extensions.
  727. // _DEFAULT_SOURCE The default set of features (taking precedence over
  728. // __STRICT_ANSI__).
  729. //
  730. // _FORTIFY_SOURCE Add security hardening to many library functions.
  731. // Set to 1 or 2; 2 performs stricter checks than 1.
  732. //
  733. // _REENTRANT, _THREAD_SAFE
  734. // Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
  735. //
  736. // The `-ansi' switch to the GNU C compiler, and standards conformance
  737. // options such as `-std=c99', define __STRICT_ANSI__. If none of
  738. // these are defined, or if _DEFAULT_SOURCE is defined, the default is
  739. // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
  740. // 200809L, as well as enabling miscellaneous functions from BSD and
  741. // SVID. If more than one of these are defined, they accumulate. For
  742. // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
  743. // give you ISO C, 1003.1, and 1003.2, but nothing else.
  744. //
  745. // These are defined by this file and are used by the
  746. // header files to decide what to declare or define:
  747. //
  748. // __GLIBC_USE (F) Define things from feature set F. This is defined
  749. // to 1 or 0; the subsequent macros are either defined
  750. // or undefined, and those tests should be moved to
  751. // __GLIBC_USE.
  752. // __USE_ISOC11 Define ISO C11 things.
  753. // __USE_ISOC99 Define ISO C99 things.
  754. // __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
  755. // __USE_ISOCXX11 Define ISO C++11 things.
  756. // __USE_POSIX Define IEEE Std 1003.1 things.
  757. // __USE_POSIX2 Define IEEE Std 1003.2 things.
  758. // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
  759. // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
  760. // __USE_XOPEN Define XPG things.
  761. // __USE_XOPEN_EXTENDED Define X/Open Unix things.
  762. // __USE_UNIX98 Define Single Unix V2 things.
  763. // __USE_XOPEN2K Define XPG6 things.
  764. // __USE_XOPEN2KXSI Define XPG6 XSI things.
  765. // __USE_XOPEN2K8 Define XPG7 things.
  766. // __USE_XOPEN2K8XSI Define XPG7 XSI things.
  767. // __USE_LARGEFILE Define correct standard I/O things.
  768. // __USE_LARGEFILE64 Define LFS things with separate names.
  769. // __USE_FILE_OFFSET64 Define 64bit interface as default.
  770. // __USE_MISC Define things from 4.3BSD or System V Unix.
  771. // __USE_ATFILE Define *at interfaces and AT_* constants for them.
  772. // __USE_GNU Define GNU extensions.
  773. // __USE_FORTIFY_LEVEL Additional security measures used, according to level.
  774. //
  775. // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
  776. // defined by this file unconditionally. `__GNU_LIBRARY__' is provided
  777. // only for compatibility. All new code should use the other symbols
  778. // to test for features.
  779. //
  780. // All macros listed above as possibly being defined by this file are
  781. // explicitly undefined if they are not explicitly defined.
  782. // Feature-test macros that are not defined by the user or compiler
  783. // but are implied by the other feature-test macros defined (or by the
  784. // lack of any definitions) are defined by the file.
  785. //
  786. // ISO C feature test macros depend on the definition of the macro
  787. // when an affected header is included, not when the first system
  788. // header is included, and so they are handled in
  789. // <bits/libc-header-start.h>, which does not have a multiple include
  790. // guard. Feature test macros that can be handled from the first
  791. // system header included are handled here.
  792. // Undefine everything, so we get a clean slate.
  793. // Suppress kernel-name space pollution unless user expressedly asks
  794. // for it.
  795. // Convenience macro to test the version of gcc.
  796. // Use like this:
  797. // #if __GNUC_PREREQ (2,8)
  798. // ... code requiring gcc 2.8 or later ...
  799. // #endif
  800. // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
  801. // added in 2.0.
  802. // Similarly for clang. Features added to GCC after version 4.2 may
  803. // or may not also be available in clang, and clang's definitions of
  804. // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
  805. // features can be queried via __has_extension/__has_feature.
  806. // Whether to use feature set F.
  807. // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
  808. // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
  809. // issue a warning; the expectation is that the source is being
  810. // transitioned to use the new macro.
  811. // If _GNU_SOURCE was defined by the user, turn on all the other features.
  812. // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
  813. // define _DEFAULT_SOURCE.
  814. // This is to enable the ISO C2X extension.
  815. // This is to enable the ISO C11 extension.
  816. // This is to enable the ISO C99 extension.
  817. // This is to enable the ISO C90 Amendment 1:1995 extension.
  818. // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
  819. // is defined, use POSIX.1-2008 (or another version depending on
  820. // _XOPEN_SOURCE).
  821. // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
  822. // defined in all multithreaded code. GNU libc has not required this
  823. // for many years. We now treat them as compatibility synonyms for
  824. // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
  825. // comprehensive support for multithreaded code. Using them never
  826. // lowers the selected level of POSIX conformance, only raises it.
  827. // The function 'gets' existed in C89, but is impossible to use
  828. // safely. It has been removed from ISO C11 and ISO C++14. Note: for
  829. // compatibility with various implementations of <cstdio>, this test
  830. // must consider only the value of __cplusplus when compiling C++.
  831. // GNU formerly extended the scanf functions with modified format
  832. // specifiers %as, %aS, and %a[...] that allocate a buffer for the
  833. // input using malloc. This extension conflicts with ISO C99, which
  834. // defines %a as a standalone format specifier that reads a floating-
  835. // point number; moreover, POSIX.1-2008 provides the same feature
  836. // using the modifier letter 'm' instead (%ms, %mS, %m[...]).
  837. //
  838. // We now follow C99 unless GNU extensions are active and the compiler
  839. // is specifically in C89 or C++98 mode (strict or not). For
  840. // instance, with GCC, -std=gnu11 will have C99-compliant scanf with
  841. // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
  842. // old extension.
  843. // Get definitions of __STDC_* predefined macros, if the compiler has
  844. // not preincluded this header automatically.
  845. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  846. // This file is part of the GNU C Library.
  847. //
  848. // The GNU C Library is free software; you can redistribute it and/or
  849. // modify it under the terms of the GNU Lesser General Public
  850. // License as published by the Free Software Foundation; either
  851. // version 2.1 of the License, or (at your option) any later version.
  852. //
  853. // The GNU C Library is distributed in the hope that it will be useful,
  854. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  855. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  856. // Lesser General Public License for more details.
  857. //
  858. // You should have received a copy of the GNU Lesser General Public
  859. // License along with the GNU C Library; if not, see
  860. // <https://www.gnu.org/licenses/>.
  861. // This macro indicates that the installed library is the GNU C Library.
  862. // For historic reasons the value now is 6 and this will stay from now
  863. // on. The use of this variable is deprecated. Use __GLIBC__ and
  864. // __GLIBC_MINOR__ now (see below) when you want to test for a specific
  865. // GNU C library version and use the values in <gnu/lib-names.h> to get
  866. // the sonames of the shared libraries.
  867. // Major and minor version number of the GNU C library package. Use
  868. // these macros to test for features in specific releases.
  869. // This is here only because every header file already includes this one.
  870. // Copyright (C) 1992-2020 Free Software Foundation, Inc.
  871. // This file is part of the GNU C Library.
  872. //
  873. // The GNU C Library is free software; you can redistribute it and/or
  874. // modify it under the terms of the GNU Lesser General Public
  875. // License as published by the Free Software Foundation; either
  876. // version 2.1 of the License, or (at your option) any later version.
  877. //
  878. // The GNU C Library is distributed in the hope that it will be useful,
  879. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  880. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  881. // Lesser General Public License for more details.
  882. //
  883. // You should have received a copy of the GNU Lesser General Public
  884. // License along with the GNU C Library; if not, see
  885. // <https://www.gnu.org/licenses/>.
  886. // We are almost always included from features.h.
  887. // The GNU libc does not support any K&R compilers or the traditional mode
  888. // of ISO C compilers anymore. Check for some of the combinations not
  889. // anymore supported.
  890. // Some user header file might have defined this before.
  891. // All functions, except those with callbacks or those that
  892. // synchronize memory, are leaf functions.
  893. // GCC can always grok prototypes. For C++ programs we add throw()
  894. // to help it optimize the function calls. But this works only with
  895. // gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
  896. // as non-throwing using a function attribute since programs can use
  897. // the -fexceptions options for C code as well.
  898. // Compilers that are not clang may object to
  899. // #if defined __clang__ && __has_extension(...)
  900. // even though they do not need to evaluate the right-hand side of the &&.
  901. // These two macros are not used in glibc anymore. They are kept here
  902. // only because some other projects expect the macros to be defined.
  903. // For these things, GCC behaves the ANSI way normally,
  904. // and the non-ANSI way under -traditional.
  905. // This is not a typedef so `const __ptr_t' does the right thing.
  906. // C++ needs to know that types and declarations are C, not C++.
  907. // Fortify support.
  908. // Support for flexible arrays.
  909. // Headers that should use flexible arrays only if they're "real"
  910. // (e.g. only if they won't affect sizeof()) should test
  911. // #if __glibc_c99_flexarr_available.
  912. // __asm__ ("xyz") is used throughout the headers to rename functions
  913. // at the assembly language level. This is wrapped by the __REDIRECT
  914. // macro, in order to support compilers that can do this some other
  915. // way. When compilers don't support asm-names at all, we have to do
  916. // preprocessor tricks instead (which don't have exactly the right
  917. // semantics, but it's the best we can do).
  918. //
  919. // Example:
  920. // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
  921. //
  922. // #elif __SOME_OTHER_COMPILER__
  923. //
  924. // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
  925. // GCC has various useful declarations that can be made with the
  926. // `__attribute__' syntax. All of the ways we use this do fine if
  927. // they are omitted for compilers that don't understand it.
  928. // At some point during the gcc 2.96 development the `malloc' attribute
  929. // for functions was introduced. We don't want to use it unconditionally
  930. // (although this would be possible) since it generates warnings.
  931. // Tell the compiler which arguments to an allocation function
  932. // indicate the size of the allocation.
  933. // At some point during the gcc 2.96 development the `pure' attribute
  934. // for functions was introduced. We don't want to use it unconditionally
  935. // (although this would be possible) since it generates warnings.
  936. // This declaration tells the compiler that the value is constant.
  937. // At some point during the gcc 3.1 development the `used' attribute
  938. // for functions was introduced. We don't want to use it unconditionally
  939. // (although this would be possible) since it generates warnings.
  940. // Since version 3.2, gcc allows marking deprecated functions.
  941. // Since version 4.5, gcc also allows one to specify the message printed
  942. // when a deprecated function is used. clang claims to be gcc 4.2, but
  943. // may also support this feature.
  944. // At some point during the gcc 2.8 development the `format_arg' attribute
  945. // for functions was introduced. We don't want to use it unconditionally
  946. // (although this would be possible) since it generates warnings.
  947. // If several `format_arg' attributes are given for the same function, in
  948. // gcc-3.0 and older, all but the last one are ignored. In newer gccs,
  949. // all designated arguments are considered.
  950. // At some point during the gcc 2.97 development the `strfmon' format
  951. // attribute for functions was introduced. We don't want to use it
  952. // unconditionally (although this would be possible) since it
  953. // generates warnings.
  954. // The nonull function attribute allows to mark pointer parameters which
  955. // must not be NULL.
  956. // If fortification mode, we warn about unused results of certain
  957. // function calls which can lead to problems.
  958. // Forces a function to be always inlined.
  959. // The Linux kernel defines __always_inline in stddef.h (283d7573), and
  960. // it conflicts with this definition. Therefore undefine it first to
  961. // allow either header to be included first.
  962. // Associate error messages with the source location of the call site rather
  963. // than with the source location inside the function.
  964. // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
  965. // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
  966. // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
  967. // older than 4.3 may define these macros and still not guarantee GNU inlining
  968. // semantics.
  969. //
  970. // clang++ identifies itself as gcc-4.2, but has support for GNU inlining
  971. // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
  972. // __GNUC_GNU_INLINE__ macro definitions.
  973. // GCC 4.3 and above allow passing all anonymous arguments of an
  974. // __extern_always_inline function to some other vararg function.
  975. // It is possible to compile containing GCC extensions even if GCC is
  976. // run in pedantic mode if the uses are carefully marked using the
  977. // `__extension__' keyword. But this is not generally available before
  978. // version 2.8.
  979. // __restrict is known in EGCS 1.2 and above.
  980. // ISO C99 also allows to declare arrays as non-overlapping. The syntax is
  981. // array_name[restrict]
  982. // GCC 3.1 supports this.
  983. // Describes a char array whose address can safely be passed as the first
  984. // argument to strncpy and strncat, as the char array is not necessarily
  985. // a NUL-terminated string.
  986. // Undefine (also defined in libc-symbols.h).
  987. // Copies attributes from the declaration or type referenced by
  988. // the argument.
  989. // Determine the wordsize from the preprocessor defines.
  990. // Properties of long double type. ldbl-opt version.
  991. // Copyright (C) 2016-2020 Free Software Foundation, Inc.
  992. // This file is part of the GNU C Library.
  993. //
  994. // The GNU C Library is free software; you can redistribute it and/or
  995. // modify it under the terms of the GNU Lesser General Public
  996. // License published by the Free Software Foundation; either
  997. // version 2.1 of the License, or (at your option) any later version.
  998. //
  999. // The GNU C Library is distributed in the hope that it will be useful,
  1000. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1001. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1002. // Lesser General Public License for more details.
  1003. //
  1004. // You should have received a copy of the GNU Lesser General Public
  1005. // License along with the GNU C Library; if not, see
  1006. // <https://www.gnu.org/licenses/>.
  1007. // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
  1008. // intended for use in preprocessor macros.
  1009. //
  1010. // Note: MESSAGE must be a _single_ string; concatenation of string
  1011. // literals is not supported.
  1012. // Generic selection (ISO C11) is a C-only feature, available in GCC
  1013. // since version 4.9. Previous versions do not provide generic
  1014. // selection, even though they might set __STDC_VERSION__ to 201112L,
  1015. // when in -std=c11 mode. Thus, we must check for !defined __GNUC__
  1016. // when testing __STDC_VERSION__ for generic selection support.
  1017. // On the other hand, Clang also defines __GNUC__, so a clang-specific
  1018. // check is required to enable the use of generic selection.
  1019. // If we don't have __REDIRECT, prototypes will be missing if
  1020. // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
  1021. // Decide whether we can define 'extern inline' functions in headers.
  1022. // This is here only because every header file already includes this one.
  1023. // Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
  1024. // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
  1025. // that will always return failure (and set errno to ENOSYS).
  1026. // This file is automatically generated.
  1027. // This file selects the right generated file of `__stub_FUNCTION' macros
  1028. // based on the architecture being compiled for.
  1029. // Determine the wordsize from the preprocessor defines.
  1030. // This file is automatically generated.
  1031. // It defines a symbol `__stub_FUNCTION' for each function
  1032. // in the C library which is a stub, meaning it will fail
  1033. // every time called, usually setting errno to ENOSYS.
  1034. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1035. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1036. // This file is part of the GNU C Library.
  1037. //
  1038. // The GNU C Library is free software; you can redistribute it and/or
  1039. // modify it under the terms of the GNU Lesser General Public
  1040. // License as published by the Free Software Foundation; either
  1041. // version 2.1 of the License, or (at your option) any later version.
  1042. //
  1043. // The GNU C Library is distributed in the hope that it will be useful,
  1044. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1045. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1046. // Lesser General Public License for more details.
  1047. //
  1048. // You should have received a copy of the GNU Lesser General Public
  1049. // License along with the GNU C Library; if not, see
  1050. // <https://www.gnu.org/licenses/>.
  1051. // Never include this file directly; use <sys/types.h> instead.
  1052. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  1053. // This file is part of the GNU C Library.
  1054. //
  1055. // The GNU C Library is free software; you can redistribute it and/or
  1056. // modify it under the terms of the GNU Lesser General Public
  1057. // License as published by the Free Software Foundation; either
  1058. // version 2.1 of the License, or (at your option) any later version.
  1059. //
  1060. // The GNU C Library is distributed in the hope that it will be useful,
  1061. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1062. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1063. // Lesser General Public License for more details.
  1064. //
  1065. // You should have received a copy of the GNU Lesser General Public
  1066. // License along with the GNU C Library; if not, see
  1067. // <https://www.gnu.org/licenses/>.
  1068. // Determine the wordsize from the preprocessor defines.
  1069. // Bit size of the time_t type at glibc build time, general case.
  1070. // Copyright (C) 2018-2020 Free Software Foundation, Inc.
  1071. // This file is part of the GNU C Library.
  1072. //
  1073. // The GNU C Library is free software; you can redistribute it and/or
  1074. // modify it under the terms of the GNU Lesser General Public
  1075. // License as published by the Free Software Foundation; either
  1076. // version 2.1 of the License, or (at your option) any later version.
  1077. //
  1078. // The GNU C Library is distributed in the hope that it will be useful,
  1079. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1080. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1081. // Lesser General Public License for more details.
  1082. //
  1083. // You should have received a copy of the GNU Lesser General Public
  1084. // License along with the GNU C Library; if not, see
  1085. // <https://www.gnu.org/licenses/>.
  1086. // Determine the wordsize from the preprocessor defines.
  1087. // Size in bits of the 'time_t' type of the default ABI.
  1088. // Convenience types.
  1089. type X__u_char = uint8 /* types.h:31:23 */
  1090. type X__u_short = uint16 /* types.h:32:28 */
  1091. type X__u_int = uint32 /* types.h:33:22 */
  1092. type X__u_long = uint64 /* types.h:34:27 */
  1093. // Fixed-size types, underlying types depend on word size and compiler.
  1094. type X__int8_t = int8 /* types.h:37:21 */
  1095. type X__uint8_t = uint8 /* types.h:38:23 */
  1096. type X__int16_t = int16 /* types.h:39:26 */
  1097. type X__uint16_t = uint16 /* types.h:40:28 */
  1098. type X__int32_t = int32 /* types.h:41:20 */
  1099. type X__uint32_t = uint32 /* types.h:42:22 */
  1100. type X__int64_t = int64 /* types.h:44:25 */
  1101. type X__uint64_t = uint64 /* types.h:45:27 */
  1102. // Smallest types with at least a given width.
  1103. type X__int_least8_t = X__int8_t /* types.h:52:18 */
  1104. type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
  1105. type X__int_least16_t = X__int16_t /* types.h:54:19 */
  1106. type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
  1107. type X__int_least32_t = X__int32_t /* types.h:56:19 */
  1108. type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
  1109. type X__int_least64_t = X__int64_t /* types.h:58:19 */
  1110. type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
  1111. // quad_t is also 64 bits.
  1112. type X__quad_t = int64 /* types.h:63:18 */
  1113. type X__u_quad_t = uint64 /* types.h:64:27 */
  1114. // Largest integral types.
  1115. type X__intmax_t = int64 /* types.h:72:18 */
  1116. type X__uintmax_t = uint64 /* types.h:73:27 */
  1117. // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
  1118. // macros for each of the OS types we define below. The definitions
  1119. // of those macros must use the following macros for underlying types.
  1120. // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
  1121. // variants of each of the following integer types on this machine.
  1122. //
  1123. // 16 -- "natural" 16-bit type (always short)
  1124. // 32 -- "natural" 32-bit type (always int)
  1125. // 64 -- "natural" 64-bit type (long or long long)
  1126. // LONG32 -- 32-bit type, traditionally long
  1127. // QUAD -- 64-bit type, traditionally long long
  1128. // WORD -- natural type of __WORDSIZE bits (int or long)
  1129. // LONGWORD -- type of __WORDSIZE bits, traditionally long
  1130. //
  1131. // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
  1132. // conventional uses of `long' or `long long' type modifiers match the
  1133. // types we define, even when a less-adorned type would be the same size.
  1134. // This matters for (somewhat) portably writing printf/scanf formats for
  1135. // these types, where using the appropriate l or ll format modifiers can
  1136. // make the typedefs and the formats match up across all GNU platforms. If
  1137. // we used `long' when it's 64 bits where `long long' is expected, then the
  1138. // compiler would warn about the formats not matching the argument types,
  1139. // and the programmer changing them to shut up the compiler would break the
  1140. // program's portability.
  1141. //
  1142. // Here we assume what is presently the case in all the GCC configurations
  1143. // we support: long long is always 64 bits, long is always word/address size,
  1144. // and int is always 32 bits.
  1145. // No need to mark the typedef with __extension__.
  1146. // bits/typesizes.h -- underlying types for *_t. Generic version.
  1147. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1148. // This file is part of the GNU C Library.
  1149. //
  1150. // The GNU C Library is free software; you can redistribute it and/or
  1151. // modify it under the terms of the GNU Lesser General Public
  1152. // License as published by the Free Software Foundation; either
  1153. // version 2.1 of the License, or (at your option) any later version.
  1154. //
  1155. // The GNU C Library is distributed in the hope that it will be useful,
  1156. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1157. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1158. // Lesser General Public License for more details.
  1159. //
  1160. // You should have received a copy of the GNU Lesser General Public
  1161. // License along with the GNU C Library; if not, see
  1162. // <https://www.gnu.org/licenses/>.
  1163. // See <bits/types.h> for the meaning of these macros. This file exists so
  1164. // that <bits/types.h> need not vary across different GNU platforms.
  1165. // Tell the libc code that off_t and off64_t are actually the same type
  1166. // for all ABI purposes, even if possibly expressed as different base types
  1167. // for C type-checking purposes.
  1168. // Same for ino_t and ino64_t.
  1169. // And for rlim_t and rlim64_t.
  1170. // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
  1171. // Number of descriptors that can fit in an `fd_set'.
  1172. // bits/time64.h -- underlying types for __time64_t. Generic version.
  1173. // Copyright (C) 2018-2020 Free Software Foundation, Inc.
  1174. // This file is part of the GNU C Library.
  1175. //
  1176. // The GNU C Library is free software; you can redistribute it and/or
  1177. // modify it under the terms of the GNU Lesser General Public
  1178. // License as published by the Free Software Foundation; either
  1179. // version 2.1 of the License, or (at your option) any later version.
  1180. //
  1181. // The GNU C Library is distributed in the hope that it will be useful,
  1182. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1183. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1184. // Lesser General Public License for more details.
  1185. //
  1186. // You should have received a copy of the GNU Lesser General Public
  1187. // License along with the GNU C Library; if not, see
  1188. // <https://www.gnu.org/licenses/>.
  1189. // Define __TIME64_T_TYPE so that it is always a 64-bit type.
  1190. // If we already have 64-bit time type then use it.
  1191. type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
  1192. type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
  1193. type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
  1194. type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
  1195. type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
  1196. type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
  1197. type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
  1198. type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
  1199. type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
  1200. type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
  1201. type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
  1202. type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
  1203. type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
  1204. type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
  1205. type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
  1206. type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
  1207. type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
  1208. type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
  1209. type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
  1210. type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
  1211. // Clock ID used in clock and timer functions.
  1212. type X__clockid_t = int32 /* types.h:168:29 */
  1213. // Timer ID returned by `timer_create'.
  1214. type X__timer_t = uintptr /* types.h:171:12 */
  1215. // Type to represent block size.
  1216. type X__blksize_t = int64 /* types.h:174:29 */
  1217. // Types from the Large File Support interface.
  1218. // Type to count number of disk blocks.
  1219. type X__blkcnt_t = int64 /* types.h:179:28 */
  1220. type X__blkcnt64_t = int64 /* types.h:180:30 */
  1221. // Type to count file system blocks.
  1222. type X__fsblkcnt_t = uint64 /* types.h:183:30 */
  1223. type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
  1224. // Type to count file system nodes.
  1225. type X__fsfilcnt_t = uint64 /* types.h:187:30 */
  1226. type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
  1227. // Type of miscellaneous file system fields.
  1228. type X__fsword_t = int64 /* types.h:191:28 */
  1229. type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
  1230. // Signed long type used in system calls.
  1231. type X__syscall_slong_t = int64 /* types.h:196:33 */
  1232. // Unsigned long type used in system calls.
  1233. type X__syscall_ulong_t = uint64 /* types.h:198:33 */
  1234. // These few don't really vary by system, they always correspond
  1235. //
  1236. // to one of the other defined types.
  1237. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
  1238. type X__caddr_t = uintptr /* types.h:203:14 */
  1239. // Duplicates info from stdint.h but this is used in unistd.h.
  1240. type X__intptr_t = int64 /* types.h:206:25 */
  1241. // Duplicate info from sys/socket.h.
  1242. type X__socklen_t = uint32 /* types.h:209:23 */
  1243. // C99: An integer type that can be accessed as an atomic entity,
  1244. //
  1245. // even in the presence of asynchronous interrupts.
  1246. // It is not currently necessary for this to be machine-specific.
  1247. type X__sig_atomic_t = int32 /* types.h:214:13 */
  1248. // Seconds since the Epoch, visible to user code when time_t is too
  1249. // narrow only for consistency with the old way of widening too-narrow
  1250. // types. User code should never use __time64_t.
  1251. // Signal number definitions. Linux version.
  1252. // Copyright (C) 1995-2020 Free Software Foundation, Inc.
  1253. // This file is part of the GNU C Library.
  1254. //
  1255. // The GNU C Library is free software; you can redistribute it and/or
  1256. // modify it under the terms of the GNU Lesser General Public
  1257. // License as published by the Free Software Foundation; either
  1258. // version 2.1 of the License, or (at your option) any later version.
  1259. //
  1260. // The GNU C Library is distributed in the hope that it will be useful,
  1261. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1262. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1263. // Lesser General Public License for more details.
  1264. //
  1265. // You should have received a copy of the GNU Lesser General Public
  1266. // License along with the GNU C Library; if not, see
  1267. // <https://www.gnu.org/licenses/>.
  1268. // Signal number constants. Generic template.
  1269. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  1270. // This file is part of the GNU C Library.
  1271. //
  1272. // The GNU C Library is free software; you can redistribute it and/or
  1273. // modify it under the terms of the GNU Lesser General Public
  1274. // License as published by the Free Software Foundation; either
  1275. // version 2.1 of the License, or (at your option) any later version.
  1276. //
  1277. // The GNU C Library is distributed in the hope that it will be useful,
  1278. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1279. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1280. // Lesser General Public License for more details.
  1281. //
  1282. // You should have received a copy of the GNU Lesser General Public
  1283. // License along with the GNU C Library; if not, see
  1284. // <https://www.gnu.org/licenses/>.
  1285. // Fake signal functions.
  1286. // We define here all the signal names listed in POSIX (1003.1-2008);
  1287. // as of 1003.1-2013, no additional signals have been added by POSIX.
  1288. // We also define here signal names that historically exist in every
  1289. // real-world POSIX variant (e.g. SIGWINCH).
  1290. //
  1291. // Signals in the 1-15 range are defined with their historical numbers.
  1292. // For other signals, we use the BSD numbers.
  1293. // There are two unallocated signal numbers in the 1-31 range: 7 and 29.
  1294. // Signal number 0 is reserved for use as kill(pid, 0), to test whether
  1295. // a process exists without sending it a signal.
  1296. // ISO C99 signals.
  1297. // Historical signals specified by POSIX.
  1298. // New(er) POSIX signals (1003.1-2008, 1003.1-2013).
  1299. // Nonstandard signals found in all modern POSIX systems
  1300. // (including both BSD and Linux).
  1301. // Archaic names for compatibility.
  1302. // Not all systems support real-time signals. bits/signum.h indicates
  1303. // that they are supported by overriding __SIGRTMAX to a value greater
  1304. // than __SIGRTMIN. These constants give the kernel-level hard limits,
  1305. // but some real-time signals may be used internally by glibc. Do not
  1306. // use these constants in application code; use SIGRTMIN and SIGRTMAX
  1307. // (defined in signal.h) instead.
  1308. // Biggest signal number + 1 (including real-time signals).
  1309. // Adjustments and additions to the signal number constants for
  1310. // most Linux systems.
  1311. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1312. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1313. // This file is part of the GNU C Library.
  1314. //
  1315. // The GNU C Library is free software; you can redistribute it and/or
  1316. // modify it under the terms of the GNU Lesser General Public
  1317. // License as published by the Free Software Foundation; either
  1318. // version 2.1 of the License, or (at your option) any later version.
  1319. //
  1320. // The GNU C Library is distributed in the hope that it will be useful,
  1321. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1322. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1323. // Lesser General Public License for more details.
  1324. //
  1325. // You should have received a copy of the GNU Lesser General Public
  1326. // License along with the GNU C Library; if not, see
  1327. // <https://www.gnu.org/licenses/>.
  1328. // Never include this file directly; use <sys/types.h> instead.
  1329. // An integral type that can be modified atomically, without the
  1330. //
  1331. // possibility of a signal arriving in the middle of the operation.
  1332. type Sig_atomic_t = X__sig_atomic_t /* sig_atomic_t.h:8:24 */
  1333. type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
  1334. // A set of signals to be blocked, unblocked, or waited for.
  1335. type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
  1336. type Pid_t = X__pid_t /* signal.h:40:17 */
  1337. type Uid_t = X__uid_t /* signal.h:46:17 */
  1338. // We need `struct timespec' later on.
  1339. // NB: Include guard matches what <linux/time.h> uses.
  1340. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1341. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1342. // This file is part of the GNU C Library.
  1343. //
  1344. // The GNU C Library is free software; you can redistribute it and/or
  1345. // modify it under the terms of the GNU Lesser General Public
  1346. // License as published by the Free Software Foundation; either
  1347. // version 2.1 of the License, or (at your option) any later version.
  1348. //
  1349. // The GNU C Library is distributed in the hope that it will be useful,
  1350. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1351. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1352. // Lesser General Public License for more details.
  1353. //
  1354. // You should have received a copy of the GNU Lesser General Public
  1355. // License along with the GNU C Library; if not, see
  1356. // <https://www.gnu.org/licenses/>.
  1357. // Never include this file directly; use <sys/types.h> instead.
  1358. // Endian macros for string.h functions
  1359. // Copyright (C) 1992-2020 Free Software Foundation, Inc.
  1360. // This file is part of the GNU C Library.
  1361. //
  1362. // The GNU C Library is free software; you can redistribute it and/or
  1363. // modify it under the terms of the GNU Lesser General Public
  1364. // License as published by the Free Software Foundation; either
  1365. // version 2.1 of the License, or (at your option) any later version.
  1366. //
  1367. // The GNU C Library is distributed in the hope that it will be useful,
  1368. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1369. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1370. // Lesser General Public License for more details.
  1371. //
  1372. // You should have received a copy of the GNU Lesser General Public
  1373. // License along with the GNU C Library; if not, see
  1374. // <http://www.gnu.org/licenses/>.
  1375. // Definitions for byte order, according to significance of bytes,
  1376. // from low addresses to high addresses. The value is what you get by
  1377. // putting '4' in the most significant byte, '3' in the second most
  1378. // significant byte, '2' in the second least significant byte, and '1'
  1379. // in the least significant byte, and then writing down one digit for
  1380. // each byte, starting with the byte at the lowest address at the left,
  1381. // and proceeding to the byte with the highest address at the right.
  1382. // This file defines `__BYTE_ORDER' for the particular machine.
  1383. // PowerPC has selectable endianness.
  1384. // Some machines may need to use a different endianness for floating point
  1385. // values.
  1386. // POSIX.1b structure for a time value. This is like a `struct timeval' but
  1387. //
  1388. // has nanoseconds instead of microseconds.
  1389. type Timespec = struct {
  1390. Ftv_sec X__time_t
  1391. Ftv_nsec X__syscall_slong_t
  1392. } /* struct_timespec.h:10:1 */
  1393. // Determine the wordsize from the preprocessor defines.
  1394. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1395. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1396. // This file is part of the GNU C Library.
  1397. //
  1398. // The GNU C Library is free software; you can redistribute it and/or
  1399. // modify it under the terms of the GNU Lesser General Public
  1400. // License as published by the Free Software Foundation; either
  1401. // version 2.1 of the License, or (at your option) any later version.
  1402. //
  1403. // The GNU C Library is distributed in the hope that it will be useful,
  1404. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1405. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1406. // Lesser General Public License for more details.
  1407. //
  1408. // You should have received a copy of the GNU Lesser General Public
  1409. // License along with the GNU C Library; if not, see
  1410. // <https://www.gnu.org/licenses/>.
  1411. // Never include this file directly; use <sys/types.h> instead.
  1412. // Define __sigval_t.
  1413. // Copyright (C) 1997-2020 Free Software Foundation, Inc.
  1414. // This file is part of the GNU C Library.
  1415. //
  1416. // The GNU C Library is free software; you can redistribute it and/or
  1417. // modify it under the terms of the GNU Lesser General Public
  1418. // License as published by the Free Software Foundation; either
  1419. // version 2.1 of the License, or (at your option) any later version.
  1420. //
  1421. // The GNU C Library is distributed in the hope that it will be useful,
  1422. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1423. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1424. // Lesser General Public License for more details.
  1425. //
  1426. // You should have received a copy of the GNU Lesser General Public
  1427. // License along with the GNU C Library; if not, see
  1428. // <https://www.gnu.org/licenses/>.
  1429. // Type for data associated with a signal.
  1430. type Sigval = struct {
  1431. F__ccgo_pad1 [0]uint64
  1432. Fsival_int int32
  1433. F__ccgo_pad2 [4]byte
  1434. } /* __sigval_t.h:24:1 */
  1435. type X__sigval_t = Sigval /* __sigval_t.h:30:22 */
  1436. // Some fields of siginfo_t have architecture-specific variations.
  1437. // Architecture-specific adjustments to siginfo_t.
  1438. // This architecture has no adjustments to make to siginfo_t.
  1439. type Siginfo_t = struct {
  1440. Fsi_signo int32
  1441. Fsi_errno int32
  1442. Fsi_code int32
  1443. F__pad0 int32
  1444. F_sifields struct {
  1445. F__ccgo_pad1 [0]uint64
  1446. F_pad [28]int32
  1447. }
  1448. } /* siginfo_t.h:124:5 */
  1449. // Architectures might also add architecture-specific constants.
  1450. // These are all considered GNU extensions.
  1451. // Define __sigval_t.
  1452. // Copyright (C) 1997-2020 Free Software Foundation, Inc.
  1453. // This file is part of the GNU C Library.
  1454. //
  1455. // The GNU C Library is free software; you can redistribute it and/or
  1456. // modify it under the terms of the GNU Lesser General Public
  1457. // License as published by the Free Software Foundation; either
  1458. // version 2.1 of the License, or (at your option) any later version.
  1459. //
  1460. // The GNU C Library is distributed in the hope that it will be useful,
  1461. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1462. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1463. // Lesser General Public License for more details.
  1464. //
  1465. // You should have received a copy of the GNU Lesser General Public
  1466. // License along with the GNU C Library; if not, see
  1467. // <https://www.gnu.org/licenses/>.
  1468. // To avoid sigval_t (not a standard type name) having C++ name
  1469. // mangling depending on whether the selected standard includes union
  1470. // sigval, it should not be defined at all when using a standard for
  1471. // which the sigval name is not reserved; in that case, headers should
  1472. // not include <bits/types/sigval_t.h> and should use only the
  1473. // internal __sigval_t name.
  1474. type Sigval_t = X__sigval_t /* sigval_t.h:16:20 */
  1475. // Determine the wordsize from the preprocessor defines.
  1476. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1477. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1478. // This file is part of the GNU C Library.
  1479. //
  1480. // The GNU C Library is free software; you can redistribute it and/or
  1481. // modify it under the terms of the GNU Lesser General Public
  1482. // License as published by the Free Software Foundation; either
  1483. // version 2.1 of the License, or (at your option) any later version.
  1484. //
  1485. // The GNU C Library is distributed in the hope that it will be useful,
  1486. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1487. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1488. // Lesser General Public License for more details.
  1489. //
  1490. // You should have received a copy of the GNU Lesser General Public
  1491. // License along with the GNU C Library; if not, see
  1492. // <https://www.gnu.org/licenses/>.
  1493. // Never include this file directly; use <sys/types.h> instead.
  1494. // Define __sigval_t.
  1495. // Copyright (C) 1997-2020 Free Software Foundation, Inc.
  1496. // This file is part of the GNU C Library.
  1497. //
  1498. // The GNU C Library is free software; you can redistribute it and/or
  1499. // modify it under the terms of the GNU Lesser General Public
  1500. // License as published by the Free Software Foundation; either
  1501. // version 2.1 of the License, or (at your option) any later version.
  1502. //
  1503. // The GNU C Library is distributed in the hope that it will be useful,
  1504. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1505. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1506. // Lesser General Public License for more details.
  1507. //
  1508. // You should have received a copy of the GNU Lesser General Public
  1509. // License along with the GNU C Library; if not, see
  1510. // <https://www.gnu.org/licenses/>.
  1511. // Forward declaration.
  1512. type Pthread_attr_t1 = struct {
  1513. F__ccgo_pad1 [0]uint64
  1514. F__size [56]uint8
  1515. } /* sigevent_t.h:17:9 */
  1516. // Determine the wordsize from the preprocessor defines.
  1517. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1518. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1519. // This file is part of the GNU C Library.
  1520. //
  1521. // The GNU C Library is free software; you can redistribute it and/or
  1522. // modify it under the terms of the GNU Lesser General Public
  1523. // License as published by the Free Software Foundation; either
  1524. // version 2.1 of the License, or (at your option) any later version.
  1525. //
  1526. // The GNU C Library is distributed in the hope that it will be useful,
  1527. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1528. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1529. // Lesser General Public License for more details.
  1530. //
  1531. // You should have received a copy of the GNU Lesser General Public
  1532. // License along with the GNU C Library; if not, see
  1533. // <https://www.gnu.org/licenses/>.
  1534. // Never include this file directly; use <sys/types.h> instead.
  1535. // Define __sigval_t.
  1536. // Copyright (C) 1997-2020 Free Software Foundation, Inc.
  1537. // This file is part of the GNU C Library.
  1538. //
  1539. // The GNU C Library is free software; you can redistribute it and/or
  1540. // modify it under the terms of the GNU Lesser General Public
  1541. // License as published by the Free Software Foundation; either
  1542. // version 2.1 of the License, or (at your option) any later version.
  1543. //
  1544. // The GNU C Library is distributed in the hope that it will be useful,
  1545. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1546. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1547. // Lesser General Public License for more details.
  1548. //
  1549. // You should have received a copy of the GNU Lesser General Public
  1550. // License along with the GNU C Library; if not, see
  1551. // <https://www.gnu.org/licenses/>.
  1552. // Forward declaration.
  1553. type Pthread_attr_t = Pthread_attr_t1 /* sigevent_t.h:17:30 */
  1554. // Structure to transport application-defined values with signals.
  1555. type Sigevent = struct {
  1556. Fsigev_value X__sigval_t
  1557. Fsigev_signo int32
  1558. Fsigev_notify int32
  1559. F_sigev_un struct {
  1560. F__ccgo_pad1 [0]uint64
  1561. F_pad [12]int32
  1562. }
  1563. } /* sigevent_t.h:22:9 */
  1564. // Structure to transport application-defined values with signals.
  1565. type Sigevent_t = Sigevent /* sigevent_t.h:42:5 */
  1566. // Type of a signal handler.
  1567. type X__sighandler_t = uintptr /* signal.h:72:14 */
  1568. // 4.4 BSD uses the name `sig_t' for this.
  1569. type Sig_t = X__sighandler_t /* signal.h:190:24 */
  1570. // Get the system-specific definitions of `struct sigaction'
  1571. // and the `SA_*' and `SIG_*'. constants.
  1572. // The proper definitions for Linux's sigaction.
  1573. // Copyright (C) 1993-2020 Free Software Foundation, Inc.
  1574. // This file is part of the GNU C Library.
  1575. //
  1576. // The GNU C Library is free software; you can redistribute it and/or
  1577. // modify it under the terms of the GNU Lesser General Public
  1578. // License as published by the Free Software Foundation; either
  1579. // version 2.1 of the License, or (at your option) any later version.
  1580. //
  1581. // The GNU C Library is distributed in the hope that it will be useful,
  1582. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1583. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1584. // Lesser General Public License for more details.
  1585. //
  1586. // You should have received a copy of the GNU Lesser General Public
  1587. // License along with the GNU C Library; if not, see
  1588. // <https://www.gnu.org/licenses/>.
  1589. // Structure describing the action to be taken when a signal arrives.
  1590. type Sigaction = struct {
  1591. F__sigaction_handler struct{ Fsa_handler X__sighandler_t }
  1592. Fsa_mask X__sigset_t
  1593. Fsa_flags int32
  1594. F__ccgo_pad1 [4]byte
  1595. Fsa_restorer uintptr
  1596. } /* sigaction.h:27:1 */
  1597. // Get machine-dependent `struct sigcontext' and signal subcodes.
  1598. // Copyright (C) 1996-2020 Free Software Foundation, Inc.
  1599. // This file is part of the GNU C Library.
  1600. //
  1601. // The GNU C Library is free software; you can redistribute it and/or
  1602. // modify it under the terms of the GNU Lesser General Public
  1603. // License as published by the Free Software Foundation; either
  1604. // version 2.1 of the License, or (at your option) any later version.
  1605. //
  1606. // The GNU C Library is distributed in the hope that it will be useful,
  1607. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1608. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1609. // Lesser General Public License for more details.
  1610. //
  1611. // You should have received a copy of the GNU Lesser General Public
  1612. // License along with the GNU C Library; if not, see
  1613. // <https://www.gnu.org/licenses/>.
  1614. // Kernel headers before 2.1.1 define a struct sigcontext_struct, but
  1615. // we need sigcontext.
  1616. // SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note
  1617. // This program is free software; you can redistribute it and/or
  1618. // modify it under the terms of the GNU General Public License
  1619. // as published by the Free Software Foundation; either version
  1620. // 2 of the License, or (at your option) any later version.
  1621. // SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note
  1622. // Copyright (C) 2001 PPC64 Team, IBM Corp
  1623. //
  1624. // This struct defines the way the registers are stored on the
  1625. // kernel stack during a system call or other kernel entry.
  1626. //
  1627. // this should only contain __volatile__ regs
  1628. // since we can keep non-volatile in the thread_struct
  1629. // should set this up when only volatiles are saved
  1630. // by intr code.
  1631. //
  1632. // Since this is going on the stack, *CARE MUST BE TAKEN* to insure
  1633. // that the overall structure is a multiple of 16 bytes in length.
  1634. //
  1635. // Note that the offsets of the fields in this struct correspond with
  1636. // the PT_* values below. This simplifies arch/powerpc/kernel/ptrace.c.
  1637. //
  1638. // This program is free software; you can redistribute it and/or
  1639. // modify it under the terms of the GNU General Public License
  1640. // as published by the Free Software Foundation; either version
  1641. // 2 of the License, or (at your option) any later version.
  1642. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1643. // SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note
  1644. // This file is never included by application software unless
  1645. // explicitly requested (e.g., via linux/types.h) in which case the
  1646. // application is Linux specific so (user-) name space pollution is
  1647. // not a major issue. However, for interoperability, libraries still
  1648. // need to be careful to avoid a name clashes.
  1649. //
  1650. // This program is free software; you can redistribute it and/or
  1651. // modify it under the terms of the GNU General Public License
  1652. // as published by the Free Software Foundation; either version
  1653. // 2 of the License, or (at your option) any later version.
  1654. // This is here because we used to use l64 for 64bit powerpc
  1655. // and we don't want to impact user mode with our change to ll64
  1656. // in the kernel.
  1657. //
  1658. // However, some user programs are fine with this. They can
  1659. // flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here.
  1660. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1661. // asm-generic/int-l64.h
  1662. //
  1663. // Integer declarations for architectures which use "long"
  1664. // for 64-bit types.
  1665. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1666. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1667. // There seems to be no way of detecting this automatically from user
  1668. // space, so 64 bit architectures should override this in their
  1669. // bitsperlong.h. In particular, an architecture that supports
  1670. // both 32 and 64 bit user space must not rely on CONFIG_64BIT
  1671. // to decide it, but rather check a compiler provided macro.
  1672. // __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  1673. // header files exported to user space
  1674. type X__s8 = int8 /* int-l64.h:20:25 */
  1675. type X__u8 = uint8 /* int-l64.h:21:23 */
  1676. type X__s16 = int16 /* int-l64.h:23:26 */
  1677. type X__u16 = uint16 /* int-l64.h:24:24 */
  1678. type X__s32 = int32 /* int-l64.h:26:24 */
  1679. type X__u32 = uint32 /* int-l64.h:27:22 */
  1680. type X__s64 = int64 /* int-l64.h:29:25 */
  1681. type X__u64 = uint64 /* int-l64.h:30:23 */
  1682. type X__vector128 = struct {
  1683. F__ccgo_pad1 [0]uint64
  1684. Fu [4]X__u32
  1685. } /* types.h:36:32 */
  1686. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1687. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1688. // This allows for 1024 file descriptors: if NR_OPEN is ever grown
  1689. // beyond that you'll have to change this too. But 1024 fd's seem to be
  1690. // enough even for such "real" unices like OSF/1, so hopefully this is
  1691. // one limit that doesn't have to be changed [again].
  1692. //
  1693. // Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
  1694. // <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
  1695. // place for them. Solved by having dummy defines in <sys/time.h>.
  1696. // This macro may have been defined in <gnu/types.h>. But we always
  1697. // use the one here.
  1698. type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */
  1699. // Type of a signal handler.
  1700. type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */
  1701. // Type of a SYSV IPC key.
  1702. type X__kernel_key_t = int32 /* posix_types.h:33:13 */
  1703. type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
  1704. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1705. // This file is generally used by user-level software, so you need to
  1706. // be a little careful about namespace pollution etc. Also, we cannot
  1707. // assume GCC is being used.
  1708. type X__kernel_old_dev_t = uint64 /* posix_types.h:12:23 */
  1709. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1710. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1711. // This file is generally used by user-level software, so you need to
  1712. // be a little careful about namespace pollution etc.
  1713. //
  1714. // First the types that are often defined in different ways across
  1715. // architectures, so that you can override them.
  1716. type X__kernel_long_t = int64 /* posix_types.h:15:15 */
  1717. type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */
  1718. type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */
  1719. type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */
  1720. type X__kernel_pid_t = int32 /* posix_types.h:28:14 */
  1721. type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */
  1722. type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */
  1723. type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */
  1724. type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */
  1725. type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
  1726. type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
  1727. type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
  1728. type X__kernel_old_uid_t = X__kernel_uid_t /* posix_types.h:54:24 */
  1729. type X__kernel_old_gid_t = X__kernel_gid_t /* posix_types.h:55:24 */
  1730. // Most 32 bit architectures use "unsigned int" size_t,
  1731. // and all 64 bit architectures use "unsigned long" size_t.
  1732. type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */
  1733. type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */
  1734. type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */
  1735. type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
  1736. // anything below here should be completely generic
  1737. type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */
  1738. type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
  1739. type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */
  1740. type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */
  1741. type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
  1742. type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */
  1743. type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
  1744. type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
  1745. type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
  1746. type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
  1747. type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
  1748. // Below are truly Linux-specific types that should never collide with
  1749. // any application/library that wants linux/types.h.
  1750. type X__le16 = X__u16 /* types.h:24:25 */
  1751. type X__be16 = X__u16 /* types.h:25:25 */
  1752. type X__le32 = X__u32 /* types.h:26:25 */
  1753. type X__be32 = X__u32 /* types.h:27:25 */
  1754. type X__le64 = X__u64 /* types.h:28:25 */
  1755. type X__be64 = X__u64 /* types.h:29:25 */
  1756. type X__sum16 = X__u16 /* types.h:31:25 */
  1757. type X__wsum = X__u32 /* types.h:32:25 */
  1758. // aligned_u64 should be used in defining kernel<->userspace ABIs to avoid
  1759. // common 32/64-bit compat problems.
  1760. // 64-bit values align to 4-byte boundaries on x86_32 (and possibly other
  1761. // architectures) and to 8-byte boundaries on 64-bit architectures. The new
  1762. // aligned_64 type enforces 8-byte alignment so that structs containing
  1763. // aligned_64 values have the same alignment on 32-bit and 64-bit architectures.
  1764. // No conversions are necessary between 32-bit user-space and a 64-bit kernel.
  1765. type X__poll_t = uint32 /* types.h:47:28 */
  1766. type Pt_regs = struct {
  1767. Fgpr [32]uint64
  1768. Fnip uint64
  1769. Fmsr uint64
  1770. Forig_gpr3 uint64
  1771. Fctr uint64
  1772. Flink uint64
  1773. Fxer uint64
  1774. Fccr uint64
  1775. Fsofte uint64
  1776. Ftrap uint64
  1777. Fdar uint64
  1778. Fdsisr uint64
  1779. Fresult uint64
  1780. } /* ptrace.h:32:1 */
  1781. // Offsets used by 'ptrace' system call interface.
  1782. // These can't be changed without breaking binary compatibility
  1783. // with MkLinux, etc.
  1784. // Only store first 32 VSRs here. The second 32 VSRs in VR0-31
  1785. // Get/set all the altivec registers v0..v31, vscr, vrsave, in one go.
  1786. // The transfer totals 34 quadword. Quadwords 0-31 contain the
  1787. // corresponding vector registers. Quadword 32 contains the vscr as the
  1788. // last word (offset 12) within that quadword. Quadword 33 contains the
  1789. // vrsave as the first word (offset 0) within the quadword.
  1790. //
  1791. // This definition of the VMX state is compatible with the current PPC32
  1792. // ptrace interface. This allows signal handling and ptrace to use the same
  1793. // structures. This also simplifies the implementation of a bi-arch
  1794. // (combined (32- and 64-bit) gdb.
  1795. // Get/set all the upper 32-bits of the SPE registers, accumulator, and
  1796. // spefscr, in one go
  1797. // Get the first 32 128bit VSX registers
  1798. // Syscall emulation defines
  1799. // Get or set a debug register. The first 16 are DABR registers and the
  1800. // second 16 are IABR registers.
  1801. // (new) PTRACE requests using the same numbers as x86 and the same
  1802. // argument ordering. Additionally, they support more registers too
  1803. // Calls to trace a 64bit program from a 32bit program
  1804. type Ppc_debug_info = struct {
  1805. Fversion X__u32
  1806. Fnum_instruction_bps X__u32
  1807. Fnum_data_bps X__u32
  1808. Fnum_condition_regs X__u32
  1809. Fdata_bp_alignment X__u32
  1810. Fsizeof_condition X__u32
  1811. Ffeatures X__u64
  1812. } /* ptrace.h:201:1 */
  1813. // features will have bits indication whether there is support for:
  1814. type Ppc_hw_breakpoint = struct {
  1815. Fversion X__u32
  1816. Ftrigger_type X__u32
  1817. Faddr_mode X__u32
  1818. Fcondition_mode X__u32
  1819. Faddr X__u64
  1820. Faddr2 X__u64
  1821. Fcondition_value X__u64
  1822. } /* ptrace.h:225:1 */
  1823. // Trigger Type
  1824. // Address Mode
  1825. // Condition Mode
  1826. // SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note
  1827. // ELF register definitions..
  1828. //
  1829. // This program is free software; you can redistribute it and/or
  1830. // modify it under the terms of the GNU General Public License
  1831. // as published by the Free Software Foundation; either version
  1832. // 2 of the License, or (at your option) any later version.
  1833. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1834. // SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note
  1835. // Copyright (C) 2001 PPC64 Team, IBM Corp
  1836. //
  1837. // This struct defines the way the registers are stored on the
  1838. // kernel stack during a system call or other kernel entry.
  1839. //
  1840. // this should only contain __volatile__ regs
  1841. // since we can keep non-volatile in the thread_struct
  1842. // should set this up when only volatiles are saved
  1843. // by intr code.
  1844. //
  1845. // Since this is going on the stack, *CARE MUST BE TAKEN* to insure
  1846. // that the overall structure is a multiple of 16 bytes in length.
  1847. //
  1848. // Note that the offsets of the fields in this struct correspond with
  1849. // the PT_* values below. This simplifies arch/powerpc/kernel/ptrace.c.
  1850. //
  1851. // This program is free software; you can redistribute it and/or
  1852. // modify it under the terms of the GNU General Public License
  1853. // as published by the Free Software Foundation; either version
  1854. // 2 of the License, or (at your option) any later version.
  1855. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1856. // in AT_HWCAP
  1857. // Reserved - do not use 0x00000004
  1858. // in AT_HWCAP2
  1859. // IMPORTANT!
  1860. // All future PPC_FEATURE definitions should be allocated in cooperation with
  1861. // OPAL / skiboot firmware, in accordance with the ibm,powerpc-cpu-features
  1862. // device tree binding.
  1863. // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1864. // We need to put in some extra aux table entries to tell glibc what
  1865. // the cache block size is, so it can use the dcbz instruction safely.
  1866. // A special ignored type value for PPC, for glibc compatibility.
  1867. // The vDSO location. We have to use the same value as x86 for glibc's
  1868. // sake :-)
  1869. // AT_*CACHEBSIZE above represent the cache *block* size which is
  1870. // the size that is affected by the cache management instructions.
  1871. //
  1872. // It doesn't nececssarily matches the cache *line* size which is
  1873. // more of a performance tuning hint. Additionally the latter can
  1874. // be different for the different cache levels.
  1875. //
  1876. // The set of entries below represent more extensive information
  1877. // about the caches, in the form of two entry per cache type,
  1878. // one entry containing the cache size in bytes, and the other
  1879. // containing the cache line size in bytes in the bottom 16 bits
  1880. // and the cache associativity in the next 16 bits.
  1881. //
  1882. // The associativity is such that if N is the 16-bit value, the
  1883. // cache is N way set associative. A value if 0xffff means fully
  1884. // associative, a value of 1 means directly mapped.
  1885. //
  1886. // For all these fields, a value of 0 means that the information
  1887. // is not known.
  1888. // PowerPC relocations defined by the ABIs
  1889. // PowerPC relocations defined for the TLS access ABI.
  1890. // keep this the last entry.
  1891. type Elf_greg_t64 = uint64 /* elf.h:102:23 */
  1892. type Elf_gregset_t64 = [48]Elf_greg_t64 /* elf.h:103:22 */
  1893. type Elf_greg_t32 = uint32 /* elf.h:105:22 */
  1894. type Elf_gregset_t32 = [48]Elf_greg_t32 /* elf.h:106:22 */
  1895. type Compat_elf_gregset_t = Elf_gregset_t32 /* elf.h:107:25 */
  1896. // ELF_ARCH, CLASS, and DATA are used to set parameters in the core dumps.
  1897. type Elf_greg_t = Elf_greg_t64 /* elf.h:119:22 */
  1898. type Elf_gregset_t = Elf_gregset_t64 /* elf.h:120:25 */
  1899. // Floating point registers
  1900. type Elf_fpreg_t = float64 /* elf.h:138:16 */
  1901. type Elf_fpregset_t = [33]Elf_fpreg_t /* elf.h:139:21 */
  1902. // Altivec registers
  1903. // The entries with indexes 0-31 contain the corresponding vector registers.
  1904. // The entry with index 32 contains the vscr as the last word (offset 12)
  1905. // within the quadword. This allows the vscr to be stored as either a
  1906. // quadword (since it must be copied via a vector register to/from storage)
  1907. // or as a word.
  1908. //
  1909. // 64-bit kernel notes: The entry at index 33 contains the vrsave as the first
  1910. // word (offset 0) within the quadword.
  1911. //
  1912. // This definition of the VMX state is compatible with the current PPC32
  1913. // ptrace interface. This allows signal handling and ptrace to use the same
  1914. // structures. This also simplifies the implementation of a bi-arch
  1915. // (combined (32- and 64-bit) gdb.
  1916. //
  1917. // Note that it's _not_ compatible with 32 bits ucontext which stuffs the
  1918. // vrsave along with vscr and so only uses 33 vectors for the register set
  1919. type Elf_vrreg_t = X__vector128 /* elf.h:160:21 */
  1920. type Elf_vrregset_t = [34]Elf_vrreg_t /* elf.h:161:21 */
  1921. type Elf_vrregset_t32 = [33]Elf_vrreg_t /* elf.h:163:21 */
  1922. type Elf_vsrreghalf_t32 = [32]Elf_fpreg_t /* elf.h:164:21 */
  1923. // PowerPC64 relocations defined by the ABIs
  1924. // PowerPC64 relocations defined for the TLS access ABI.
  1925. // Keep this the last entry.
  1926. // There's actually a third entry here, but it's unused
  1927. type Ppc64_opd_entry = struct {
  1928. Ffuncaddr uint64
  1929. Fr2 uint64
  1930. } /* elf.h:293:1 */
  1931. type Sigcontext = struct {
  1932. F_unused [4]uint64
  1933. Fsignal int32
  1934. F_pad0 int32
  1935. Fhandler uint64
  1936. Foldmask uint64
  1937. Fregs uintptr
  1938. Fgp_regs Elf_gregset_t
  1939. Ffp_regs Elf_fpregset_t
  1940. Fv_regs uintptr
  1941. Fvmx_reserve [101]int64
  1942. } /* sigcontext.h:17:1 */
  1943. // Wide character type.
  1944. // Locale-writers should change this as necessary to
  1945. // be big enough to hold unique values not between 0 and 127,
  1946. // and not (wchar_t) -1, for each defined multibyte character.
  1947. // Define this type if we are doing the whole job,
  1948. // or if we want this type in particular.
  1949. // A null pointer constant.
  1950. // Define stack_t. Linux version.
  1951. // Copyright (C) 1998-2020 Free Software Foundation, Inc.
  1952. // This file is part of the GNU C Library.
  1953. //
  1954. // The GNU C Library is free software; you can redistribute it and/or
  1955. // modify it under the terms of the GNU Lesser General Public
  1956. // License as published by the Free Software Foundation; either
  1957. // version 2.1 of the License, or (at your option) any later version.
  1958. //
  1959. // The GNU C Library is distributed in the hope that it will be useful,
  1960. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1961. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1962. // Lesser General Public License for more details.
  1963. //
  1964. // You should have received a copy of the GNU Lesser General Public
  1965. // License along with the GNU C Library; if not, see
  1966. // <https://www.gnu.org/licenses/>.
  1967. // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  1968. //
  1969. // This file is part of GCC.
  1970. //
  1971. // GCC is free software; you can redistribute it and/or modify
  1972. // it under the terms of the GNU General Public License as published by
  1973. // the Free Software Foundation; either version 3, or (at your option)
  1974. // any later version.
  1975. //
  1976. // GCC is distributed in the hope that it will be useful,
  1977. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1978. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1979. // GNU General Public License for more details.
  1980. //
  1981. // Under Section 7 of GPL version 3, you are granted additional
  1982. // permissions described in the GCC Runtime Library Exception, version
  1983. // 3.1, as published by the Free Software Foundation.
  1984. //
  1985. // You should have received a copy of the GNU General Public License and
  1986. // a copy of the GCC Runtime Library Exception along with this program;
  1987. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  1988. // <http://www.gnu.org/licenses/>.
  1989. // ISO C Standard: 7.17 Common definitions <stddef.h>
  1990. // Any one of these symbols __need_* means that GNU libc
  1991. // wants us just to define one data type. So don't define
  1992. // the symbols that indicate this file's entire job has been done.
  1993. // This avoids lossage on SunOS but only if stdtypes.h comes first.
  1994. // There's no way to win with the other order! Sun lossage.
  1995. // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  1996. // Just ignore it.
  1997. // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  1998. // _TYPE_size_t which will typedef size_t. fixincludes patched the
  1999. // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  2000. // not defined, and so that defining this macro defines _GCC_SIZE_T.
  2001. // If we find that the macros are still defined at this point, we must
  2002. // invoke them so that the type is defined as expected.
  2003. // In case nobody has defined these types, but we aren't running under
  2004. // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  2005. // __WCHAR_TYPE__ have reasonable values. This can happen if the
  2006. // parts of GCC is compiled by an older compiler, that actually
  2007. // include gstddef.h, such as collect2.
  2008. // Signed type of difference of two pointers.
  2009. // Define this type if we are doing the whole job,
  2010. // or if we want this type in particular.
  2011. // Unsigned type of `sizeof' something.
  2012. // Define this type if we are doing the whole job,
  2013. // or if we want this type in particular.
  2014. // Wide character type.
  2015. // Locale-writers should change this as necessary to
  2016. // be big enough to hold unique values not between 0 and 127,
  2017. // and not (wchar_t) -1, for each defined multibyte character.
  2018. // Define this type if we are doing the whole job,
  2019. // or if we want this type in particular.
  2020. // A null pointer constant.
  2021. // Structure describing a signal stack.
  2022. type Stack_t = struct {
  2023. Fss_sp uintptr
  2024. Fss_flags int32
  2025. F__ccgo_pad1 [4]byte
  2026. Fss_size Size_t
  2027. } /* stack_t.h:31:5 */
  2028. // For 64-bit kernels with Altivec support, a machine context is exactly
  2029. // a sigcontext. For older kernel (without Altivec) the sigcontext matches
  2030. // the mcontext upto but not including the v_regs field. For kernels that
  2031. // don't set AT_HWCAP or return AT_HWCAP without PPC_FEATURE_HAS_ALTIVEC the
  2032. // v_regs field may not exist and should not be referenced. The v_regs field
  2033. // can be referenced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC
  2034. // is set in AT_HWCAP.
  2035. // Number of general registers.
  2036. type Gregset_t = [48]uint64 /* ucontext.h:93:23 */
  2037. type Fpregset_t = [33]float64 /* ucontext.h:94:16 */
  2038. // Container for Altivec/VMX Vector Status and Control Register. Only 32-bits
  2039. //
  2040. // but can only be copied to/from a 128-bit vector register. So we allocated
  2041. // a whole quadword speedup save/restore.
  2042. type X_libc_vscr = struct {
  2043. Fvscr_word uint32
  2044. F__pad [3]uint32
  2045. } /* ucontext.h:99:9 */
  2046. // Container for Altivec/VMX Vector Status and Control Register. Only 32-bits
  2047. //
  2048. // but can only be copied to/from a 128-bit vector register. So we allocated
  2049. // a whole quadword speedup save/restore.
  2050. type Vscr_t = X_libc_vscr /* ucontext.h:108:3 */
  2051. // Container for Altivec/VMX registers and status.
  2052. //
  2053. // Must to be aligned on a 16-byte boundary.
  2054. type X_libc_vrstate = struct {
  2055. Fvrregs [32][4]uint32
  2056. Fvscr Vscr_t
  2057. Fvrsave uint32
  2058. F__pad [3]uint32
  2059. } /* ucontext.h:112:9 */
  2060. // Container for Altivec/VMX registers and status.
  2061. //
  2062. // Must to be aligned on a 16-byte boundary.
  2063. type Vrregset_t = X_libc_vrstate /* ucontext.h:118:3 */
  2064. type Mcontext_t = struct {
  2065. F__glibc_reserved [4]uint64
  2066. Fsignal int32
  2067. F__pad0 int32
  2068. Fhandler uint64
  2069. Foldmask uint64
  2070. Fregs uintptr
  2071. Fgp_regs Gregset_t
  2072. Ffp_regs Fpregset_t
  2073. Fv_regs uintptr
  2074. Fvmx_reserve [69]int64
  2075. } /* ucontext.h:150:3 */
  2076. // Userlevel context.
  2077. type Ucontext_t1 = struct {
  2078. Fuc_flags uint64
  2079. Fuc_link uintptr
  2080. Fuc_stack Stack_t
  2081. Fuc_sigmask Sigset_t
  2082. Fuc_mcontext Mcontext_t
  2083. } /* ucontext.h:155:9 */
  2084. // Userlevel context.
  2085. type Ucontext_t = Ucontext_t1 /* ucontext.h:196:5 */
  2086. // Define struct sigstack.
  2087. // Copyright (C) 1998-2020 Free Software Foundation, Inc.
  2088. // This file is part of the GNU C Library.
  2089. //
  2090. // The GNU C Library is free software; you can redistribute it and/or
  2091. // modify it under the terms of the GNU Lesser General Public
  2092. // License as published by the Free Software Foundation; either
  2093. // version 2.1 of the License, or (at your option) any later version.
  2094. //
  2095. // The GNU C Library is distributed in the hope that it will be useful,
  2096. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2097. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2098. // Lesser General Public License for more details.
  2099. //
  2100. // You should have received a copy of the GNU Lesser General Public
  2101. // License along with the GNU C Library; if not, see
  2102. // <https://www.gnu.org/licenses/>.
  2103. // Structure describing a signal stack (obsolete).
  2104. type Sigstack = struct {
  2105. Fss_sp uintptr
  2106. Fss_onstack int32
  2107. F__ccgo_pad1 [4]byte
  2108. } /* struct_sigstack.h:23:1 */
  2109. // Some of the functions for handling signals in threaded programs must
  2110. // be defined here.
  2111. // Declaration of common pthread types for all architectures.
  2112. // Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2113. // This file is part of the GNU C Library.
  2114. //
  2115. // The GNU C Library is free software; you can redistribute it and/or
  2116. // modify it under the terms of the GNU Lesser General Public
  2117. // License as published by the Free Software Foundation; either
  2118. // version 2.1 of the License, or (at your option) any later version.
  2119. //
  2120. // The GNU C Library is distributed in the hope that it will be useful,
  2121. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2122. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2123. // Lesser General Public License for more details.
  2124. //
  2125. // You should have received a copy of the GNU Lesser General Public
  2126. // License along with the GNU C Library; if not, see
  2127. // <https://www.gnu.org/licenses/>.
  2128. // For internal mutex and condition variable definitions.
  2129. // Common threading primitives definitions for both POSIX and C11.
  2130. // Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2131. // This file is part of the GNU C Library.
  2132. //
  2133. // The GNU C Library is free software; you can redistribute it and/or
  2134. // modify it under the terms of the GNU Lesser General Public
  2135. // License as published by the Free Software Foundation; either
  2136. // version 2.1 of the License, or (at your option) any later version.
  2137. //
  2138. // The GNU C Library is distributed in the hope that it will be useful,
  2139. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2140. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2141. // Lesser General Public License for more details.
  2142. //
  2143. // You should have received a copy of the GNU Lesser General Public
  2144. // License along with the GNU C Library; if not, see
  2145. // <https://www.gnu.org/licenses/>.
  2146. // Arch-specific definitions. Each architecture must define the following
  2147. // macros to define the expected sizes of pthread data types:
  2148. //
  2149. // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
  2150. // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
  2151. // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
  2152. // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
  2153. // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
  2154. // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
  2155. // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
  2156. // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
  2157. // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  2158. //
  2159. // The additional macro defines any constraint for the lock alignment
  2160. // inside the thread structures:
  2161. //
  2162. // __LOCK_ALIGNMENT - for internal lock/futex usage.
  2163. //
  2164. // Same idea but for the once locking primitive:
  2165. //
  2166. // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  2167. // Machine-specific pthread type layouts. Generic version.
  2168. // Copyright (C) 2019-2020 Free Software Foundation, Inc.
  2169. //
  2170. // This file is part of the GNU C Library.
  2171. //
  2172. // The GNU C Library is free software; you can redistribute it and/or
  2173. // modify it under the terms of the GNU Lesser General Public
  2174. // License as published by the Free Software Foundation; either
  2175. // version 2.1 of the License, or (at your option) any later version.
  2176. //
  2177. // The GNU C Library is distributed in the hope that it will be useful,
  2178. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2179. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2180. // Lesser General Public License for more details.
  2181. //
  2182. // You should have received a copy of the GNU Lesser General Public
  2183. // License along with the GNU C Library; if not, see
  2184. // <http://www.gnu.org/licenses/>.
  2185. // Determine the wordsize from the preprocessor defines.
  2186. // Common definition of pthread_mutex_t.
  2187. type X__pthread_internal_list = struct {
  2188. F__prev uintptr
  2189. F__next uintptr
  2190. } /* thread-shared-types.h:49:9 */
  2191. // Some of the functions for handling signals in threaded programs must
  2192. // be defined here.
  2193. // Declaration of common pthread types for all architectures.
  2194. // Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2195. // This file is part of the GNU C Library.
  2196. //
  2197. // The GNU C Library is free software; you can redistribute it and/or
  2198. // modify it under the terms of the GNU Lesser General Public
  2199. // License as published by the Free Software Foundation; either
  2200. // version 2.1 of the License, or (at your option) any later version.
  2201. //
  2202. // The GNU C Library is distributed in the hope that it will be useful,
  2203. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2204. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2205. // Lesser General Public License for more details.
  2206. //
  2207. // You should have received a copy of the GNU Lesser General Public
  2208. // License along with the GNU C Library; if not, see
  2209. // <https://www.gnu.org/licenses/>.
  2210. // For internal mutex and condition variable definitions.
  2211. // Common threading primitives definitions for both POSIX and C11.
  2212. // Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2213. // This file is part of the GNU C Library.
  2214. //
  2215. // The GNU C Library is free software; you can redistribute it and/or
  2216. // modify it under the terms of the GNU Lesser General Public
  2217. // License as published by the Free Software Foundation; either
  2218. // version 2.1 of the License, or (at your option) any later version.
  2219. //
  2220. // The GNU C Library is distributed in the hope that it will be useful,
  2221. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2222. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2223. // Lesser General Public License for more details.
  2224. //
  2225. // You should have received a copy of the GNU Lesser General Public
  2226. // License along with the GNU C Library; if not, see
  2227. // <https://www.gnu.org/licenses/>.
  2228. // Arch-specific definitions. Each architecture must define the following
  2229. // macros to define the expected sizes of pthread data types:
  2230. //
  2231. // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
  2232. // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
  2233. // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
  2234. // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
  2235. // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
  2236. // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
  2237. // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
  2238. // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
  2239. // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  2240. //
  2241. // The additional macro defines any constraint for the lock alignment
  2242. // inside the thread structures:
  2243. //
  2244. // __LOCK_ALIGNMENT - for internal lock/futex usage.
  2245. //
  2246. // Same idea but for the once locking primitive:
  2247. //
  2248. // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  2249. // Machine-specific pthread type layouts. Generic version.
  2250. // Copyright (C) 2019-2020 Free Software Foundation, Inc.
  2251. //
  2252. // This file is part of the GNU C Library.
  2253. //
  2254. // The GNU C Library is free software; you can redistribute it and/or
  2255. // modify it under the terms of the GNU Lesser General Public
  2256. // License as published by the Free Software Foundation; either
  2257. // version 2.1 of the License, or (at your option) any later version.
  2258. //
  2259. // The GNU C Library is distributed in the hope that it will be useful,
  2260. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2261. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2262. // Lesser General Public License for more details.
  2263. //
  2264. // You should have received a copy of the GNU Lesser General Public
  2265. // License along with the GNU C Library; if not, see
  2266. // <http://www.gnu.org/licenses/>.
  2267. // Determine the wordsize from the preprocessor defines.
  2268. // Common definition of pthread_mutex_t.
  2269. type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
  2270. type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
  2271. type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
  2272. // Arch-specific mutex definitions. A generic implementation is provided
  2273. // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
  2274. // can override it by defining:
  2275. //
  2276. // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
  2277. // definition). It should contains at least the internal members
  2278. // defined in the generic version.
  2279. //
  2280. // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
  2281. // atomic operations.
  2282. //
  2283. // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
  2284. // It should initialize the mutex internal flag.
  2285. // PowerPC internal mutex struct definitions.
  2286. // Copyright (C) 2019-2020 Free Software Foundation, Inc.
  2287. // This file is part of the GNU C Library.
  2288. //
  2289. // The GNU C Library is free software; you can redistribute it and/or
  2290. // modify it under the terms of the GNU Lesser General Public
  2291. // License as published by the Free Software Foundation; either
  2292. // version 2.1 of the License, or (at your option) any later version.
  2293. //
  2294. // The GNU C Library is distributed in the hope that it will be useful,
  2295. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2296. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2297. // Lesser General Public License for more details.
  2298. //
  2299. // You should have received a copy of the GNU Lesser General Public
  2300. // License along with the GNU C Library; if not, see
  2301. // <http://www.gnu.org/licenses/>.
  2302. type X__pthread_mutex_s = struct {
  2303. F__lock int32
  2304. F__count uint32
  2305. F__owner int32
  2306. F__nusers uint32
  2307. F__kind int32
  2308. F__spins int16
  2309. F__elision int16
  2310. F__list X__pthread_list_t
  2311. } /* struct_mutex.h:22:1 */
  2312. // Arch-sepecific read-write lock definitions. A generic implementation is
  2313. // provided by struct_rwlock.h. If required, an architecture can override it
  2314. // by defining:
  2315. //
  2316. // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
  2317. // It should contain at least the internal members defined in the
  2318. // generic version.
  2319. //
  2320. // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
  2321. // It should initialize the rwlock internal type.
  2322. // PowerPC internal rwlock struct definitions.
  2323. // Copyright (C) 2019-2020 Free Software Foundation, Inc.
  2324. //
  2325. // This file is part of the GNU C Library.
  2326. //
  2327. // The GNU C Library is free software; you can redistribute it and/or
  2328. // modify it under the terms of the GNU Lesser General Public
  2329. // License as published by the Free Software Foundation; either
  2330. // version 2.1 of the License, or (at your option) any later version.
  2331. //
  2332. // The GNU C Library is distributed in the hope that it will be useful,
  2333. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2334. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2335. // Lesser General Public License for more details.
  2336. //
  2337. // You should have received a copy of the GNU Lesser General Public
  2338. // License along with the GNU C Library; if not, see
  2339. // <http://www.gnu.org/licenses/>.
  2340. type X__pthread_rwlock_arch_t = struct {
  2341. F__readers uint32
  2342. F__writers uint32
  2343. F__wrphase_futex uint32
  2344. F__writers_futex uint32
  2345. F__pad3 uint32
  2346. F__pad4 uint32
  2347. F__cur_writer int32
  2348. F__shared int32
  2349. F__rwelision uint8
  2350. F__pad1 [7]uint8
  2351. F__pad2 uint64
  2352. F__flags uint32
  2353. F__ccgo_pad1 [4]byte
  2354. } /* struct_rwlock.h:23:1 */
  2355. // Common definition of pthread_cond_t.
  2356. type X__pthread_cond_s = struct {
  2357. F__0 struct{ F__wseq uint64 }
  2358. F__8 struct{ F__g1_start uint64 }
  2359. F__g_refs [2]uint32
  2360. F__g_size [2]uint32
  2361. F__g1_orig_size uint32
  2362. F__wrefs uint32
  2363. F__g_signals [2]uint32
  2364. } /* thread-shared-types.h:92:1 */
  2365. // Thread identifiers. The structure of the attribute type is not
  2366. //
  2367. // exposed on purpose.
  2368. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */
  2369. // Data structures for mutex handling. The structure of the attribute
  2370. //
  2371. // type is not exposed on purpose.
  2372. type Pthread_mutexattr_t = struct {
  2373. F__ccgo_pad1 [0]uint32
  2374. F__size [4]uint8
  2375. } /* pthreadtypes.h:36:3 */
  2376. // Data structure for condition variable handling. The structure of
  2377. //
  2378. // the attribute type is not exposed on purpose.
  2379. type Pthread_condattr_t = struct {
  2380. F__ccgo_pad1 [0]uint32
  2381. F__size [4]uint8
  2382. } /* pthreadtypes.h:45:3 */
  2383. // Keys for thread-specific data
  2384. type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
  2385. // Once-only execution
  2386. type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
  2387. type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
  2388. type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */
  2389. // Data structure for reader-writer lock variable handling. The
  2390. //
  2391. // structure of the attribute type is deliberately not exposed.
  2392. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
  2393. type Pthread_rwlockattr_t = struct {
  2394. F__ccgo_pad1 [0]uint64
  2395. F__size [8]uint8
  2396. } /* pthreadtypes.h:97:3 */
  2397. // POSIX spinlock data type.
  2398. type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
  2399. // POSIX barriers data type. The structure of the type is
  2400. //
  2401. // deliberately not exposed.
  2402. type Pthread_barrier_t = struct {
  2403. F__ccgo_pad1 [0]uint64
  2404. F__size [32]uint8
  2405. } /* pthreadtypes.h:112:3 */
  2406. type Pthread_barrierattr_t = struct {
  2407. F__ccgo_pad1 [0]uint32
  2408. F__size [4]uint8
  2409. } /* pthreadtypes.h:118:3 */
  2410. // System-specific extensions.
  2411. // System-specific extensions of <signal.h>, Linux version.
  2412. // Copyright (C) 2019-2020 Free Software Foundation, Inc.
  2413. // This file is part of the GNU C Library.
  2414. //
  2415. // The GNU C Library is free software; you can redistribute it and/or
  2416. // modify it under the terms of the GNU Lesser General Public
  2417. // License as published by the Free Software Foundation; either
  2418. // version 2.1 of the License, or (at your option) any later version.
  2419. //
  2420. // The GNU C Library is distributed in the hope that it will be useful,
  2421. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2422. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2423. // Lesser General Public License for more details.
  2424. //
  2425. // You should have received a copy of the GNU Lesser General Public
  2426. // License along with the GNU C Library; if not, see
  2427. // <https://www.gnu.org/licenses/>.
  2428. var _ uint8 /* gen.c:2:13: */