zsyscall_linux_mips64le.go 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350
  1. // go run mksyscall.go -tags linux,mips64le syscall_linux.go syscall_linux_mips64x.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build linux,mips64le
  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 ClockGetres(clockid int32, res *Timespec) (err error) {
  365. _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 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 ClockGettime(clockid int32, time *Timespec) (err error) {
  373. _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 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 ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
  381. _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
  382. if e1 != 0 {
  383. err = errnoErr(e1)
  384. }
  385. return
  386. }
  387. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  388. func Close(fd int) (err error) {
  389. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  390. if e1 != 0 {
  391. err = errnoErr(e1)
  392. }
  393. return
  394. }
  395. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  396. func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  397. r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  398. n = int(r0)
  399. if e1 != 0 {
  400. err = errnoErr(e1)
  401. }
  402. return
  403. }
  404. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  405. func DeleteModule(name string, flags int) (err error) {
  406. var _p0 *byte
  407. _p0, err = BytePtrFromString(name)
  408. if err != nil {
  409. return
  410. }
  411. _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  412. if e1 != 0 {
  413. err = errnoErr(e1)
  414. }
  415. return
  416. }
  417. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  418. func Dup(oldfd int) (fd int, err error) {
  419. r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
  420. fd = int(r0)
  421. if e1 != 0 {
  422. err = errnoErr(e1)
  423. }
  424. return
  425. }
  426. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  427. func Dup3(oldfd int, newfd int, flags int) (err error) {
  428. _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
  429. if e1 != 0 {
  430. err = errnoErr(e1)
  431. }
  432. return
  433. }
  434. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  435. func EpollCreate1(flag int) (fd int, err error) {
  436. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
  437. fd = int(r0)
  438. if e1 != 0 {
  439. err = errnoErr(e1)
  440. }
  441. return
  442. }
  443. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  444. func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
  445. _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
  446. if e1 != 0 {
  447. err = errnoErr(e1)
  448. }
  449. return
  450. }
  451. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  452. func Eventfd(initval uint, flags int) (fd int, err error) {
  453. r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
  454. fd = int(r0)
  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 Exit(code int) {
  462. SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
  463. return
  464. }
  465. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  466. func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
  467. _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 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 Fchdir(fd int) (err error) {
  475. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  476. if e1 != 0 {
  477. err = errnoErr(e1)
  478. }
  479. return
  480. }
  481. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  482. func Fchmod(fd int, mode uint32) (err error) {
  483. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  484. if e1 != 0 {
  485. err = errnoErr(e1)
  486. }
  487. return
  488. }
  489. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  490. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  491. var _p0 *byte
  492. _p0, err = BytePtrFromString(path)
  493. if err != nil {
  494. return
  495. }
  496. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  497. if e1 != 0 {
  498. err = errnoErr(e1)
  499. }
  500. return
  501. }
  502. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  503. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  504. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  505. val = int(r0)
  506. if e1 != 0 {
  507. err = errnoErr(e1)
  508. }
  509. return
  510. }
  511. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  512. func Fdatasync(fd int) (err error) {
  513. _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
  514. if e1 != 0 {
  515. err = errnoErr(e1)
  516. }
  517. return
  518. }
  519. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  520. func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
  521. var _p0 *byte
  522. _p0, err = BytePtrFromString(attr)
  523. if err != nil {
  524. return
  525. }
  526. var _p1 unsafe.Pointer
  527. if len(dest) > 0 {
  528. _p1 = unsafe.Pointer(&dest[0])
  529. } else {
  530. _p1 = unsafe.Pointer(&_zero)
  531. }
  532. r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
  533. sz = int(r0)
  534. if e1 != 0 {
  535. err = errnoErr(e1)
  536. }
  537. return
  538. }
  539. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  540. func FinitModule(fd int, params string, flags int) (err error) {
  541. var _p0 *byte
  542. _p0, err = BytePtrFromString(params)
  543. if err != nil {
  544. return
  545. }
  546. _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  547. if e1 != 0 {
  548. err = errnoErr(e1)
  549. }
  550. return
  551. }
  552. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  553. func Flistxattr(fd int, dest []byte) (sz int, err error) {
  554. var _p0 unsafe.Pointer
  555. if len(dest) > 0 {
  556. _p0 = unsafe.Pointer(&dest[0])
  557. } else {
  558. _p0 = unsafe.Pointer(&_zero)
  559. }
  560. r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
  561. sz = int(r0)
  562. if e1 != 0 {
  563. err = errnoErr(e1)
  564. }
  565. return
  566. }
  567. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  568. func Flock(fd int, how int) (err error) {
  569. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  570. if e1 != 0 {
  571. err = errnoErr(e1)
  572. }
  573. return
  574. }
  575. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  576. func Fremovexattr(fd int, attr string) (err error) {
  577. var _p0 *byte
  578. _p0, err = BytePtrFromString(attr)
  579. if err != nil {
  580. return
  581. }
  582. _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
  583. if e1 != 0 {
  584. err = errnoErr(e1)
  585. }
  586. return
  587. }
  588. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  589. func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
  590. var _p0 *byte
  591. _p0, err = BytePtrFromString(attr)
  592. if err != nil {
  593. return
  594. }
  595. var _p1 unsafe.Pointer
  596. if len(dest) > 0 {
  597. _p1 = unsafe.Pointer(&dest[0])
  598. } else {
  599. _p1 = unsafe.Pointer(&_zero)
  600. }
  601. _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
  602. if e1 != 0 {
  603. err = errnoErr(e1)
  604. }
  605. return
  606. }
  607. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  608. func Fsync(fd int) (err error) {
  609. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  610. if e1 != 0 {
  611. err = errnoErr(e1)
  612. }
  613. return
  614. }
  615. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  616. func Getdents(fd int, buf []byte) (n int, err error) {
  617. var _p0 unsafe.Pointer
  618. if len(buf) > 0 {
  619. _p0 = unsafe.Pointer(&buf[0])
  620. } else {
  621. _p0 = unsafe.Pointer(&_zero)
  622. }
  623. r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  624. n = int(r0)
  625. if e1 != 0 {
  626. err = errnoErr(e1)
  627. }
  628. return
  629. }
  630. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  631. func Getpgid(pid int) (pgid int, err error) {
  632. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  633. pgid = int(r0)
  634. if e1 != 0 {
  635. err = errnoErr(e1)
  636. }
  637. return
  638. }
  639. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  640. func Getpid() (pid int) {
  641. r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
  642. pid = int(r0)
  643. return
  644. }
  645. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  646. func Getppid() (ppid int) {
  647. r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
  648. ppid = int(r0)
  649. return
  650. }
  651. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  652. func Getpriority(which int, who int) (prio int, err error) {
  653. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  654. prio = int(r0)
  655. if e1 != 0 {
  656. err = errnoErr(e1)
  657. }
  658. return
  659. }
  660. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  661. func Getrandom(buf []byte, flags int) (n int, err error) {
  662. var _p0 unsafe.Pointer
  663. if len(buf) > 0 {
  664. _p0 = unsafe.Pointer(&buf[0])
  665. } else {
  666. _p0 = unsafe.Pointer(&_zero)
  667. }
  668. r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
  669. n = int(r0)
  670. if e1 != 0 {
  671. err = errnoErr(e1)
  672. }
  673. return
  674. }
  675. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  676. func Getrusage(who int, rusage *Rusage) (err error) {
  677. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  678. if e1 != 0 {
  679. err = errnoErr(e1)
  680. }
  681. return
  682. }
  683. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  684. func Getsid(pid int) (sid int, err error) {
  685. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  686. sid = int(r0)
  687. if e1 != 0 {
  688. err = errnoErr(e1)
  689. }
  690. return
  691. }
  692. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  693. func Gettid() (tid int) {
  694. r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
  695. tid = int(r0)
  696. return
  697. }
  698. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  699. func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
  700. var _p0 *byte
  701. _p0, err = BytePtrFromString(path)
  702. if err != nil {
  703. return
  704. }
  705. var _p1 *byte
  706. _p1, err = BytePtrFromString(attr)
  707. if err != nil {
  708. return
  709. }
  710. var _p2 unsafe.Pointer
  711. if len(dest) > 0 {
  712. _p2 = unsafe.Pointer(&dest[0])
  713. } else {
  714. _p2 = unsafe.Pointer(&_zero)
  715. }
  716. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  717. sz = int(r0)
  718. if e1 != 0 {
  719. err = errnoErr(e1)
  720. }
  721. return
  722. }
  723. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  724. func InitModule(moduleImage []byte, params string) (err error) {
  725. var _p0 unsafe.Pointer
  726. if len(moduleImage) > 0 {
  727. _p0 = unsafe.Pointer(&moduleImage[0])
  728. } else {
  729. _p0 = unsafe.Pointer(&_zero)
  730. }
  731. var _p1 *byte
  732. _p1, err = BytePtrFromString(params)
  733. if err != nil {
  734. return
  735. }
  736. _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
  737. if e1 != 0 {
  738. err = errnoErr(e1)
  739. }
  740. return
  741. }
  742. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  743. func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
  744. var _p0 *byte
  745. _p0, err = BytePtrFromString(pathname)
  746. if err != nil {
  747. return
  748. }
  749. r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
  750. watchdesc = int(r0)
  751. if e1 != 0 {
  752. err = errnoErr(e1)
  753. }
  754. return
  755. }
  756. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  757. func InotifyInit1(flags int) (fd int, err error) {
  758. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
  759. fd = int(r0)
  760. if e1 != 0 {
  761. err = errnoErr(e1)
  762. }
  763. return
  764. }
  765. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  766. func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
  767. r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
  768. success = int(r0)
  769. if e1 != 0 {
  770. err = errnoErr(e1)
  771. }
  772. return
  773. }
  774. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  775. func Kill(pid int, sig syscall.Signal) (err error) {
  776. _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
  777. if e1 != 0 {
  778. err = errnoErr(e1)
  779. }
  780. return
  781. }
  782. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  783. func Klogctl(typ int, buf []byte) (n int, err error) {
  784. var _p0 unsafe.Pointer
  785. if len(buf) > 0 {
  786. _p0 = unsafe.Pointer(&buf[0])
  787. } else {
  788. _p0 = unsafe.Pointer(&_zero)
  789. }
  790. r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
  791. n = int(r0)
  792. if e1 != 0 {
  793. err = errnoErr(e1)
  794. }
  795. return
  796. }
  797. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  798. func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
  799. var _p0 *byte
  800. _p0, err = BytePtrFromString(path)
  801. if err != nil {
  802. return
  803. }
  804. var _p1 *byte
  805. _p1, err = BytePtrFromString(attr)
  806. if err != nil {
  807. return
  808. }
  809. var _p2 unsafe.Pointer
  810. if len(dest) > 0 {
  811. _p2 = unsafe.Pointer(&dest[0])
  812. } else {
  813. _p2 = unsafe.Pointer(&_zero)
  814. }
  815. r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  816. sz = int(r0)
  817. if e1 != 0 {
  818. err = errnoErr(e1)
  819. }
  820. return
  821. }
  822. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  823. func Listxattr(path string, dest []byte) (sz int, err error) {
  824. var _p0 *byte
  825. _p0, err = BytePtrFromString(path)
  826. if err != nil {
  827. return
  828. }
  829. var _p1 unsafe.Pointer
  830. if len(dest) > 0 {
  831. _p1 = unsafe.Pointer(&dest[0])
  832. } else {
  833. _p1 = unsafe.Pointer(&_zero)
  834. }
  835. r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  836. sz = int(r0)
  837. if e1 != 0 {
  838. err = errnoErr(e1)
  839. }
  840. return
  841. }
  842. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  843. func Llistxattr(path string, dest []byte) (sz int, err error) {
  844. var _p0 *byte
  845. _p0, err = BytePtrFromString(path)
  846. if err != nil {
  847. return
  848. }
  849. var _p1 unsafe.Pointer
  850. if len(dest) > 0 {
  851. _p1 = unsafe.Pointer(&dest[0])
  852. } else {
  853. _p1 = unsafe.Pointer(&_zero)
  854. }
  855. r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  856. sz = 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 Lremovexattr(path string, attr string) (err error) {
  864. var _p0 *byte
  865. _p0, err = BytePtrFromString(path)
  866. if err != nil {
  867. return
  868. }
  869. var _p1 *byte
  870. _p1, err = BytePtrFromString(attr)
  871. if err != nil {
  872. return
  873. }
  874. _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  875. if e1 != 0 {
  876. err = errnoErr(e1)
  877. }
  878. return
  879. }
  880. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  881. func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
  882. var _p0 *byte
  883. _p0, err = BytePtrFromString(path)
  884. if err != nil {
  885. return
  886. }
  887. var _p1 *byte
  888. _p1, err = BytePtrFromString(attr)
  889. if err != nil {
  890. return
  891. }
  892. var _p2 unsafe.Pointer
  893. if len(data) > 0 {
  894. _p2 = unsafe.Pointer(&data[0])
  895. } else {
  896. _p2 = unsafe.Pointer(&_zero)
  897. }
  898. _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  899. if e1 != 0 {
  900. err = errnoErr(e1)
  901. }
  902. return
  903. }
  904. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  905. func MemfdCreate(name string, flags int) (fd int, err error) {
  906. var _p0 *byte
  907. _p0, err = BytePtrFromString(name)
  908. if err != nil {
  909. return
  910. }
  911. r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  912. fd = int(r0)
  913. if e1 != 0 {
  914. err = errnoErr(e1)
  915. }
  916. return
  917. }
  918. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  919. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  920. var _p0 *byte
  921. _p0, err = BytePtrFromString(path)
  922. if err != nil {
  923. return
  924. }
  925. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  926. if e1 != 0 {
  927. err = errnoErr(e1)
  928. }
  929. return
  930. }
  931. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  932. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  933. var _p0 *byte
  934. _p0, err = BytePtrFromString(path)
  935. if err != nil {
  936. return
  937. }
  938. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  939. if e1 != 0 {
  940. err = errnoErr(e1)
  941. }
  942. return
  943. }
  944. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  945. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  946. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  947. if e1 != 0 {
  948. err = errnoErr(e1)
  949. }
  950. return
  951. }
  952. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  953. func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
  954. r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
  955. fd = int(r0)
  956. if e1 != 0 {
  957. err = errnoErr(e1)
  958. }
  959. return
  960. }
  961. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  962. func PivotRoot(newroot string, putold string) (err error) {
  963. var _p0 *byte
  964. _p0, err = BytePtrFromString(newroot)
  965. if err != nil {
  966. return
  967. }
  968. var _p1 *byte
  969. _p1, err = BytePtrFromString(putold)
  970. if err != nil {
  971. return
  972. }
  973. _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  974. if e1 != 0 {
  975. err = errnoErr(e1)
  976. }
  977. return
  978. }
  979. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  980. func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
  981. _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
  982. if e1 != 0 {
  983. err = errnoErr(e1)
  984. }
  985. return
  986. }
  987. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  988. func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
  989. _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  990. if e1 != 0 {
  991. err = errnoErr(e1)
  992. }
  993. return
  994. }
  995. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  996. func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  997. 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)))
  998. n = int(r0)
  999. if e1 != 0 {
  1000. err = errnoErr(e1)
  1001. }
  1002. return
  1003. }
  1004. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1005. func read(fd int, p []byte) (n int, err error) {
  1006. var _p0 unsafe.Pointer
  1007. if len(p) > 0 {
  1008. _p0 = unsafe.Pointer(&p[0])
  1009. } else {
  1010. _p0 = unsafe.Pointer(&_zero)
  1011. }
  1012. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1013. n = int(r0)
  1014. if e1 != 0 {
  1015. err = errnoErr(e1)
  1016. }
  1017. return
  1018. }
  1019. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1020. func Removexattr(path string, attr string) (err error) {
  1021. var _p0 *byte
  1022. _p0, err = BytePtrFromString(path)
  1023. if err != nil {
  1024. return
  1025. }
  1026. var _p1 *byte
  1027. _p1, err = BytePtrFromString(attr)
  1028. if err != nil {
  1029. return
  1030. }
  1031. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1032. if e1 != 0 {
  1033. err = errnoErr(e1)
  1034. }
  1035. return
  1036. }
  1037. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1038. func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
  1039. var _p0 *byte
  1040. _p0, err = BytePtrFromString(oldpath)
  1041. if err != nil {
  1042. return
  1043. }
  1044. var _p1 *byte
  1045. _p1, err = BytePtrFromString(newpath)
  1046. if err != nil {
  1047. return
  1048. }
  1049. _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  1050. if e1 != 0 {
  1051. err = errnoErr(e1)
  1052. }
  1053. return
  1054. }
  1055. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1056. func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
  1057. var _p0 *byte
  1058. _p0, err = BytePtrFromString(keyType)
  1059. if err != nil {
  1060. return
  1061. }
  1062. var _p1 *byte
  1063. _p1, err = BytePtrFromString(description)
  1064. if err != nil {
  1065. return
  1066. }
  1067. var _p2 *byte
  1068. _p2, err = BytePtrFromString(callback)
  1069. if err != nil {
  1070. return
  1071. }
  1072. r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
  1073. id = int(r0)
  1074. if e1 != 0 {
  1075. err = errnoErr(e1)
  1076. }
  1077. return
  1078. }
  1079. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1080. func Setdomainname(p []byte) (err error) {
  1081. var _p0 unsafe.Pointer
  1082. if len(p) > 0 {
  1083. _p0 = unsafe.Pointer(&p[0])
  1084. } else {
  1085. _p0 = unsafe.Pointer(&_zero)
  1086. }
  1087. _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
  1088. if e1 != 0 {
  1089. err = errnoErr(e1)
  1090. }
  1091. return
  1092. }
  1093. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1094. func Sethostname(p []byte) (err error) {
  1095. var _p0 unsafe.Pointer
  1096. if len(p) > 0 {
  1097. _p0 = unsafe.Pointer(&p[0])
  1098. } else {
  1099. _p0 = unsafe.Pointer(&_zero)
  1100. }
  1101. _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
  1102. if e1 != 0 {
  1103. err = errnoErr(e1)
  1104. }
  1105. return
  1106. }
  1107. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1108. func Setpgid(pid int, pgid int) (err error) {
  1109. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1110. if e1 != 0 {
  1111. err = errnoErr(e1)
  1112. }
  1113. return
  1114. }
  1115. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1116. func Setsid() (pid int, err error) {
  1117. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1118. pid = int(r0)
  1119. if e1 != 0 {
  1120. err = errnoErr(e1)
  1121. }
  1122. return
  1123. }
  1124. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1125. func Settimeofday(tv *Timeval) (err error) {
  1126. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1127. if e1 != 0 {
  1128. err = errnoErr(e1)
  1129. }
  1130. return
  1131. }
  1132. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1133. func Setns(fd int, nstype int) (err error) {
  1134. _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
  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 Setpriority(which int, who int, prio int) (err error) {
  1142. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  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 Setxattr(path string, attr string, data []byte, flags int) (err error) {
  1150. var _p0 *byte
  1151. _p0, err = BytePtrFromString(path)
  1152. if err != nil {
  1153. return
  1154. }
  1155. var _p1 *byte
  1156. _p1, err = BytePtrFromString(attr)
  1157. if err != nil {
  1158. return
  1159. }
  1160. var _p2 unsafe.Pointer
  1161. if len(data) > 0 {
  1162. _p2 = unsafe.Pointer(&data[0])
  1163. } else {
  1164. _p2 = unsafe.Pointer(&_zero)
  1165. }
  1166. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  1167. if e1 != 0 {
  1168. err = errnoErr(e1)
  1169. }
  1170. return
  1171. }
  1172. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1173. func Signalfd(fd int, mask *Sigset_t, flags int) {
  1174. SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
  1175. return
  1176. }
  1177. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1178. func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
  1179. var _p0 *byte
  1180. _p0, err = BytePtrFromString(path)
  1181. if err != nil {
  1182. return
  1183. }
  1184. _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
  1185. if e1 != 0 {
  1186. err = errnoErr(e1)
  1187. }
  1188. return
  1189. }
  1190. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1191. func Sync() {
  1192. SyscallNoError(SYS_SYNC, 0, 0, 0)
  1193. return
  1194. }
  1195. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1196. func Syncfs(fd int) (err error) {
  1197. _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
  1198. if e1 != 0 {
  1199. err = errnoErr(e1)
  1200. }
  1201. return
  1202. }
  1203. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1204. func Sysinfo(info *Sysinfo_t) (err error) {
  1205. _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
  1206. if e1 != 0 {
  1207. err = errnoErr(e1)
  1208. }
  1209. return
  1210. }
  1211. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1212. func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
  1213. r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  1214. n = int64(r0)
  1215. if e1 != 0 {
  1216. err = errnoErr(e1)
  1217. }
  1218. return
  1219. }
  1220. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1221. func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
  1222. _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
  1223. if e1 != 0 {
  1224. err = errnoErr(e1)
  1225. }
  1226. return
  1227. }
  1228. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1229. func Times(tms *Tms) (ticks uintptr, err error) {
  1230. r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
  1231. ticks = uintptr(r0)
  1232. if e1 != 0 {
  1233. err = errnoErr(e1)
  1234. }
  1235. return
  1236. }
  1237. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1238. func Umask(mask int) (oldmask int) {
  1239. r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
  1240. oldmask = int(r0)
  1241. return
  1242. }
  1243. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1244. func Uname(buf *Utsname) (err error) {
  1245. _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
  1246. if e1 != 0 {
  1247. err = errnoErr(e1)
  1248. }
  1249. return
  1250. }
  1251. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1252. func Unmount(target string, flags int) (err error) {
  1253. var _p0 *byte
  1254. _p0, err = BytePtrFromString(target)
  1255. if err != nil {
  1256. return
  1257. }
  1258. _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1259. if e1 != 0 {
  1260. err = errnoErr(e1)
  1261. }
  1262. return
  1263. }
  1264. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1265. func Unshare(flags int) (err error) {
  1266. _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
  1267. if e1 != 0 {
  1268. err = errnoErr(e1)
  1269. }
  1270. return
  1271. }
  1272. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1273. func write(fd int, p []byte) (n int, err error) {
  1274. var _p0 unsafe.Pointer
  1275. if len(p) > 0 {
  1276. _p0 = unsafe.Pointer(&p[0])
  1277. } else {
  1278. _p0 = unsafe.Pointer(&_zero)
  1279. }
  1280. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1281. n = int(r0)
  1282. if e1 != 0 {
  1283. err = errnoErr(e1)
  1284. }
  1285. return
  1286. }
  1287. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1288. func exitThread(code int) (err error) {
  1289. _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
  1290. if e1 != 0 {
  1291. err = errnoErr(e1)
  1292. }
  1293. return
  1294. }
  1295. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1296. func readlen(fd int, p *byte, np int) (n int, err error) {
  1297. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1298. n = int(r0)
  1299. if e1 != 0 {
  1300. err = errnoErr(e1)
  1301. }
  1302. return
  1303. }
  1304. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1305. func writelen(fd int, p *byte, np int) (n int, err error) {
  1306. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1307. n = int(r0)
  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 munmap(addr uintptr, length uintptr) (err error) {
  1315. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  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 Madvise(b []byte, advice int) (err error) {
  1323. var _p0 unsafe.Pointer
  1324. if len(b) > 0 {
  1325. _p0 = unsafe.Pointer(&b[0])
  1326. } else {
  1327. _p0 = unsafe.Pointer(&_zero)
  1328. }
  1329. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
  1330. if e1 != 0 {
  1331. err = errnoErr(e1)
  1332. }
  1333. return
  1334. }
  1335. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1336. func Mprotect(b []byte, prot int) (err error) {
  1337. var _p0 unsafe.Pointer
  1338. if len(b) > 0 {
  1339. _p0 = unsafe.Pointer(&b[0])
  1340. } else {
  1341. _p0 = unsafe.Pointer(&_zero)
  1342. }
  1343. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  1344. if e1 != 0 {
  1345. err = errnoErr(e1)
  1346. }
  1347. return
  1348. }
  1349. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1350. func Mlock(b []byte) (err error) {
  1351. var _p0 unsafe.Pointer
  1352. if len(b) > 0 {
  1353. _p0 = unsafe.Pointer(&b[0])
  1354. } else {
  1355. _p0 = unsafe.Pointer(&_zero)
  1356. }
  1357. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1358. if e1 != 0 {
  1359. err = errnoErr(e1)
  1360. }
  1361. return
  1362. }
  1363. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1364. func Mlockall(flags int) (err error) {
  1365. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  1366. if e1 != 0 {
  1367. err = errnoErr(e1)
  1368. }
  1369. return
  1370. }
  1371. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1372. func Msync(b []byte, flags int) (err error) {
  1373. var _p0 unsafe.Pointer
  1374. if len(b) > 0 {
  1375. _p0 = unsafe.Pointer(&b[0])
  1376. } else {
  1377. _p0 = unsafe.Pointer(&_zero)
  1378. }
  1379. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  1380. if e1 != 0 {
  1381. err = errnoErr(e1)
  1382. }
  1383. return
  1384. }
  1385. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1386. func Munlock(b []byte) (err error) {
  1387. var _p0 unsafe.Pointer
  1388. if len(b) > 0 {
  1389. _p0 = unsafe.Pointer(&b[0])
  1390. } else {
  1391. _p0 = unsafe.Pointer(&_zero)
  1392. }
  1393. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  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 Munlockall() (err error) {
  1401. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  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 faccessat(dirfd int, path string, mode uint32) (err error) {
  1409. var _p0 *byte
  1410. _p0, err = BytePtrFromString(path)
  1411. if err != nil {
  1412. return
  1413. }
  1414. _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1415. if e1 != 0 {
  1416. err = errnoErr(e1)
  1417. }
  1418. return
  1419. }
  1420. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1421. func Dup2(oldfd int, newfd int) (err error) {
  1422. _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
  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 EpollCreate(size int) (fd int, err error) {
  1430. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
  1431. fd = int(r0)
  1432. if e1 != 0 {
  1433. err = errnoErr(e1)
  1434. }
  1435. return
  1436. }
  1437. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1438. func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1439. var _p0 unsafe.Pointer
  1440. if len(events) > 0 {
  1441. _p0 = unsafe.Pointer(&events[0])
  1442. } else {
  1443. _p0 = unsafe.Pointer(&_zero)
  1444. }
  1445. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1446. n = int(r0)
  1447. if e1 != 0 {
  1448. err = errnoErr(e1)
  1449. }
  1450. return
  1451. }
  1452. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1453. func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  1454. _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
  1455. if e1 != 0 {
  1456. err = errnoErr(e1)
  1457. }
  1458. return
  1459. }
  1460. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1461. func Fchown(fd int, uid int, gid int) (err error) {
  1462. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  1463. if e1 != 0 {
  1464. err = errnoErr(e1)
  1465. }
  1466. return
  1467. }
  1468. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1469. func Fstatfs(fd int, buf *Statfs_t) (err error) {
  1470. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1471. if e1 != 0 {
  1472. err = errnoErr(e1)
  1473. }
  1474. return
  1475. }
  1476. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1477. func Ftruncate(fd int, length int64) (err error) {
  1478. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1479. if e1 != 0 {
  1480. err = errnoErr(e1)
  1481. }
  1482. return
  1483. }
  1484. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1485. func Getegid() (egid int) {
  1486. r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
  1487. egid = int(r0)
  1488. return
  1489. }
  1490. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1491. func Geteuid() (euid int) {
  1492. r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
  1493. euid = int(r0)
  1494. return
  1495. }
  1496. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1497. func Getgid() (gid int) {
  1498. r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
  1499. gid = int(r0)
  1500. return
  1501. }
  1502. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1503. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1504. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1505. if e1 != 0 {
  1506. err = errnoErr(e1)
  1507. }
  1508. return
  1509. }
  1510. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1511. func Getuid() (uid int) {
  1512. r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
  1513. uid = int(r0)
  1514. return
  1515. }
  1516. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1517. func Lchown(path string, uid int, gid int) (err error) {
  1518. var _p0 *byte
  1519. _p0, err = BytePtrFromString(path)
  1520. if err != nil {
  1521. return
  1522. }
  1523. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1524. if e1 != 0 {
  1525. err = errnoErr(e1)
  1526. }
  1527. return
  1528. }
  1529. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1530. func Listen(s int, n int) (err error) {
  1531. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  1532. if e1 != 0 {
  1533. err = errnoErr(e1)
  1534. }
  1535. return
  1536. }
  1537. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1538. func Pause() (err error) {
  1539. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  1540. if e1 != 0 {
  1541. err = errnoErr(e1)
  1542. }
  1543. return
  1544. }
  1545. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1546. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1547. var _p0 unsafe.Pointer
  1548. if len(p) > 0 {
  1549. _p0 = unsafe.Pointer(&p[0])
  1550. } else {
  1551. _p0 = unsafe.Pointer(&_zero)
  1552. }
  1553. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1554. n = int(r0)
  1555. if e1 != 0 {
  1556. err = errnoErr(e1)
  1557. }
  1558. return
  1559. }
  1560. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1561. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1562. var _p0 unsafe.Pointer
  1563. if len(p) > 0 {
  1564. _p0 = unsafe.Pointer(&p[0])
  1565. } else {
  1566. _p0 = unsafe.Pointer(&_zero)
  1567. }
  1568. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1569. n = int(r0)
  1570. if e1 != 0 {
  1571. err = errnoErr(e1)
  1572. }
  1573. return
  1574. }
  1575. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1576. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  1577. var _p0 *byte
  1578. _p0, err = BytePtrFromString(oldpath)
  1579. if err != nil {
  1580. return
  1581. }
  1582. var _p1 *byte
  1583. _p1, err = BytePtrFromString(newpath)
  1584. if err != nil {
  1585. return
  1586. }
  1587. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1588. if e1 != 0 {
  1589. err = errnoErr(e1)
  1590. }
  1591. return
  1592. }
  1593. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1594. func Seek(fd int, offset int64, whence int) (off int64, err error) {
  1595. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1596. off = int64(r0)
  1597. if e1 != 0 {
  1598. err = errnoErr(e1)
  1599. }
  1600. return
  1601. }
  1602. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1603. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1604. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1605. written = int(r0)
  1606. if e1 != 0 {
  1607. err = errnoErr(e1)
  1608. }
  1609. return
  1610. }
  1611. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1612. func Setfsgid(gid int) (err error) {
  1613. _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  1614. if e1 != 0 {
  1615. err = errnoErr(e1)
  1616. }
  1617. return
  1618. }
  1619. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1620. func Setfsuid(uid int) (err error) {
  1621. _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  1622. if e1 != 0 {
  1623. err = errnoErr(e1)
  1624. }
  1625. return
  1626. }
  1627. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1628. func Setregid(rgid int, egid int) (err error) {
  1629. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1630. if e1 != 0 {
  1631. err = errnoErr(e1)
  1632. }
  1633. return
  1634. }
  1635. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1636. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1637. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1638. if e1 != 0 {
  1639. err = errnoErr(e1)
  1640. }
  1641. return
  1642. }
  1643. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1644. func Setresuid(ruid int, euid int, suid int) (err error) {
  1645. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  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 Setrlimit(resource int, rlim *Rlimit) (err error) {
  1653. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1654. if e1 != 0 {
  1655. err = errnoErr(e1)
  1656. }
  1657. return
  1658. }
  1659. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1660. func Setreuid(ruid int, euid int) (err error) {
  1661. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1662. if e1 != 0 {
  1663. err = errnoErr(e1)
  1664. }
  1665. return
  1666. }
  1667. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1668. func Shutdown(fd int, how int) (err error) {
  1669. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  1670. if e1 != 0 {
  1671. err = errnoErr(e1)
  1672. }
  1673. return
  1674. }
  1675. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1676. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1677. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1678. n = int64(r0)
  1679. if e1 != 0 {
  1680. err = errnoErr(e1)
  1681. }
  1682. return
  1683. }
  1684. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1685. func Statfs(path string, buf *Statfs_t) (err error) {
  1686. var _p0 *byte
  1687. _p0, err = BytePtrFromString(path)
  1688. if err != nil {
  1689. return
  1690. }
  1691. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1692. if e1 != 0 {
  1693. err = errnoErr(e1)
  1694. }
  1695. return
  1696. }
  1697. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1698. func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1699. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
  1700. if e1 != 0 {
  1701. err = errnoErr(e1)
  1702. }
  1703. return
  1704. }
  1705. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1706. func Truncate(path string, length int64) (err error) {
  1707. var _p0 *byte
  1708. _p0, err = BytePtrFromString(path)
  1709. if err != nil {
  1710. return
  1711. }
  1712. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  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 Ustat(dev int, ubuf *Ustat_t) (err error) {
  1720. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 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 accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1728. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1729. fd = int(r0)
  1730. if e1 != 0 {
  1731. err = errnoErr(e1)
  1732. }
  1733. return
  1734. }
  1735. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1736. func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1737. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1738. fd = int(r0)
  1739. if e1 != 0 {
  1740. err = errnoErr(e1)
  1741. }
  1742. return
  1743. }
  1744. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1745. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1746. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  1747. if e1 != 0 {
  1748. err = errnoErr(e1)
  1749. }
  1750. return
  1751. }
  1752. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1753. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1754. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1755. if e1 != 0 {
  1756. err = errnoErr(e1)
  1757. }
  1758. return
  1759. }
  1760. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1761. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1762. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1763. nn = int(r0)
  1764. if e1 != 0 {
  1765. err = errnoErr(e1)
  1766. }
  1767. return
  1768. }
  1769. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1770. func setgroups(n int, list *_Gid_t) (err error) {
  1771. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1772. if e1 != 0 {
  1773. err = errnoErr(e1)
  1774. }
  1775. return
  1776. }
  1777. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1778. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1779. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1780. if e1 != 0 {
  1781. err = errnoErr(e1)
  1782. }
  1783. return
  1784. }
  1785. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1786. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1787. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1788. if e1 != 0 {
  1789. err = errnoErr(e1)
  1790. }
  1791. return
  1792. }
  1793. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1794. func socket(domain int, typ int, proto int) (fd int, err error) {
  1795. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  1796. fd = int(r0)
  1797. if e1 != 0 {
  1798. err = errnoErr(e1)
  1799. }
  1800. return
  1801. }
  1802. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1803. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1804. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1805. if e1 != 0 {
  1806. err = errnoErr(e1)
  1807. }
  1808. return
  1809. }
  1810. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1811. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1812. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1813. if e1 != 0 {
  1814. err = errnoErr(e1)
  1815. }
  1816. return
  1817. }
  1818. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1819. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1820. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1821. if e1 != 0 {
  1822. err = errnoErr(e1)
  1823. }
  1824. return
  1825. }
  1826. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1827. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1828. var _p0 unsafe.Pointer
  1829. if len(p) > 0 {
  1830. _p0 = unsafe.Pointer(&p[0])
  1831. } else {
  1832. _p0 = unsafe.Pointer(&_zero)
  1833. }
  1834. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1835. n = int(r0)
  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 sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1843. var _p0 unsafe.Pointer
  1844. if len(buf) > 0 {
  1845. _p0 = unsafe.Pointer(&buf[0])
  1846. } else {
  1847. _p0 = unsafe.Pointer(&_zero)
  1848. }
  1849. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1850. if e1 != 0 {
  1851. err = errnoErr(e1)
  1852. }
  1853. return
  1854. }
  1855. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1856. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1857. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1858. n = int(r0)
  1859. if e1 != 0 {
  1860. err = errnoErr(e1)
  1861. }
  1862. return
  1863. }
  1864. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1865. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1866. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1867. n = int(r0)
  1868. if e1 != 0 {
  1869. err = errnoErr(e1)
  1870. }
  1871. return
  1872. }
  1873. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1874. func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  1875. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  1876. xaddr = uintptr(r0)
  1877. if e1 != 0 {
  1878. err = errnoErr(e1)
  1879. }
  1880. return
  1881. }
  1882. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1883. func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  1884. var _p0 *byte
  1885. _p0, err = BytePtrFromString(path)
  1886. if err != nil {
  1887. return
  1888. }
  1889. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  1890. if e1 != 0 {
  1891. err = errnoErr(e1)
  1892. }
  1893. return
  1894. }
  1895. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1896. func Gettimeofday(tv *Timeval) (err error) {
  1897. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1898. if e1 != 0 {
  1899. err = errnoErr(e1)
  1900. }
  1901. return
  1902. }
  1903. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1904. func Utime(path string, buf *Utimbuf) (err error) {
  1905. var _p0 *byte
  1906. _p0, err = BytePtrFromString(path)
  1907. if err != nil {
  1908. return
  1909. }
  1910. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1911. if e1 != 0 {
  1912. err = errnoErr(e1)
  1913. }
  1914. return
  1915. }
  1916. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1917. func utimes(path string, times *[2]Timeval) (err error) {
  1918. var _p0 *byte
  1919. _p0, err = BytePtrFromString(path)
  1920. if err != nil {
  1921. return
  1922. }
  1923. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  1924. if e1 != 0 {
  1925. err = errnoErr(e1)
  1926. }
  1927. return
  1928. }
  1929. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1930. func pipe2(p *[2]_C_int, flags int) (err error) {
  1931. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  1932. if e1 != 0 {
  1933. err = errnoErr(e1)
  1934. }
  1935. return
  1936. }
  1937. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1938. func fstat(fd int, st *stat_t) (err error) {
  1939. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)
  1940. if e1 != 0 {
  1941. err = errnoErr(e1)
  1942. }
  1943. return
  1944. }
  1945. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1946. func fstatat(dirfd int, path string, st *stat_t, flags int) (err error) {
  1947. var _p0 *byte
  1948. _p0, err = BytePtrFromString(path)
  1949. if err != nil {
  1950. return
  1951. }
  1952. _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), uintptr(flags), 0, 0)
  1953. if e1 != 0 {
  1954. err = errnoErr(e1)
  1955. }
  1956. return
  1957. }
  1958. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1959. func lstat(path string, st *stat_t) (err error) {
  1960. var _p0 *byte
  1961. _p0, err = BytePtrFromString(path)
  1962. if err != nil {
  1963. return
  1964. }
  1965. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
  1966. if e1 != 0 {
  1967. err = errnoErr(e1)
  1968. }
  1969. return
  1970. }
  1971. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1972. func stat(path string, st *stat_t) (err error) {
  1973. var _p0 *byte
  1974. _p0, err = BytePtrFromString(path)
  1975. if err != nil {
  1976. return
  1977. }
  1978. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
  1979. if e1 != 0 {
  1980. err = errnoErr(e1)
  1981. }
  1982. return
  1983. }
  1984. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1985. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  1986. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  1987. n = int(r0)
  1988. if e1 != 0 {
  1989. err = errnoErr(e1)
  1990. }
  1991. return
  1992. }