zsyscall_linux_ppc64.go 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224
  1. // mksyscall.pl -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build linux,ppc64
  4. package unix
  5. import (
  6. "syscall"
  7. "unsafe"
  8. )
  9. var _ syscall.Errno
  10. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  11. func fchmodat(dirfd int, path string, mode uint32) (err error) {
  12. var _p0 *byte
  13. _p0, err = BytePtrFromString(path)
  14. if err != nil {
  15. return
  16. }
  17. _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  18. if e1 != 0 {
  19. err = errnoErr(e1)
  20. }
  21. return
  22. }
  23. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  24. func ioctl(fd int, req uint, arg uintptr) (err error) {
  25. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  26. if e1 != 0 {
  27. err = errnoErr(e1)
  28. }
  29. return
  30. }
  31. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  32. func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
  33. var _p0 *byte
  34. _p0, err = BytePtrFromString(oldpath)
  35. if err != nil {
  36. return
  37. }
  38. var _p1 *byte
  39. _p1, err = BytePtrFromString(newpath)
  40. if err != nil {
  41. return
  42. }
  43. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  44. if e1 != 0 {
  45. err = errnoErr(e1)
  46. }
  47. return
  48. }
  49. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  50. func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
  51. var _p0 *byte
  52. _p0, err = BytePtrFromString(path)
  53. if err != nil {
  54. return
  55. }
  56. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
  57. fd = int(r0)
  58. if e1 != 0 {
  59. err = errnoErr(e1)
  60. }
  61. return
  62. }
  63. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  64. func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  65. r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
  66. n = int(r0)
  67. if e1 != 0 {
  68. err = errnoErr(e1)
  69. }
  70. return
  71. }
  72. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  73. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  74. var _p0 *byte
  75. _p0, err = BytePtrFromString(path)
  76. if err != nil {
  77. return
  78. }
  79. var _p1 unsafe.Pointer
  80. if len(buf) > 0 {
  81. _p1 = unsafe.Pointer(&buf[0])
  82. } else {
  83. _p1 = unsafe.Pointer(&_zero)
  84. }
  85. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  86. n = int(r0)
  87. if e1 != 0 {
  88. err = errnoErr(e1)
  89. }
  90. return
  91. }
  92. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  93. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  94. var _p0 *byte
  95. _p0, err = BytePtrFromString(oldpath)
  96. if err != nil {
  97. return
  98. }
  99. var _p1 *byte
  100. _p1, err = BytePtrFromString(newpath)
  101. if err != nil {
  102. return
  103. }
  104. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  105. if e1 != 0 {
  106. err = errnoErr(e1)
  107. }
  108. return
  109. }
  110. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  111. func Unlinkat(dirfd int, path string, flags int) (err error) {
  112. var _p0 *byte
  113. _p0, err = BytePtrFromString(path)
  114. if err != nil {
  115. return
  116. }
  117. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  118. if e1 != 0 {
  119. err = errnoErr(e1)
  120. }
  121. return
  122. }
  123. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  124. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  125. var _p0 *byte
  126. _p0, err = BytePtrFromString(path)
  127. if err != nil {
  128. return
  129. }
  130. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  131. if e1 != 0 {
  132. err = errnoErr(e1)
  133. }
  134. return
  135. }
  136. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  137. func Getcwd(buf []byte) (n int, err error) {
  138. var _p0 unsafe.Pointer
  139. if len(buf) > 0 {
  140. _p0 = unsafe.Pointer(&buf[0])
  141. } else {
  142. _p0 = unsafe.Pointer(&_zero)
  143. }
  144. r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  145. n = int(r0)
  146. if e1 != 0 {
  147. err = errnoErr(e1)
  148. }
  149. return
  150. }
  151. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  152. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  153. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  154. wpid = int(r0)
  155. if e1 != 0 {
  156. err = errnoErr(e1)
  157. }
  158. return
  159. }
  160. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  161. func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
  162. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  163. ret = int(r0)
  164. if e1 != 0 {
  165. err = errnoErr(e1)
  166. }
  167. return
  168. }
  169. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  170. func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
  171. var _p0 unsafe.Pointer
  172. if len(buf) > 0 {
  173. _p0 = unsafe.Pointer(&buf[0])
  174. } else {
  175. _p0 = unsafe.Pointer(&_zero)
  176. }
  177. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
  178. ret = int(r0)
  179. if e1 != 0 {
  180. err = errnoErr(e1)
  181. }
  182. return
  183. }
  184. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  185. func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
  186. var _p0 *byte
  187. _p0, err = BytePtrFromString(arg2)
  188. if err != nil {
  189. return
  190. }
  191. r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
  192. ret = int(r0)
  193. if e1 != 0 {
  194. err = errnoErr(e1)
  195. }
  196. return
  197. }
  198. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  199. func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
  200. var _p0 *byte
  201. _p0, err = BytePtrFromString(arg3)
  202. if err != nil {
  203. return
  204. }
  205. var _p1 *byte
  206. _p1, err = BytePtrFromString(arg4)
  207. if err != nil {
  208. return
  209. }
  210. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
  211. ret = int(r0)
  212. if e1 != 0 {
  213. err = errnoErr(e1)
  214. }
  215. return
  216. }
  217. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  218. func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
  219. var _p0 unsafe.Pointer
  220. if len(payload) > 0 {
  221. _p0 = unsafe.Pointer(&payload[0])
  222. } else {
  223. _p0 = unsafe.Pointer(&_zero)
  224. }
  225. _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
  226. if e1 != 0 {
  227. err = errnoErr(e1)
  228. }
  229. return
  230. }
  231. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  232. func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
  233. var _p0 unsafe.Pointer
  234. if len(buf) > 0 {
  235. _p0 = unsafe.Pointer(&buf[0])
  236. } else {
  237. _p0 = unsafe.Pointer(&_zero)
  238. }
  239. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
  240. ret = int(r0)
  241. if e1 != 0 {
  242. err = errnoErr(e1)
  243. }
  244. return
  245. }
  246. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  247. func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
  248. _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
  249. if e1 != 0 {
  250. err = errnoErr(e1)
  251. }
  252. return
  253. }
  254. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  255. func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
  256. var _p0 *byte
  257. _p0, err = BytePtrFromString(arg)
  258. if err != nil {
  259. return
  260. }
  261. _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
  262. if e1 != 0 {
  263. err = errnoErr(e1)
  264. }
  265. return
  266. }
  267. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  268. func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
  269. var _p0 *byte
  270. _p0, err = BytePtrFromString(source)
  271. if err != nil {
  272. return
  273. }
  274. var _p1 *byte
  275. _p1, err = BytePtrFromString(target)
  276. if err != nil {
  277. return
  278. }
  279. var _p2 *byte
  280. _p2, err = BytePtrFromString(fstype)
  281. if err != nil {
  282. return
  283. }
  284. _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
  285. if e1 != 0 {
  286. err = errnoErr(e1)
  287. }
  288. return
  289. }
  290. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  291. func Acct(path string) (err error) {
  292. var _p0 *byte
  293. _p0, err = BytePtrFromString(path)
  294. if err != nil {
  295. return
  296. }
  297. _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  298. if e1 != 0 {
  299. err = errnoErr(e1)
  300. }
  301. return
  302. }
  303. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  304. func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
  305. var _p0 *byte
  306. _p0, err = BytePtrFromString(keyType)
  307. if err != nil {
  308. return
  309. }
  310. var _p1 *byte
  311. _p1, err = BytePtrFromString(description)
  312. if err != nil {
  313. return
  314. }
  315. var _p2 unsafe.Pointer
  316. if len(payload) > 0 {
  317. _p2 = unsafe.Pointer(&payload[0])
  318. } else {
  319. _p2 = unsafe.Pointer(&_zero)
  320. }
  321. r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
  322. id = int(r0)
  323. if e1 != 0 {
  324. err = errnoErr(e1)
  325. }
  326. return
  327. }
  328. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  329. func Adjtimex(buf *Timex) (state int, err error) {
  330. r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
  331. state = int(r0)
  332. if e1 != 0 {
  333. err = errnoErr(e1)
  334. }
  335. return
  336. }
  337. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  338. func Chdir(path string) (err error) {
  339. var _p0 *byte
  340. _p0, err = BytePtrFromString(path)
  341. if err != nil {
  342. return
  343. }
  344. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  345. if e1 != 0 {
  346. err = errnoErr(e1)
  347. }
  348. return
  349. }
  350. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  351. func Chroot(path string) (err error) {
  352. var _p0 *byte
  353. _p0, err = BytePtrFromString(path)
  354. if err != nil {
  355. return
  356. }
  357. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  358. if e1 != 0 {
  359. err = errnoErr(e1)
  360. }
  361. return
  362. }
  363. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  364. func ClockGettime(clockid int32, time *Timespec) (err error) {
  365. _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
  366. if e1 != 0 {
  367. err = errnoErr(e1)
  368. }
  369. return
  370. }
  371. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  372. func Close(fd int) (err error) {
  373. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  374. if e1 != 0 {
  375. err = errnoErr(e1)
  376. }
  377. return
  378. }
  379. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  380. func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  381. r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  382. n = int(r0)
  383. if e1 != 0 {
  384. err = errnoErr(e1)
  385. }
  386. return
  387. }
  388. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  389. func Dup(oldfd int) (fd int, err error) {
  390. r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
  391. fd = int(r0)
  392. if e1 != 0 {
  393. err = errnoErr(e1)
  394. }
  395. return
  396. }
  397. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  398. func Dup3(oldfd int, newfd int, flags int) (err error) {
  399. _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
  400. if e1 != 0 {
  401. err = errnoErr(e1)
  402. }
  403. return
  404. }
  405. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  406. func EpollCreate1(flag int) (fd int, err error) {
  407. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
  408. fd = int(r0)
  409. if e1 != 0 {
  410. err = errnoErr(e1)
  411. }
  412. return
  413. }
  414. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  415. func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
  416. _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
  417. if e1 != 0 {
  418. err = errnoErr(e1)
  419. }
  420. return
  421. }
  422. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  423. func Eventfd(initval uint, flags int) (fd int, err error) {
  424. r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
  425. fd = int(r0)
  426. if e1 != 0 {
  427. err = errnoErr(e1)
  428. }
  429. return
  430. }
  431. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  432. func Exit(code int) {
  433. SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
  434. return
  435. }
  436. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  437. func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
  438. _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
  439. if e1 != 0 {
  440. err = errnoErr(e1)
  441. }
  442. return
  443. }
  444. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  445. func Fchdir(fd int) (err error) {
  446. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  447. if e1 != 0 {
  448. err = errnoErr(e1)
  449. }
  450. return
  451. }
  452. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  453. func Fchmod(fd int, mode uint32) (err error) {
  454. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  455. if e1 != 0 {
  456. err = errnoErr(e1)
  457. }
  458. return
  459. }
  460. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  461. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  462. var _p0 *byte
  463. _p0, err = BytePtrFromString(path)
  464. if err != nil {
  465. return
  466. }
  467. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  468. if e1 != 0 {
  469. err = errnoErr(e1)
  470. }
  471. return
  472. }
  473. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  474. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  475. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  476. val = int(r0)
  477. if e1 != 0 {
  478. err = errnoErr(e1)
  479. }
  480. return
  481. }
  482. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  483. func Fdatasync(fd int) (err error) {
  484. _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
  485. if e1 != 0 {
  486. err = errnoErr(e1)
  487. }
  488. return
  489. }
  490. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  491. func Flock(fd int, how int) (err error) {
  492. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  493. if e1 != 0 {
  494. err = errnoErr(e1)
  495. }
  496. return
  497. }
  498. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  499. func Fsync(fd int) (err error) {
  500. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  501. if e1 != 0 {
  502. err = errnoErr(e1)
  503. }
  504. return
  505. }
  506. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  507. func Getdents(fd int, buf []byte) (n int, err error) {
  508. var _p0 unsafe.Pointer
  509. if len(buf) > 0 {
  510. _p0 = unsafe.Pointer(&buf[0])
  511. } else {
  512. _p0 = unsafe.Pointer(&_zero)
  513. }
  514. r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  515. n = int(r0)
  516. if e1 != 0 {
  517. err = errnoErr(e1)
  518. }
  519. return
  520. }
  521. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  522. func Getpgid(pid int) (pgid int, err error) {
  523. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  524. pgid = int(r0)
  525. if e1 != 0 {
  526. err = errnoErr(e1)
  527. }
  528. return
  529. }
  530. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  531. func Getpid() (pid int) {
  532. r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
  533. pid = int(r0)
  534. return
  535. }
  536. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  537. func Getppid() (ppid int) {
  538. r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
  539. ppid = int(r0)
  540. return
  541. }
  542. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  543. func Getpriority(which int, who int) (prio int, err error) {
  544. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  545. prio = int(r0)
  546. if e1 != 0 {
  547. err = errnoErr(e1)
  548. }
  549. return
  550. }
  551. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  552. func Getrandom(buf []byte, flags int) (n int, err error) {
  553. var _p0 unsafe.Pointer
  554. if len(buf) > 0 {
  555. _p0 = unsafe.Pointer(&buf[0])
  556. } else {
  557. _p0 = unsafe.Pointer(&_zero)
  558. }
  559. r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
  560. n = int(r0)
  561. if e1 != 0 {
  562. err = errnoErr(e1)
  563. }
  564. return
  565. }
  566. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  567. func Getrusage(who int, rusage *Rusage) (err error) {
  568. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  569. if e1 != 0 {
  570. err = errnoErr(e1)
  571. }
  572. return
  573. }
  574. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  575. func Getsid(pid int) (sid int, err error) {
  576. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  577. sid = int(r0)
  578. if e1 != 0 {
  579. err = errnoErr(e1)
  580. }
  581. return
  582. }
  583. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  584. func Gettid() (tid int) {
  585. r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
  586. tid = int(r0)
  587. return
  588. }
  589. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  590. func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
  591. var _p0 *byte
  592. _p0, err = BytePtrFromString(path)
  593. if err != nil {
  594. return
  595. }
  596. var _p1 *byte
  597. _p1, err = BytePtrFromString(attr)
  598. if err != nil {
  599. return
  600. }
  601. var _p2 unsafe.Pointer
  602. if len(dest) > 0 {
  603. _p2 = unsafe.Pointer(&dest[0])
  604. } else {
  605. _p2 = unsafe.Pointer(&_zero)
  606. }
  607. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  608. sz = int(r0)
  609. if e1 != 0 {
  610. err = errnoErr(e1)
  611. }
  612. return
  613. }
  614. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  615. func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
  616. var _p0 *byte
  617. _p0, err = BytePtrFromString(pathname)
  618. if err != nil {
  619. return
  620. }
  621. r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
  622. watchdesc = int(r0)
  623. if e1 != 0 {
  624. err = errnoErr(e1)
  625. }
  626. return
  627. }
  628. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  629. func InotifyInit1(flags int) (fd int, err error) {
  630. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
  631. fd = int(r0)
  632. if e1 != 0 {
  633. err = errnoErr(e1)
  634. }
  635. return
  636. }
  637. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  638. func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
  639. r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
  640. success = int(r0)
  641. if e1 != 0 {
  642. err = errnoErr(e1)
  643. }
  644. return
  645. }
  646. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  647. func Kill(pid int, sig syscall.Signal) (err error) {
  648. _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
  649. if e1 != 0 {
  650. err = errnoErr(e1)
  651. }
  652. return
  653. }
  654. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  655. func Klogctl(typ int, buf []byte) (n int, err error) {
  656. var _p0 unsafe.Pointer
  657. if len(buf) > 0 {
  658. _p0 = unsafe.Pointer(&buf[0])
  659. } else {
  660. _p0 = unsafe.Pointer(&_zero)
  661. }
  662. r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
  663. n = int(r0)
  664. if e1 != 0 {
  665. err = errnoErr(e1)
  666. }
  667. return
  668. }
  669. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  670. func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
  671. var _p0 *byte
  672. _p0, err = BytePtrFromString(path)
  673. if err != nil {
  674. return
  675. }
  676. var _p1 *byte
  677. _p1, err = BytePtrFromString(attr)
  678. if err != nil {
  679. return
  680. }
  681. var _p2 unsafe.Pointer
  682. if len(dest) > 0 {
  683. _p2 = unsafe.Pointer(&dest[0])
  684. } else {
  685. _p2 = unsafe.Pointer(&_zero)
  686. }
  687. r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  688. sz = int(r0)
  689. if e1 != 0 {
  690. err = errnoErr(e1)
  691. }
  692. return
  693. }
  694. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  695. func Listxattr(path string, dest []byte) (sz int, err error) {
  696. var _p0 *byte
  697. _p0, err = BytePtrFromString(path)
  698. if err != nil {
  699. return
  700. }
  701. var _p1 unsafe.Pointer
  702. if len(dest) > 0 {
  703. _p1 = unsafe.Pointer(&dest[0])
  704. } else {
  705. _p1 = unsafe.Pointer(&_zero)
  706. }
  707. r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  708. sz = int(r0)
  709. if e1 != 0 {
  710. err = errnoErr(e1)
  711. }
  712. return
  713. }
  714. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  715. func Llistxattr(path string, dest []byte) (sz int, err error) {
  716. var _p0 *byte
  717. _p0, err = BytePtrFromString(path)
  718. if err != nil {
  719. return
  720. }
  721. var _p1 unsafe.Pointer
  722. if len(dest) > 0 {
  723. _p1 = unsafe.Pointer(&dest[0])
  724. } else {
  725. _p1 = unsafe.Pointer(&_zero)
  726. }
  727. r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  728. sz = int(r0)
  729. if e1 != 0 {
  730. err = errnoErr(e1)
  731. }
  732. return
  733. }
  734. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  735. func Lremovexattr(path string, attr string) (err error) {
  736. var _p0 *byte
  737. _p0, err = BytePtrFromString(path)
  738. if err != nil {
  739. return
  740. }
  741. var _p1 *byte
  742. _p1, err = BytePtrFromString(attr)
  743. if err != nil {
  744. return
  745. }
  746. _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  747. if e1 != 0 {
  748. err = errnoErr(e1)
  749. }
  750. return
  751. }
  752. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  753. func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
  754. var _p0 *byte
  755. _p0, err = BytePtrFromString(path)
  756. if err != nil {
  757. return
  758. }
  759. var _p1 *byte
  760. _p1, err = BytePtrFromString(attr)
  761. if err != nil {
  762. return
  763. }
  764. var _p2 unsafe.Pointer
  765. if len(data) > 0 {
  766. _p2 = unsafe.Pointer(&data[0])
  767. } else {
  768. _p2 = unsafe.Pointer(&_zero)
  769. }
  770. _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  771. if e1 != 0 {
  772. err = errnoErr(e1)
  773. }
  774. return
  775. }
  776. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  777. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  778. var _p0 *byte
  779. _p0, err = BytePtrFromString(path)
  780. if err != nil {
  781. return
  782. }
  783. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  784. if e1 != 0 {
  785. err = errnoErr(e1)
  786. }
  787. return
  788. }
  789. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  790. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  791. var _p0 *byte
  792. _p0, err = BytePtrFromString(path)
  793. if err != nil {
  794. return
  795. }
  796. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  797. if e1 != 0 {
  798. err = errnoErr(e1)
  799. }
  800. return
  801. }
  802. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  803. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  804. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  805. if e1 != 0 {
  806. err = errnoErr(e1)
  807. }
  808. return
  809. }
  810. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  811. func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
  812. r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
  813. fd = int(r0)
  814. if e1 != 0 {
  815. err = errnoErr(e1)
  816. }
  817. return
  818. }
  819. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  820. func PivotRoot(newroot string, putold string) (err error) {
  821. var _p0 *byte
  822. _p0, err = BytePtrFromString(newroot)
  823. if err != nil {
  824. return
  825. }
  826. var _p1 *byte
  827. _p1, err = BytePtrFromString(putold)
  828. if err != nil {
  829. return
  830. }
  831. _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  832. if e1 != 0 {
  833. err = errnoErr(e1)
  834. }
  835. return
  836. }
  837. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  838. func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
  839. _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
  840. if e1 != 0 {
  841. err = errnoErr(e1)
  842. }
  843. return
  844. }
  845. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  846. func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
  847. _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  848. if e1 != 0 {
  849. err = errnoErr(e1)
  850. }
  851. return
  852. }
  853. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  854. func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  855. r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
  856. n = int(r0)
  857. if e1 != 0 {
  858. err = errnoErr(e1)
  859. }
  860. return
  861. }
  862. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  863. func read(fd int, p []byte) (n int, err error) {
  864. var _p0 unsafe.Pointer
  865. if len(p) > 0 {
  866. _p0 = unsafe.Pointer(&p[0])
  867. } else {
  868. _p0 = unsafe.Pointer(&_zero)
  869. }
  870. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  871. n = int(r0)
  872. if e1 != 0 {
  873. err = errnoErr(e1)
  874. }
  875. return
  876. }
  877. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  878. func Removexattr(path string, attr string) (err error) {
  879. var _p0 *byte
  880. _p0, err = BytePtrFromString(path)
  881. if err != nil {
  882. return
  883. }
  884. var _p1 *byte
  885. _p1, err = BytePtrFromString(attr)
  886. if err != nil {
  887. return
  888. }
  889. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  890. if e1 != 0 {
  891. err = errnoErr(e1)
  892. }
  893. return
  894. }
  895. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  896. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  897. var _p0 *byte
  898. _p0, err = BytePtrFromString(oldpath)
  899. if err != nil {
  900. return
  901. }
  902. var _p1 *byte
  903. _p1, err = BytePtrFromString(newpath)
  904. if err != nil {
  905. return
  906. }
  907. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  908. if e1 != 0 {
  909. err = errnoErr(e1)
  910. }
  911. return
  912. }
  913. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  914. func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
  915. var _p0 *byte
  916. _p0, err = BytePtrFromString(keyType)
  917. if err != nil {
  918. return
  919. }
  920. var _p1 *byte
  921. _p1, err = BytePtrFromString(description)
  922. if err != nil {
  923. return
  924. }
  925. var _p2 *byte
  926. _p2, err = BytePtrFromString(callback)
  927. if err != nil {
  928. return
  929. }
  930. r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
  931. id = int(r0)
  932. if e1 != 0 {
  933. err = errnoErr(e1)
  934. }
  935. return
  936. }
  937. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  938. func Setdomainname(p []byte) (err error) {
  939. var _p0 unsafe.Pointer
  940. if len(p) > 0 {
  941. _p0 = unsafe.Pointer(&p[0])
  942. } else {
  943. _p0 = unsafe.Pointer(&_zero)
  944. }
  945. _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
  946. if e1 != 0 {
  947. err = errnoErr(e1)
  948. }
  949. return
  950. }
  951. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  952. func Sethostname(p []byte) (err error) {
  953. var _p0 unsafe.Pointer
  954. if len(p) > 0 {
  955. _p0 = unsafe.Pointer(&p[0])
  956. } else {
  957. _p0 = unsafe.Pointer(&_zero)
  958. }
  959. _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
  960. if e1 != 0 {
  961. err = errnoErr(e1)
  962. }
  963. return
  964. }
  965. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  966. func Setpgid(pid int, pgid int) (err error) {
  967. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  968. if e1 != 0 {
  969. err = errnoErr(e1)
  970. }
  971. return
  972. }
  973. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  974. func Setsid() (pid int, err error) {
  975. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  976. pid = int(r0)
  977. if e1 != 0 {
  978. err = errnoErr(e1)
  979. }
  980. return
  981. }
  982. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  983. func Settimeofday(tv *Timeval) (err error) {
  984. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  985. if e1 != 0 {
  986. err = errnoErr(e1)
  987. }
  988. return
  989. }
  990. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  991. func Setns(fd int, nstype int) (err error) {
  992. _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
  993. if e1 != 0 {
  994. err = errnoErr(e1)
  995. }
  996. return
  997. }
  998. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  999. func Setpriority(which int, who int, prio int) (err error) {
  1000. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1001. if e1 != 0 {
  1002. err = errnoErr(e1)
  1003. }
  1004. return
  1005. }
  1006. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1007. func Setxattr(path string, attr string, data []byte, flags int) (err error) {
  1008. var _p0 *byte
  1009. _p0, err = BytePtrFromString(path)
  1010. if err != nil {
  1011. return
  1012. }
  1013. var _p1 *byte
  1014. _p1, err = BytePtrFromString(attr)
  1015. if err != nil {
  1016. return
  1017. }
  1018. var _p2 unsafe.Pointer
  1019. if len(data) > 0 {
  1020. _p2 = unsafe.Pointer(&data[0])
  1021. } else {
  1022. _p2 = unsafe.Pointer(&_zero)
  1023. }
  1024. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  1025. if e1 != 0 {
  1026. err = errnoErr(e1)
  1027. }
  1028. return
  1029. }
  1030. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1031. func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
  1032. var _p0 *byte
  1033. _p0, err = BytePtrFromString(path)
  1034. if err != nil {
  1035. return
  1036. }
  1037. _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
  1038. if e1 != 0 {
  1039. err = errnoErr(e1)
  1040. }
  1041. return
  1042. }
  1043. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1044. func Sync() {
  1045. SyscallNoError(SYS_SYNC, 0, 0, 0)
  1046. return
  1047. }
  1048. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1049. func Syncfs(fd int) (err error) {
  1050. _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
  1051. if e1 != 0 {
  1052. err = errnoErr(e1)
  1053. }
  1054. return
  1055. }
  1056. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1057. func Sysinfo(info *Sysinfo_t) (err error) {
  1058. _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
  1059. if e1 != 0 {
  1060. err = errnoErr(e1)
  1061. }
  1062. return
  1063. }
  1064. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1065. func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
  1066. r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  1067. n = int64(r0)
  1068. if e1 != 0 {
  1069. err = errnoErr(e1)
  1070. }
  1071. return
  1072. }
  1073. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1074. func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
  1075. _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
  1076. if e1 != 0 {
  1077. err = errnoErr(e1)
  1078. }
  1079. return
  1080. }
  1081. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1082. func Times(tms *Tms) (ticks uintptr, err error) {
  1083. r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
  1084. ticks = uintptr(r0)
  1085. if e1 != 0 {
  1086. err = errnoErr(e1)
  1087. }
  1088. return
  1089. }
  1090. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1091. func Umask(mask int) (oldmask int) {
  1092. r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
  1093. oldmask = int(r0)
  1094. return
  1095. }
  1096. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1097. func Uname(buf *Utsname) (err error) {
  1098. _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
  1099. if e1 != 0 {
  1100. err = errnoErr(e1)
  1101. }
  1102. return
  1103. }
  1104. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1105. func Unmount(target string, flags int) (err error) {
  1106. var _p0 *byte
  1107. _p0, err = BytePtrFromString(target)
  1108. if err != nil {
  1109. return
  1110. }
  1111. _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1112. if e1 != 0 {
  1113. err = errnoErr(e1)
  1114. }
  1115. return
  1116. }
  1117. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1118. func Unshare(flags int) (err error) {
  1119. _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
  1120. if e1 != 0 {
  1121. err = errnoErr(e1)
  1122. }
  1123. return
  1124. }
  1125. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1126. func write(fd int, p []byte) (n int, err error) {
  1127. var _p0 unsafe.Pointer
  1128. if len(p) > 0 {
  1129. _p0 = unsafe.Pointer(&p[0])
  1130. } else {
  1131. _p0 = unsafe.Pointer(&_zero)
  1132. }
  1133. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1134. n = int(r0)
  1135. if e1 != 0 {
  1136. err = errnoErr(e1)
  1137. }
  1138. return
  1139. }
  1140. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1141. func exitThread(code int) (err error) {
  1142. _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
  1143. if e1 != 0 {
  1144. err = errnoErr(e1)
  1145. }
  1146. return
  1147. }
  1148. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1149. func readlen(fd int, p *byte, np int) (n int, err error) {
  1150. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1151. n = int(r0)
  1152. if e1 != 0 {
  1153. err = errnoErr(e1)
  1154. }
  1155. return
  1156. }
  1157. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1158. func writelen(fd int, p *byte, np int) (n int, err error) {
  1159. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1160. n = int(r0)
  1161. if e1 != 0 {
  1162. err = errnoErr(e1)
  1163. }
  1164. return
  1165. }
  1166. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1167. func munmap(addr uintptr, length uintptr) (err error) {
  1168. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1169. if e1 != 0 {
  1170. err = errnoErr(e1)
  1171. }
  1172. return
  1173. }
  1174. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1175. func Madvise(b []byte, advice int) (err error) {
  1176. var _p0 unsafe.Pointer
  1177. if len(b) > 0 {
  1178. _p0 = unsafe.Pointer(&b[0])
  1179. } else {
  1180. _p0 = unsafe.Pointer(&_zero)
  1181. }
  1182. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
  1183. if e1 != 0 {
  1184. err = errnoErr(e1)
  1185. }
  1186. return
  1187. }
  1188. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1189. func Mprotect(b []byte, prot int) (err error) {
  1190. var _p0 unsafe.Pointer
  1191. if len(b) > 0 {
  1192. _p0 = unsafe.Pointer(&b[0])
  1193. } else {
  1194. _p0 = unsafe.Pointer(&_zero)
  1195. }
  1196. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  1197. if e1 != 0 {
  1198. err = errnoErr(e1)
  1199. }
  1200. return
  1201. }
  1202. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1203. func Mlock(b []byte) (err error) {
  1204. var _p0 unsafe.Pointer
  1205. if len(b) > 0 {
  1206. _p0 = unsafe.Pointer(&b[0])
  1207. } else {
  1208. _p0 = unsafe.Pointer(&_zero)
  1209. }
  1210. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1211. if e1 != 0 {
  1212. err = errnoErr(e1)
  1213. }
  1214. return
  1215. }
  1216. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1217. func Mlockall(flags int) (err error) {
  1218. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  1219. if e1 != 0 {
  1220. err = errnoErr(e1)
  1221. }
  1222. return
  1223. }
  1224. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1225. func Msync(b []byte, flags int) (err error) {
  1226. var _p0 unsafe.Pointer
  1227. if len(b) > 0 {
  1228. _p0 = unsafe.Pointer(&b[0])
  1229. } else {
  1230. _p0 = unsafe.Pointer(&_zero)
  1231. }
  1232. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  1233. if e1 != 0 {
  1234. err = errnoErr(e1)
  1235. }
  1236. return
  1237. }
  1238. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1239. func Munlock(b []byte) (err error) {
  1240. var _p0 unsafe.Pointer
  1241. if len(b) > 0 {
  1242. _p0 = unsafe.Pointer(&b[0])
  1243. } else {
  1244. _p0 = unsafe.Pointer(&_zero)
  1245. }
  1246. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1247. if e1 != 0 {
  1248. err = errnoErr(e1)
  1249. }
  1250. return
  1251. }
  1252. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1253. func Munlockall() (err error) {
  1254. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  1255. if e1 != 0 {
  1256. err = errnoErr(e1)
  1257. }
  1258. return
  1259. }
  1260. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1261. func faccessat(dirfd int, path string, mode uint32) (err error) {
  1262. var _p0 *byte
  1263. _p0, err = BytePtrFromString(path)
  1264. if err != nil {
  1265. return
  1266. }
  1267. _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1268. if e1 != 0 {
  1269. err = errnoErr(e1)
  1270. }
  1271. return
  1272. }
  1273. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1274. func Dup2(oldfd int, newfd int) (err error) {
  1275. _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
  1276. if e1 != 0 {
  1277. err = errnoErr(e1)
  1278. }
  1279. return
  1280. }
  1281. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1282. func EpollCreate(size int) (fd int, err error) {
  1283. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
  1284. fd = int(r0)
  1285. if e1 != 0 {
  1286. err = errnoErr(e1)
  1287. }
  1288. return
  1289. }
  1290. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1291. func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1292. var _p0 unsafe.Pointer
  1293. if len(events) > 0 {
  1294. _p0 = unsafe.Pointer(&events[0])
  1295. } else {
  1296. _p0 = unsafe.Pointer(&_zero)
  1297. }
  1298. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1299. n = int(r0)
  1300. if e1 != 0 {
  1301. err = errnoErr(e1)
  1302. }
  1303. return
  1304. }
  1305. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1306. func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  1307. _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
  1308. if e1 != 0 {
  1309. err = errnoErr(e1)
  1310. }
  1311. return
  1312. }
  1313. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1314. func Fchown(fd int, uid int, gid int) (err error) {
  1315. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  1316. if e1 != 0 {
  1317. err = errnoErr(e1)
  1318. }
  1319. return
  1320. }
  1321. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1322. func Fstat(fd int, stat *Stat_t) (err error) {
  1323. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1324. if e1 != 0 {
  1325. err = errnoErr(e1)
  1326. }
  1327. return
  1328. }
  1329. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1330. func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
  1331. var _p0 *byte
  1332. _p0, err = BytePtrFromString(path)
  1333. if err != nil {
  1334. return
  1335. }
  1336. _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  1337. if e1 != 0 {
  1338. err = errnoErr(e1)
  1339. }
  1340. return
  1341. }
  1342. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1343. func Fstatfs(fd int, buf *Statfs_t) (err error) {
  1344. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1345. if e1 != 0 {
  1346. err = errnoErr(e1)
  1347. }
  1348. return
  1349. }
  1350. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1351. func Ftruncate(fd int, length int64) (err error) {
  1352. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1353. if e1 != 0 {
  1354. err = errnoErr(e1)
  1355. }
  1356. return
  1357. }
  1358. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1359. func Getegid() (egid int) {
  1360. r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
  1361. egid = int(r0)
  1362. return
  1363. }
  1364. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1365. func Geteuid() (euid int) {
  1366. r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
  1367. euid = int(r0)
  1368. return
  1369. }
  1370. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1371. func Getgid() (gid int) {
  1372. r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
  1373. gid = int(r0)
  1374. return
  1375. }
  1376. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1377. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1378. _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1379. if e1 != 0 {
  1380. err = errnoErr(e1)
  1381. }
  1382. return
  1383. }
  1384. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1385. func Getuid() (uid int) {
  1386. r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
  1387. uid = int(r0)
  1388. return
  1389. }
  1390. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1391. func InotifyInit() (fd int, err error) {
  1392. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
  1393. fd = int(r0)
  1394. if e1 != 0 {
  1395. err = errnoErr(e1)
  1396. }
  1397. return
  1398. }
  1399. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1400. func Ioperm(from int, num int, on int) (err error) {
  1401. _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
  1402. if e1 != 0 {
  1403. err = errnoErr(e1)
  1404. }
  1405. return
  1406. }
  1407. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1408. func Iopl(level int) (err error) {
  1409. _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
  1410. if e1 != 0 {
  1411. err = errnoErr(e1)
  1412. }
  1413. return
  1414. }
  1415. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1416. func Lchown(path string, uid int, gid int) (err error) {
  1417. var _p0 *byte
  1418. _p0, err = BytePtrFromString(path)
  1419. if err != nil {
  1420. return
  1421. }
  1422. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1423. if e1 != 0 {
  1424. err = errnoErr(e1)
  1425. }
  1426. return
  1427. }
  1428. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1429. func Listen(s int, n int) (err error) {
  1430. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  1431. if e1 != 0 {
  1432. err = errnoErr(e1)
  1433. }
  1434. return
  1435. }
  1436. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1437. func Lstat(path string, stat *Stat_t) (err error) {
  1438. var _p0 *byte
  1439. _p0, err = BytePtrFromString(path)
  1440. if err != nil {
  1441. return
  1442. }
  1443. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1444. if e1 != 0 {
  1445. err = errnoErr(e1)
  1446. }
  1447. return
  1448. }
  1449. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1450. func Pause() (err error) {
  1451. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  1452. if e1 != 0 {
  1453. err = errnoErr(e1)
  1454. }
  1455. return
  1456. }
  1457. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1458. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1459. var _p0 unsafe.Pointer
  1460. if len(p) > 0 {
  1461. _p0 = unsafe.Pointer(&p[0])
  1462. } else {
  1463. _p0 = unsafe.Pointer(&_zero)
  1464. }
  1465. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1466. n = int(r0)
  1467. if e1 != 0 {
  1468. err = errnoErr(e1)
  1469. }
  1470. return
  1471. }
  1472. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1473. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1474. var _p0 unsafe.Pointer
  1475. if len(p) > 0 {
  1476. _p0 = unsafe.Pointer(&p[0])
  1477. } else {
  1478. _p0 = unsafe.Pointer(&_zero)
  1479. }
  1480. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1481. n = int(r0)
  1482. if e1 != 0 {
  1483. err = errnoErr(e1)
  1484. }
  1485. return
  1486. }
  1487. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1488. func Seek(fd int, offset int64, whence int) (off int64, err error) {
  1489. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1490. off = int64(r0)
  1491. if e1 != 0 {
  1492. err = errnoErr(e1)
  1493. }
  1494. return
  1495. }
  1496. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1497. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1498. r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1499. n = int(r0)
  1500. if e1 != 0 {
  1501. err = errnoErr(e1)
  1502. }
  1503. return
  1504. }
  1505. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1506. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1507. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1508. written = int(r0)
  1509. if e1 != 0 {
  1510. err = errnoErr(e1)
  1511. }
  1512. return
  1513. }
  1514. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1515. func Setfsgid(gid int) (err error) {
  1516. _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  1517. if e1 != 0 {
  1518. err = errnoErr(e1)
  1519. }
  1520. return
  1521. }
  1522. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1523. func Setfsuid(uid int) (err error) {
  1524. _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  1525. if e1 != 0 {
  1526. err = errnoErr(e1)
  1527. }
  1528. return
  1529. }
  1530. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1531. func Setregid(rgid int, egid int) (err error) {
  1532. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1533. if e1 != 0 {
  1534. err = errnoErr(e1)
  1535. }
  1536. return
  1537. }
  1538. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1539. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1540. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1541. if e1 != 0 {
  1542. err = errnoErr(e1)
  1543. }
  1544. return
  1545. }
  1546. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1547. func Setresuid(ruid int, euid int, suid int) (err error) {
  1548. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1549. if e1 != 0 {
  1550. err = errnoErr(e1)
  1551. }
  1552. return
  1553. }
  1554. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1555. func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1556. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1557. if e1 != 0 {
  1558. err = errnoErr(e1)
  1559. }
  1560. return
  1561. }
  1562. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1563. func Setreuid(ruid int, euid int) (err error) {
  1564. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1565. if e1 != 0 {
  1566. err = errnoErr(e1)
  1567. }
  1568. return
  1569. }
  1570. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1571. func Shutdown(fd int, how int) (err error) {
  1572. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  1573. if e1 != 0 {
  1574. err = errnoErr(e1)
  1575. }
  1576. return
  1577. }
  1578. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1579. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1580. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1581. n = int64(r0)
  1582. if e1 != 0 {
  1583. err = errnoErr(e1)
  1584. }
  1585. return
  1586. }
  1587. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1588. func Stat(path string, stat *Stat_t) (err error) {
  1589. var _p0 *byte
  1590. _p0, err = BytePtrFromString(path)
  1591. if err != nil {
  1592. return
  1593. }
  1594. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1595. if e1 != 0 {
  1596. err = errnoErr(e1)
  1597. }
  1598. return
  1599. }
  1600. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1601. func Statfs(path string, buf *Statfs_t) (err error) {
  1602. var _p0 *byte
  1603. _p0, err = BytePtrFromString(path)
  1604. if err != nil {
  1605. return
  1606. }
  1607. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1608. if e1 != 0 {
  1609. err = errnoErr(e1)
  1610. }
  1611. return
  1612. }
  1613. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1614. func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1615. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
  1616. if e1 != 0 {
  1617. err = errnoErr(e1)
  1618. }
  1619. return
  1620. }
  1621. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1622. func Truncate(path string, length int64) (err error) {
  1623. var _p0 *byte
  1624. _p0, err = BytePtrFromString(path)
  1625. if err != nil {
  1626. return
  1627. }
  1628. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1629. if e1 != 0 {
  1630. err = errnoErr(e1)
  1631. }
  1632. return
  1633. }
  1634. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1635. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  1636. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
  1637. if e1 != 0 {
  1638. err = errnoErr(e1)
  1639. }
  1640. return
  1641. }
  1642. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1643. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1644. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1645. fd = int(r0)
  1646. if e1 != 0 {
  1647. err = errnoErr(e1)
  1648. }
  1649. return
  1650. }
  1651. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1652. func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1653. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1654. fd = int(r0)
  1655. if e1 != 0 {
  1656. err = errnoErr(e1)
  1657. }
  1658. return
  1659. }
  1660. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1661. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1662. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  1663. if e1 != 0 {
  1664. err = errnoErr(e1)
  1665. }
  1666. return
  1667. }
  1668. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1669. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1670. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1671. if e1 != 0 {
  1672. err = errnoErr(e1)
  1673. }
  1674. return
  1675. }
  1676. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1677. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1678. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1679. nn = int(r0)
  1680. if e1 != 0 {
  1681. err = errnoErr(e1)
  1682. }
  1683. return
  1684. }
  1685. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1686. func setgroups(n int, list *_Gid_t) (err error) {
  1687. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1688. if e1 != 0 {
  1689. err = errnoErr(e1)
  1690. }
  1691. return
  1692. }
  1693. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1694. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1695. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1696. if e1 != 0 {
  1697. err = errnoErr(e1)
  1698. }
  1699. return
  1700. }
  1701. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1702. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1703. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1704. if e1 != 0 {
  1705. err = errnoErr(e1)
  1706. }
  1707. return
  1708. }
  1709. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1710. func socket(domain int, typ int, proto int) (fd int, err error) {
  1711. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  1712. fd = int(r0)
  1713. if e1 != 0 {
  1714. err = errnoErr(e1)
  1715. }
  1716. return
  1717. }
  1718. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1719. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1720. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1721. if e1 != 0 {
  1722. err = errnoErr(e1)
  1723. }
  1724. return
  1725. }
  1726. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1727. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1728. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1729. if e1 != 0 {
  1730. err = errnoErr(e1)
  1731. }
  1732. return
  1733. }
  1734. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1735. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1736. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1737. if e1 != 0 {
  1738. err = errnoErr(e1)
  1739. }
  1740. return
  1741. }
  1742. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1743. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1744. var _p0 unsafe.Pointer
  1745. if len(p) > 0 {
  1746. _p0 = unsafe.Pointer(&p[0])
  1747. } else {
  1748. _p0 = unsafe.Pointer(&_zero)
  1749. }
  1750. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1751. n = int(r0)
  1752. if e1 != 0 {
  1753. err = errnoErr(e1)
  1754. }
  1755. return
  1756. }
  1757. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1758. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1759. var _p0 unsafe.Pointer
  1760. if len(buf) > 0 {
  1761. _p0 = unsafe.Pointer(&buf[0])
  1762. } else {
  1763. _p0 = unsafe.Pointer(&_zero)
  1764. }
  1765. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1766. if e1 != 0 {
  1767. err = errnoErr(e1)
  1768. }
  1769. return
  1770. }
  1771. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1772. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1773. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1774. n = int(r0)
  1775. if e1 != 0 {
  1776. err = errnoErr(e1)
  1777. }
  1778. return
  1779. }
  1780. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1781. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1782. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1783. n = int(r0)
  1784. if e1 != 0 {
  1785. err = errnoErr(e1)
  1786. }
  1787. return
  1788. }
  1789. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1790. func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  1791. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  1792. xaddr = uintptr(r0)
  1793. if e1 != 0 {
  1794. err = errnoErr(e1)
  1795. }
  1796. return
  1797. }
  1798. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1799. func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  1800. var _p0 *byte
  1801. _p0, err = BytePtrFromString(path)
  1802. if err != nil {
  1803. return
  1804. }
  1805. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  1806. if e1 != 0 {
  1807. err = errnoErr(e1)
  1808. }
  1809. return
  1810. }
  1811. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1812. func Gettimeofday(tv *Timeval) (err error) {
  1813. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1814. if e1 != 0 {
  1815. err = errnoErr(e1)
  1816. }
  1817. return
  1818. }
  1819. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1820. func Time(t *Time_t) (tt Time_t, err error) {
  1821. r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
  1822. tt = Time_t(r0)
  1823. if e1 != 0 {
  1824. err = errnoErr(e1)
  1825. }
  1826. return
  1827. }
  1828. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1829. func Utime(path string, buf *Utimbuf) (err error) {
  1830. var _p0 *byte
  1831. _p0, err = BytePtrFromString(path)
  1832. if err != nil {
  1833. return
  1834. }
  1835. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1836. if e1 != 0 {
  1837. err = errnoErr(e1)
  1838. }
  1839. return
  1840. }
  1841. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1842. func utimes(path string, times *[2]Timeval) (err error) {
  1843. var _p0 *byte
  1844. _p0, err = BytePtrFromString(path)
  1845. if err != nil {
  1846. return
  1847. }
  1848. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  1849. if e1 != 0 {
  1850. err = errnoErr(e1)
  1851. }
  1852. return
  1853. }
  1854. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1855. func pipe(p *[2]_C_int) (err error) {
  1856. _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
  1857. if e1 != 0 {
  1858. err = errnoErr(e1)
  1859. }
  1860. return
  1861. }
  1862. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1863. func pipe2(p *[2]_C_int, flags int) (err error) {
  1864. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  1865. if e1 != 0 {
  1866. err = errnoErr(e1)
  1867. }
  1868. return
  1869. }
  1870. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1871. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  1872. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  1873. n = int(r0)
  1874. if e1 != 0 {
  1875. err = errnoErr(e1)
  1876. }
  1877. return
  1878. }