zsyscall_linux_arm.go 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530
  1. // go run mksyscall.go -l32 -arm -tags linux,arm syscall_linux.go syscall_linux_arm.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build linux,arm
  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 FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
  12. r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
  13. fd = int(r0)
  14. if e1 != 0 {
  15. err = errnoErr(e1)
  16. }
  17. return
  18. }
  19. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  20. func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
  21. _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
  22. if e1 != 0 {
  23. err = errnoErr(e1)
  24. }
  25. return
  26. }
  27. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  28. func fchmodat(dirfd int, path string, mode uint32) (err error) {
  29. var _p0 *byte
  30. _p0, err = BytePtrFromString(path)
  31. if err != nil {
  32. return
  33. }
  34. _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  35. if e1 != 0 {
  36. err = errnoErr(e1)
  37. }
  38. return
  39. }
  40. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  41. func ioctl(fd int, req uint, arg uintptr) (err error) {
  42. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  43. if e1 != 0 {
  44. err = errnoErr(e1)
  45. }
  46. return
  47. }
  48. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  49. func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
  50. var _p0 *byte
  51. _p0, err = BytePtrFromString(oldpath)
  52. if err != nil {
  53. return
  54. }
  55. var _p1 *byte
  56. _p1, err = BytePtrFromString(newpath)
  57. if err != nil {
  58. return
  59. }
  60. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  61. if e1 != 0 {
  62. err = errnoErr(e1)
  63. }
  64. return
  65. }
  66. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  67. func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
  68. var _p0 *byte
  69. _p0, err = BytePtrFromString(path)
  70. if err != nil {
  71. return
  72. }
  73. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
  74. fd = int(r0)
  75. if e1 != 0 {
  76. err = errnoErr(e1)
  77. }
  78. return
  79. }
  80. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  81. func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  82. r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
  83. n = int(r0)
  84. if e1 != 0 {
  85. err = errnoErr(e1)
  86. }
  87. return
  88. }
  89. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  90. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  91. var _p0 *byte
  92. _p0, err = BytePtrFromString(path)
  93. if err != nil {
  94. return
  95. }
  96. var _p1 unsafe.Pointer
  97. if len(buf) > 0 {
  98. _p1 = unsafe.Pointer(&buf[0])
  99. } else {
  100. _p1 = unsafe.Pointer(&_zero)
  101. }
  102. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  103. n = int(r0)
  104. if e1 != 0 {
  105. err = errnoErr(e1)
  106. }
  107. return
  108. }
  109. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  110. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  111. var _p0 *byte
  112. _p0, err = BytePtrFromString(oldpath)
  113. if err != nil {
  114. return
  115. }
  116. var _p1 *byte
  117. _p1, err = BytePtrFromString(newpath)
  118. if err != nil {
  119. return
  120. }
  121. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  122. if e1 != 0 {
  123. err = errnoErr(e1)
  124. }
  125. return
  126. }
  127. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  128. func Unlinkat(dirfd int, path string, flags int) (err error) {
  129. var _p0 *byte
  130. _p0, err = BytePtrFromString(path)
  131. if err != nil {
  132. return
  133. }
  134. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  135. if e1 != 0 {
  136. err = errnoErr(e1)
  137. }
  138. return
  139. }
  140. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  141. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  142. var _p0 *byte
  143. _p0, err = BytePtrFromString(path)
  144. if err != nil {
  145. return
  146. }
  147. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  148. if e1 != 0 {
  149. err = errnoErr(e1)
  150. }
  151. return
  152. }
  153. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  154. func Getcwd(buf []byte) (n int, err error) {
  155. var _p0 unsafe.Pointer
  156. if len(buf) > 0 {
  157. _p0 = unsafe.Pointer(&buf[0])
  158. } else {
  159. _p0 = unsafe.Pointer(&_zero)
  160. }
  161. r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  162. n = int(r0)
  163. if e1 != 0 {
  164. err = errnoErr(e1)
  165. }
  166. return
  167. }
  168. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  169. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  170. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  171. wpid = int(r0)
  172. if e1 != 0 {
  173. err = errnoErr(e1)
  174. }
  175. return
  176. }
  177. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  178. func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
  179. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  180. ret = int(r0)
  181. if e1 != 0 {
  182. err = errnoErr(e1)
  183. }
  184. return
  185. }
  186. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  187. func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
  188. var _p0 unsafe.Pointer
  189. if len(buf) > 0 {
  190. _p0 = unsafe.Pointer(&buf[0])
  191. } else {
  192. _p0 = unsafe.Pointer(&_zero)
  193. }
  194. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
  195. ret = int(r0)
  196. if e1 != 0 {
  197. err = errnoErr(e1)
  198. }
  199. return
  200. }
  201. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  202. func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
  203. var _p0 *byte
  204. _p0, err = BytePtrFromString(arg2)
  205. if err != nil {
  206. return
  207. }
  208. r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
  209. ret = int(r0)
  210. if e1 != 0 {
  211. err = errnoErr(e1)
  212. }
  213. return
  214. }
  215. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  216. func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
  217. var _p0 *byte
  218. _p0, err = BytePtrFromString(arg3)
  219. if err != nil {
  220. return
  221. }
  222. var _p1 *byte
  223. _p1, err = BytePtrFromString(arg4)
  224. if err != nil {
  225. return
  226. }
  227. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
  228. ret = int(r0)
  229. if e1 != 0 {
  230. err = errnoErr(e1)
  231. }
  232. return
  233. }
  234. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  235. func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
  236. var _p0 unsafe.Pointer
  237. if len(payload) > 0 {
  238. _p0 = unsafe.Pointer(&payload[0])
  239. } else {
  240. _p0 = unsafe.Pointer(&_zero)
  241. }
  242. _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
  243. if e1 != 0 {
  244. err = errnoErr(e1)
  245. }
  246. return
  247. }
  248. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  249. func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
  250. var _p0 unsafe.Pointer
  251. if len(buf) > 0 {
  252. _p0 = unsafe.Pointer(&buf[0])
  253. } else {
  254. _p0 = unsafe.Pointer(&_zero)
  255. }
  256. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
  257. ret = int(r0)
  258. if e1 != 0 {
  259. err = errnoErr(e1)
  260. }
  261. return
  262. }
  263. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  264. func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
  265. var _p0 *byte
  266. _p0, err = BytePtrFromString(keyType)
  267. if err != nil {
  268. return
  269. }
  270. var _p1 *byte
  271. _p1, err = BytePtrFromString(restriction)
  272. if err != nil {
  273. return
  274. }
  275. _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
  276. if e1 != 0 {
  277. err = errnoErr(e1)
  278. }
  279. return
  280. }
  281. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  282. func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
  283. _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
  284. if e1 != 0 {
  285. err = errnoErr(e1)
  286. }
  287. return
  288. }
  289. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  290. func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
  291. _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
  292. if e1 != 0 {
  293. err = errnoErr(e1)
  294. }
  295. return
  296. }
  297. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  298. func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
  299. var _p0 *byte
  300. _p0, err = BytePtrFromString(arg)
  301. if err != nil {
  302. return
  303. }
  304. _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
  305. if e1 != 0 {
  306. err = errnoErr(e1)
  307. }
  308. return
  309. }
  310. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  311. func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
  312. var _p0 *byte
  313. _p0, err = BytePtrFromString(source)
  314. if err != nil {
  315. return
  316. }
  317. var _p1 *byte
  318. _p1, err = BytePtrFromString(target)
  319. if err != nil {
  320. return
  321. }
  322. var _p2 *byte
  323. _p2, err = BytePtrFromString(fstype)
  324. if err != nil {
  325. return
  326. }
  327. _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
  328. if e1 != 0 {
  329. err = errnoErr(e1)
  330. }
  331. return
  332. }
  333. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  334. func Acct(path string) (err error) {
  335. var _p0 *byte
  336. _p0, err = BytePtrFromString(path)
  337. if err != nil {
  338. return
  339. }
  340. _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  341. if e1 != 0 {
  342. err = errnoErr(e1)
  343. }
  344. return
  345. }
  346. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  347. func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
  348. var _p0 *byte
  349. _p0, err = BytePtrFromString(keyType)
  350. if err != nil {
  351. return
  352. }
  353. var _p1 *byte
  354. _p1, err = BytePtrFromString(description)
  355. if err != nil {
  356. return
  357. }
  358. var _p2 unsafe.Pointer
  359. if len(payload) > 0 {
  360. _p2 = unsafe.Pointer(&payload[0])
  361. } else {
  362. _p2 = unsafe.Pointer(&_zero)
  363. }
  364. r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
  365. id = int(r0)
  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 Adjtimex(buf *Timex) (state int, err error) {
  373. r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
  374. state = int(r0)
  375. if e1 != 0 {
  376. err = errnoErr(e1)
  377. }
  378. return
  379. }
  380. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  381. func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
  382. _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
  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 Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
  390. _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
  391. if e1 != 0 {
  392. err = errnoErr(e1)
  393. }
  394. return
  395. }
  396. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  397. func Chdir(path string) (err error) {
  398. var _p0 *byte
  399. _p0, err = BytePtrFromString(path)
  400. if err != nil {
  401. return
  402. }
  403. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  404. if e1 != 0 {
  405. err = errnoErr(e1)
  406. }
  407. return
  408. }
  409. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  410. func Chroot(path string) (err error) {
  411. var _p0 *byte
  412. _p0, err = BytePtrFromString(path)
  413. if err != nil {
  414. return
  415. }
  416. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 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 ClockGetres(clockid int32, res *Timespec) (err error) {
  424. _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
  425. if e1 != 0 {
  426. err = errnoErr(e1)
  427. }
  428. return
  429. }
  430. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  431. func ClockGettime(clockid int32, time *Timespec) (err error) {
  432. _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
  433. if e1 != 0 {
  434. err = errnoErr(e1)
  435. }
  436. return
  437. }
  438. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  439. func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
  440. _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
  441. if e1 != 0 {
  442. err = errnoErr(e1)
  443. }
  444. return
  445. }
  446. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  447. func Close(fd int) (err error) {
  448. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  449. if e1 != 0 {
  450. err = errnoErr(e1)
  451. }
  452. return
  453. }
  454. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  455. func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  456. r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  457. n = int(r0)
  458. if e1 != 0 {
  459. err = errnoErr(e1)
  460. }
  461. return
  462. }
  463. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  464. func DeleteModule(name string, flags int) (err error) {
  465. var _p0 *byte
  466. _p0, err = BytePtrFromString(name)
  467. if err != nil {
  468. return
  469. }
  470. _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  471. if e1 != 0 {
  472. err = errnoErr(e1)
  473. }
  474. return
  475. }
  476. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  477. func Dup(oldfd int) (fd int, err error) {
  478. r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
  479. fd = int(r0)
  480. if e1 != 0 {
  481. err = errnoErr(e1)
  482. }
  483. return
  484. }
  485. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  486. func Dup3(oldfd int, newfd int, flags int) (err error) {
  487. _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
  488. if e1 != 0 {
  489. err = errnoErr(e1)
  490. }
  491. return
  492. }
  493. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  494. func EpollCreate1(flag int) (fd int, err error) {
  495. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
  496. fd = int(r0)
  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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
  504. _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
  505. if e1 != 0 {
  506. err = errnoErr(e1)
  507. }
  508. return
  509. }
  510. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  511. func Eventfd(initval uint, flags int) (fd int, err error) {
  512. r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
  513. fd = int(r0)
  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 Exit(code int) {
  521. SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
  522. return
  523. }
  524. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  525. func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
  526. _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
  527. if e1 != 0 {
  528. err = errnoErr(e1)
  529. }
  530. return
  531. }
  532. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  533. func Fchdir(fd int) (err error) {
  534. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  535. if e1 != 0 {
  536. err = errnoErr(e1)
  537. }
  538. return
  539. }
  540. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  541. func Fchmod(fd int, mode uint32) (err error) {
  542. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  543. if e1 != 0 {
  544. err = errnoErr(e1)
  545. }
  546. return
  547. }
  548. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  549. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  550. var _p0 *byte
  551. _p0, err = BytePtrFromString(path)
  552. if err != nil {
  553. return
  554. }
  555. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  556. if e1 != 0 {
  557. err = errnoErr(e1)
  558. }
  559. return
  560. }
  561. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  562. func Fdatasync(fd int) (err error) {
  563. _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
  564. if e1 != 0 {
  565. err = errnoErr(e1)
  566. }
  567. return
  568. }
  569. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  570. func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
  571. var _p0 *byte
  572. _p0, err = BytePtrFromString(attr)
  573. if err != nil {
  574. return
  575. }
  576. var _p1 unsafe.Pointer
  577. if len(dest) > 0 {
  578. _p1 = unsafe.Pointer(&dest[0])
  579. } else {
  580. _p1 = unsafe.Pointer(&_zero)
  581. }
  582. r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
  583. sz = int(r0)
  584. if e1 != 0 {
  585. err = errnoErr(e1)
  586. }
  587. return
  588. }
  589. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  590. func FinitModule(fd int, params string, flags int) (err error) {
  591. var _p0 *byte
  592. _p0, err = BytePtrFromString(params)
  593. if err != nil {
  594. return
  595. }
  596. _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  597. if e1 != 0 {
  598. err = errnoErr(e1)
  599. }
  600. return
  601. }
  602. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  603. func Flistxattr(fd int, dest []byte) (sz int, err error) {
  604. var _p0 unsafe.Pointer
  605. if len(dest) > 0 {
  606. _p0 = unsafe.Pointer(&dest[0])
  607. } else {
  608. _p0 = unsafe.Pointer(&_zero)
  609. }
  610. r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
  611. sz = int(r0)
  612. if e1 != 0 {
  613. err = errnoErr(e1)
  614. }
  615. return
  616. }
  617. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  618. func Flock(fd int, how int) (err error) {
  619. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  620. if e1 != 0 {
  621. err = errnoErr(e1)
  622. }
  623. return
  624. }
  625. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  626. func Fremovexattr(fd int, attr string) (err error) {
  627. var _p0 *byte
  628. _p0, err = BytePtrFromString(attr)
  629. if err != nil {
  630. return
  631. }
  632. _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
  633. if e1 != 0 {
  634. err = errnoErr(e1)
  635. }
  636. return
  637. }
  638. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  639. func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
  640. var _p0 *byte
  641. _p0, err = BytePtrFromString(attr)
  642. if err != nil {
  643. return
  644. }
  645. var _p1 unsafe.Pointer
  646. if len(dest) > 0 {
  647. _p1 = unsafe.Pointer(&dest[0])
  648. } else {
  649. _p1 = unsafe.Pointer(&_zero)
  650. }
  651. _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
  652. if e1 != 0 {
  653. err = errnoErr(e1)
  654. }
  655. return
  656. }
  657. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  658. func Fsync(fd int) (err error) {
  659. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  660. if e1 != 0 {
  661. err = errnoErr(e1)
  662. }
  663. return
  664. }
  665. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  666. func Getdents(fd int, buf []byte) (n int, err error) {
  667. var _p0 unsafe.Pointer
  668. if len(buf) > 0 {
  669. _p0 = unsafe.Pointer(&buf[0])
  670. } else {
  671. _p0 = unsafe.Pointer(&_zero)
  672. }
  673. r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  674. n = int(r0)
  675. if e1 != 0 {
  676. err = errnoErr(e1)
  677. }
  678. return
  679. }
  680. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  681. func Getpgid(pid int) (pgid int, err error) {
  682. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  683. pgid = int(r0)
  684. if e1 != 0 {
  685. err = errnoErr(e1)
  686. }
  687. return
  688. }
  689. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  690. func Getpid() (pid int) {
  691. r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
  692. pid = int(r0)
  693. return
  694. }
  695. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  696. func Getppid() (ppid int) {
  697. r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
  698. ppid = int(r0)
  699. return
  700. }
  701. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  702. func Getpriority(which int, who int) (prio int, err error) {
  703. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  704. prio = int(r0)
  705. if e1 != 0 {
  706. err = errnoErr(e1)
  707. }
  708. return
  709. }
  710. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  711. func Getrandom(buf []byte, flags int) (n int, err error) {
  712. var _p0 unsafe.Pointer
  713. if len(buf) > 0 {
  714. _p0 = unsafe.Pointer(&buf[0])
  715. } else {
  716. _p0 = unsafe.Pointer(&_zero)
  717. }
  718. r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
  719. n = int(r0)
  720. if e1 != 0 {
  721. err = errnoErr(e1)
  722. }
  723. return
  724. }
  725. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  726. func Getrusage(who int, rusage *Rusage) (err error) {
  727. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  728. if e1 != 0 {
  729. err = errnoErr(e1)
  730. }
  731. return
  732. }
  733. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  734. func Getsid(pid int) (sid int, err error) {
  735. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  736. sid = int(r0)
  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 Gettid() (tid int) {
  744. r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
  745. tid = int(r0)
  746. return
  747. }
  748. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  749. func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
  750. var _p0 *byte
  751. _p0, err = BytePtrFromString(path)
  752. if err != nil {
  753. return
  754. }
  755. var _p1 *byte
  756. _p1, err = BytePtrFromString(attr)
  757. if err != nil {
  758. return
  759. }
  760. var _p2 unsafe.Pointer
  761. if len(dest) > 0 {
  762. _p2 = unsafe.Pointer(&dest[0])
  763. } else {
  764. _p2 = unsafe.Pointer(&_zero)
  765. }
  766. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  767. sz = int(r0)
  768. if e1 != 0 {
  769. err = errnoErr(e1)
  770. }
  771. return
  772. }
  773. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  774. func InitModule(moduleImage []byte, params string) (err error) {
  775. var _p0 unsafe.Pointer
  776. if len(moduleImage) > 0 {
  777. _p0 = unsafe.Pointer(&moduleImage[0])
  778. } else {
  779. _p0 = unsafe.Pointer(&_zero)
  780. }
  781. var _p1 *byte
  782. _p1, err = BytePtrFromString(params)
  783. if err != nil {
  784. return
  785. }
  786. _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
  787. if e1 != 0 {
  788. err = errnoErr(e1)
  789. }
  790. return
  791. }
  792. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  793. func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
  794. var _p0 *byte
  795. _p0, err = BytePtrFromString(pathname)
  796. if err != nil {
  797. return
  798. }
  799. r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
  800. watchdesc = int(r0)
  801. if e1 != 0 {
  802. err = errnoErr(e1)
  803. }
  804. return
  805. }
  806. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  807. func InotifyInit1(flags int) (fd int, err error) {
  808. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
  809. fd = int(r0)
  810. if e1 != 0 {
  811. err = errnoErr(e1)
  812. }
  813. return
  814. }
  815. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  816. func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
  817. r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
  818. success = int(r0)
  819. if e1 != 0 {
  820. err = errnoErr(e1)
  821. }
  822. return
  823. }
  824. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  825. func Kill(pid int, sig syscall.Signal) (err error) {
  826. _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
  827. if e1 != 0 {
  828. err = errnoErr(e1)
  829. }
  830. return
  831. }
  832. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  833. func Klogctl(typ int, buf []byte) (n int, err error) {
  834. var _p0 unsafe.Pointer
  835. if len(buf) > 0 {
  836. _p0 = unsafe.Pointer(&buf[0])
  837. } else {
  838. _p0 = unsafe.Pointer(&_zero)
  839. }
  840. r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
  841. n = int(r0)
  842. if e1 != 0 {
  843. err = errnoErr(e1)
  844. }
  845. return
  846. }
  847. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  848. func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
  849. var _p0 *byte
  850. _p0, err = BytePtrFromString(path)
  851. if err != nil {
  852. return
  853. }
  854. var _p1 *byte
  855. _p1, err = BytePtrFromString(attr)
  856. if err != nil {
  857. return
  858. }
  859. var _p2 unsafe.Pointer
  860. if len(dest) > 0 {
  861. _p2 = unsafe.Pointer(&dest[0])
  862. } else {
  863. _p2 = unsafe.Pointer(&_zero)
  864. }
  865. r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  866. sz = int(r0)
  867. if e1 != 0 {
  868. err = errnoErr(e1)
  869. }
  870. return
  871. }
  872. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  873. func Listxattr(path string, dest []byte) (sz int, err error) {
  874. var _p0 *byte
  875. _p0, err = BytePtrFromString(path)
  876. if err != nil {
  877. return
  878. }
  879. var _p1 unsafe.Pointer
  880. if len(dest) > 0 {
  881. _p1 = unsafe.Pointer(&dest[0])
  882. } else {
  883. _p1 = unsafe.Pointer(&_zero)
  884. }
  885. r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  886. sz = int(r0)
  887. if e1 != 0 {
  888. err = errnoErr(e1)
  889. }
  890. return
  891. }
  892. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  893. func Llistxattr(path string, dest []byte) (sz int, err error) {
  894. var _p0 *byte
  895. _p0, err = BytePtrFromString(path)
  896. if err != nil {
  897. return
  898. }
  899. var _p1 unsafe.Pointer
  900. if len(dest) > 0 {
  901. _p1 = unsafe.Pointer(&dest[0])
  902. } else {
  903. _p1 = unsafe.Pointer(&_zero)
  904. }
  905. r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  906. sz = int(r0)
  907. if e1 != 0 {
  908. err = errnoErr(e1)
  909. }
  910. return
  911. }
  912. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  913. func Lremovexattr(path string, attr string) (err error) {
  914. var _p0 *byte
  915. _p0, err = BytePtrFromString(path)
  916. if err != nil {
  917. return
  918. }
  919. var _p1 *byte
  920. _p1, err = BytePtrFromString(attr)
  921. if err != nil {
  922. return
  923. }
  924. _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  925. if e1 != 0 {
  926. err = errnoErr(e1)
  927. }
  928. return
  929. }
  930. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  931. func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
  932. var _p0 *byte
  933. _p0, err = BytePtrFromString(path)
  934. if err != nil {
  935. return
  936. }
  937. var _p1 *byte
  938. _p1, err = BytePtrFromString(attr)
  939. if err != nil {
  940. return
  941. }
  942. var _p2 unsafe.Pointer
  943. if len(data) > 0 {
  944. _p2 = unsafe.Pointer(&data[0])
  945. } else {
  946. _p2 = unsafe.Pointer(&_zero)
  947. }
  948. _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  949. if e1 != 0 {
  950. err = errnoErr(e1)
  951. }
  952. return
  953. }
  954. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  955. func MemfdCreate(name string, flags int) (fd int, err error) {
  956. var _p0 *byte
  957. _p0, err = BytePtrFromString(name)
  958. if err != nil {
  959. return
  960. }
  961. r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  962. fd = int(r0)
  963. if e1 != 0 {
  964. err = errnoErr(e1)
  965. }
  966. return
  967. }
  968. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  969. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  970. var _p0 *byte
  971. _p0, err = BytePtrFromString(path)
  972. if err != nil {
  973. return
  974. }
  975. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  976. if e1 != 0 {
  977. err = errnoErr(e1)
  978. }
  979. return
  980. }
  981. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  982. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  983. var _p0 *byte
  984. _p0, err = BytePtrFromString(path)
  985. if err != nil {
  986. return
  987. }
  988. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  989. if e1 != 0 {
  990. err = errnoErr(e1)
  991. }
  992. return
  993. }
  994. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  995. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  996. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  997. if e1 != 0 {
  998. err = errnoErr(e1)
  999. }
  1000. return
  1001. }
  1002. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1003. func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
  1004. r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
  1005. fd = int(r0)
  1006. if e1 != 0 {
  1007. err = errnoErr(e1)
  1008. }
  1009. return
  1010. }
  1011. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1012. func PivotRoot(newroot string, putold string) (err error) {
  1013. var _p0 *byte
  1014. _p0, err = BytePtrFromString(newroot)
  1015. if err != nil {
  1016. return
  1017. }
  1018. var _p1 *byte
  1019. _p1, err = BytePtrFromString(putold)
  1020. if err != nil {
  1021. return
  1022. }
  1023. _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1024. if e1 != 0 {
  1025. err = errnoErr(e1)
  1026. }
  1027. return
  1028. }
  1029. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1030. func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
  1031. _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 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 Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
  1039. _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  1040. if e1 != 0 {
  1041. err = errnoErr(e1)
  1042. }
  1043. return
  1044. }
  1045. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1046. func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  1047. 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)))
  1048. n = int(r0)
  1049. if e1 != 0 {
  1050. err = errnoErr(e1)
  1051. }
  1052. return
  1053. }
  1054. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1055. func read(fd int, p []byte) (n int, err error) {
  1056. var _p0 unsafe.Pointer
  1057. if len(p) > 0 {
  1058. _p0 = unsafe.Pointer(&p[0])
  1059. } else {
  1060. _p0 = unsafe.Pointer(&_zero)
  1061. }
  1062. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1063. n = int(r0)
  1064. if e1 != 0 {
  1065. err = errnoErr(e1)
  1066. }
  1067. return
  1068. }
  1069. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1070. func Removexattr(path string, attr string) (err error) {
  1071. var _p0 *byte
  1072. _p0, err = BytePtrFromString(path)
  1073. if err != nil {
  1074. return
  1075. }
  1076. var _p1 *byte
  1077. _p1, err = BytePtrFromString(attr)
  1078. if err != nil {
  1079. return
  1080. }
  1081. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1082. if e1 != 0 {
  1083. err = errnoErr(e1)
  1084. }
  1085. return
  1086. }
  1087. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1088. func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
  1089. var _p0 *byte
  1090. _p0, err = BytePtrFromString(oldpath)
  1091. if err != nil {
  1092. return
  1093. }
  1094. var _p1 *byte
  1095. _p1, err = BytePtrFromString(newpath)
  1096. if err != nil {
  1097. return
  1098. }
  1099. _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  1100. if e1 != 0 {
  1101. err = errnoErr(e1)
  1102. }
  1103. return
  1104. }
  1105. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1106. func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
  1107. var _p0 *byte
  1108. _p0, err = BytePtrFromString(keyType)
  1109. if err != nil {
  1110. return
  1111. }
  1112. var _p1 *byte
  1113. _p1, err = BytePtrFromString(description)
  1114. if err != nil {
  1115. return
  1116. }
  1117. var _p2 *byte
  1118. _p2, err = BytePtrFromString(callback)
  1119. if err != nil {
  1120. return
  1121. }
  1122. r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
  1123. id = int(r0)
  1124. if e1 != 0 {
  1125. err = errnoErr(e1)
  1126. }
  1127. return
  1128. }
  1129. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1130. func Setdomainname(p []byte) (err error) {
  1131. var _p0 unsafe.Pointer
  1132. if len(p) > 0 {
  1133. _p0 = unsafe.Pointer(&p[0])
  1134. } else {
  1135. _p0 = unsafe.Pointer(&_zero)
  1136. }
  1137. _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
  1138. if e1 != 0 {
  1139. err = errnoErr(e1)
  1140. }
  1141. return
  1142. }
  1143. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1144. func Sethostname(p []byte) (err error) {
  1145. var _p0 unsafe.Pointer
  1146. if len(p) > 0 {
  1147. _p0 = unsafe.Pointer(&p[0])
  1148. } else {
  1149. _p0 = unsafe.Pointer(&_zero)
  1150. }
  1151. _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
  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 Setpgid(pid int, pgid int) (err error) {
  1159. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1160. if e1 != 0 {
  1161. err = errnoErr(e1)
  1162. }
  1163. return
  1164. }
  1165. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1166. func Setsid() (pid int, err error) {
  1167. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1168. pid = int(r0)
  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 Settimeofday(tv *Timeval) (err error) {
  1176. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1177. if e1 != 0 {
  1178. err = errnoErr(e1)
  1179. }
  1180. return
  1181. }
  1182. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1183. func Setns(fd int, nstype int) (err error) {
  1184. _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 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 Setpriority(which int, who int, prio int) (err error) {
  1192. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1193. if e1 != 0 {
  1194. err = errnoErr(e1)
  1195. }
  1196. return
  1197. }
  1198. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1199. func Setxattr(path string, attr string, data []byte, flags int) (err error) {
  1200. var _p0 *byte
  1201. _p0, err = BytePtrFromString(path)
  1202. if err != nil {
  1203. return
  1204. }
  1205. var _p1 *byte
  1206. _p1, err = BytePtrFromString(attr)
  1207. if err != nil {
  1208. return
  1209. }
  1210. var _p2 unsafe.Pointer
  1211. if len(data) > 0 {
  1212. _p2 = unsafe.Pointer(&data[0])
  1213. } else {
  1214. _p2 = unsafe.Pointer(&_zero)
  1215. }
  1216. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  1217. if e1 != 0 {
  1218. err = errnoErr(e1)
  1219. }
  1220. return
  1221. }
  1222. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1223. func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
  1224. r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
  1225. newfd = int(r0)
  1226. if e1 != 0 {
  1227. err = errnoErr(e1)
  1228. }
  1229. return
  1230. }
  1231. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1232. func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
  1233. var _p0 *byte
  1234. _p0, err = BytePtrFromString(path)
  1235. if err != nil {
  1236. return
  1237. }
  1238. _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
  1239. if e1 != 0 {
  1240. err = errnoErr(e1)
  1241. }
  1242. return
  1243. }
  1244. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1245. func Sync() {
  1246. SyscallNoError(SYS_SYNC, 0, 0, 0)
  1247. return
  1248. }
  1249. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1250. func Syncfs(fd int) (err error) {
  1251. _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
  1252. if e1 != 0 {
  1253. err = errnoErr(e1)
  1254. }
  1255. return
  1256. }
  1257. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1258. func Sysinfo(info *Sysinfo_t) (err error) {
  1259. _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
  1260. if e1 != 0 {
  1261. err = errnoErr(e1)
  1262. }
  1263. return
  1264. }
  1265. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1266. func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
  1267. r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  1268. n = int64(int64(r1)<<32 | int64(r0))
  1269. if e1 != 0 {
  1270. err = errnoErr(e1)
  1271. }
  1272. return
  1273. }
  1274. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1275. func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
  1276. _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
  1277. if e1 != 0 {
  1278. err = errnoErr(e1)
  1279. }
  1280. return
  1281. }
  1282. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1283. func Times(tms *Tms) (ticks uintptr, err error) {
  1284. r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
  1285. ticks = uintptr(r0)
  1286. if e1 != 0 {
  1287. err = errnoErr(e1)
  1288. }
  1289. return
  1290. }
  1291. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1292. func Umask(mask int) (oldmask int) {
  1293. r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
  1294. oldmask = int(r0)
  1295. return
  1296. }
  1297. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1298. func Uname(buf *Utsname) (err error) {
  1299. _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
  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 Unmount(target string, flags int) (err error) {
  1307. var _p0 *byte
  1308. _p0, err = BytePtrFromString(target)
  1309. if err != nil {
  1310. return
  1311. }
  1312. _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1313. if e1 != 0 {
  1314. err = errnoErr(e1)
  1315. }
  1316. return
  1317. }
  1318. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1319. func Unshare(flags int) (err error) {
  1320. _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
  1321. if e1 != 0 {
  1322. err = errnoErr(e1)
  1323. }
  1324. return
  1325. }
  1326. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1327. func write(fd int, p []byte) (n int, err error) {
  1328. var _p0 unsafe.Pointer
  1329. if len(p) > 0 {
  1330. _p0 = unsafe.Pointer(&p[0])
  1331. } else {
  1332. _p0 = unsafe.Pointer(&_zero)
  1333. }
  1334. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1335. n = int(r0)
  1336. if e1 != 0 {
  1337. err = errnoErr(e1)
  1338. }
  1339. return
  1340. }
  1341. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1342. func exitThread(code int) (err error) {
  1343. _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
  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 readlen(fd int, p *byte, np int) (n int, err error) {
  1351. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1352. n = int(r0)
  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 writelen(fd int, p *byte, np int) (n int, err error) {
  1360. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1361. n = int(r0)
  1362. if e1 != 0 {
  1363. err = errnoErr(e1)
  1364. }
  1365. return
  1366. }
  1367. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1368. func readv(fd int, iovs []Iovec) (n int, err error) {
  1369. var _p0 unsafe.Pointer
  1370. if len(iovs) > 0 {
  1371. _p0 = unsafe.Pointer(&iovs[0])
  1372. } else {
  1373. _p0 = unsafe.Pointer(&_zero)
  1374. }
  1375. r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
  1376. n = int(r0)
  1377. if e1 != 0 {
  1378. err = errnoErr(e1)
  1379. }
  1380. return
  1381. }
  1382. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1383. func writev(fd int, iovs []Iovec) (n int, err error) {
  1384. var _p0 unsafe.Pointer
  1385. if len(iovs) > 0 {
  1386. _p0 = unsafe.Pointer(&iovs[0])
  1387. } else {
  1388. _p0 = unsafe.Pointer(&_zero)
  1389. }
  1390. r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
  1391. n = int(r0)
  1392. if e1 != 0 {
  1393. err = errnoErr(e1)
  1394. }
  1395. return
  1396. }
  1397. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1398. func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
  1399. var _p0 unsafe.Pointer
  1400. if len(iovs) > 0 {
  1401. _p0 = unsafe.Pointer(&iovs[0])
  1402. } else {
  1403. _p0 = unsafe.Pointer(&_zero)
  1404. }
  1405. r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
  1406. n = int(r0)
  1407. if e1 != 0 {
  1408. err = errnoErr(e1)
  1409. }
  1410. return
  1411. }
  1412. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1413. func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
  1414. var _p0 unsafe.Pointer
  1415. if len(iovs) > 0 {
  1416. _p0 = unsafe.Pointer(&iovs[0])
  1417. } else {
  1418. _p0 = unsafe.Pointer(&_zero)
  1419. }
  1420. r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
  1421. n = int(r0)
  1422. if e1 != 0 {
  1423. err = errnoErr(e1)
  1424. }
  1425. return
  1426. }
  1427. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1428. func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
  1429. var _p0 unsafe.Pointer
  1430. if len(iovs) > 0 {
  1431. _p0 = unsafe.Pointer(&iovs[0])
  1432. } else {
  1433. _p0 = unsafe.Pointer(&_zero)
  1434. }
  1435. r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
  1436. n = int(r0)
  1437. if e1 != 0 {
  1438. err = errnoErr(e1)
  1439. }
  1440. return
  1441. }
  1442. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1443. func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
  1444. var _p0 unsafe.Pointer
  1445. if len(iovs) > 0 {
  1446. _p0 = unsafe.Pointer(&iovs[0])
  1447. } else {
  1448. _p0 = unsafe.Pointer(&_zero)
  1449. }
  1450. r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
  1451. n = int(r0)
  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 munmap(addr uintptr, length uintptr) (err error) {
  1459. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1460. if e1 != 0 {
  1461. err = errnoErr(e1)
  1462. }
  1463. return
  1464. }
  1465. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1466. func Madvise(b []byte, advice int) (err error) {
  1467. var _p0 unsafe.Pointer
  1468. if len(b) > 0 {
  1469. _p0 = unsafe.Pointer(&b[0])
  1470. } else {
  1471. _p0 = unsafe.Pointer(&_zero)
  1472. }
  1473. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
  1474. if e1 != 0 {
  1475. err = errnoErr(e1)
  1476. }
  1477. return
  1478. }
  1479. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1480. func Mprotect(b []byte, prot int) (err error) {
  1481. var _p0 unsafe.Pointer
  1482. if len(b) > 0 {
  1483. _p0 = unsafe.Pointer(&b[0])
  1484. } else {
  1485. _p0 = unsafe.Pointer(&_zero)
  1486. }
  1487. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  1488. if e1 != 0 {
  1489. err = errnoErr(e1)
  1490. }
  1491. return
  1492. }
  1493. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1494. func Mlock(b []byte) (err error) {
  1495. var _p0 unsafe.Pointer
  1496. if len(b) > 0 {
  1497. _p0 = unsafe.Pointer(&b[0])
  1498. } else {
  1499. _p0 = unsafe.Pointer(&_zero)
  1500. }
  1501. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1502. if e1 != 0 {
  1503. err = errnoErr(e1)
  1504. }
  1505. return
  1506. }
  1507. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1508. func Mlockall(flags int) (err error) {
  1509. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  1510. if e1 != 0 {
  1511. err = errnoErr(e1)
  1512. }
  1513. return
  1514. }
  1515. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1516. func Msync(b []byte, flags int) (err error) {
  1517. var _p0 unsafe.Pointer
  1518. if len(b) > 0 {
  1519. _p0 = unsafe.Pointer(&b[0])
  1520. } else {
  1521. _p0 = unsafe.Pointer(&_zero)
  1522. }
  1523. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  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 Munlock(b []byte) (err error) {
  1531. var _p0 unsafe.Pointer
  1532. if len(b) > 0 {
  1533. _p0 = unsafe.Pointer(&b[0])
  1534. } else {
  1535. _p0 = unsafe.Pointer(&_zero)
  1536. }
  1537. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1538. if e1 != 0 {
  1539. err = errnoErr(e1)
  1540. }
  1541. return
  1542. }
  1543. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1544. func Munlockall() (err error) {
  1545. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  1546. if e1 != 0 {
  1547. err = errnoErr(e1)
  1548. }
  1549. return
  1550. }
  1551. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1552. func faccessat(dirfd int, path string, mode uint32) (err error) {
  1553. var _p0 *byte
  1554. _p0, err = BytePtrFromString(path)
  1555. if err != nil {
  1556. return
  1557. }
  1558. _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1559. if e1 != 0 {
  1560. err = errnoErr(e1)
  1561. }
  1562. return
  1563. }
  1564. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1565. func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
  1566. var _p0 *byte
  1567. _p0, err = BytePtrFromString(pathname)
  1568. if err != nil {
  1569. return
  1570. }
  1571. _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
  1572. if e1 != 0 {
  1573. err = errnoErr(e1)
  1574. }
  1575. return
  1576. }
  1577. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1578. func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
  1579. r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
  1580. fd = int(r0)
  1581. if e1 != 0 {
  1582. err = errnoErr(e1)
  1583. }
  1584. return
  1585. }
  1586. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1587. func pipe(p *[2]_C_int) (err error) {
  1588. _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
  1589. if e1 != 0 {
  1590. err = errnoErr(e1)
  1591. }
  1592. return
  1593. }
  1594. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1595. func pipe2(p *[2]_C_int, flags int) (err error) {
  1596. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  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 accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1604. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1605. fd = 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 accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1613. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1614. fd = int(r0)
  1615. if e1 != 0 {
  1616. err = errnoErr(e1)
  1617. }
  1618. return
  1619. }
  1620. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1621. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1622. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  1623. if e1 != 0 {
  1624. err = errnoErr(e1)
  1625. }
  1626. return
  1627. }
  1628. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1629. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1630. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1631. if e1 != 0 {
  1632. err = errnoErr(e1)
  1633. }
  1634. return
  1635. }
  1636. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1637. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1638. r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1639. nn = int(r0)
  1640. if e1 != 0 {
  1641. err = errnoErr(e1)
  1642. }
  1643. return
  1644. }
  1645. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1646. func setgroups(n int, list *_Gid_t) (err error) {
  1647. _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1648. if e1 != 0 {
  1649. err = errnoErr(e1)
  1650. }
  1651. return
  1652. }
  1653. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1654. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1655. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1656. if e1 != 0 {
  1657. err = errnoErr(e1)
  1658. }
  1659. return
  1660. }
  1661. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1662. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1663. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1664. if e1 != 0 {
  1665. err = errnoErr(e1)
  1666. }
  1667. return
  1668. }
  1669. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1670. func socket(domain int, typ int, proto int) (fd int, err error) {
  1671. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  1672. fd = int(r0)
  1673. if e1 != 0 {
  1674. err = errnoErr(e1)
  1675. }
  1676. return
  1677. }
  1678. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1679. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1680. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1681. if e1 != 0 {
  1682. err = errnoErr(e1)
  1683. }
  1684. return
  1685. }
  1686. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1687. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1688. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1689. if e1 != 0 {
  1690. err = errnoErr(e1)
  1691. }
  1692. return
  1693. }
  1694. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1695. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1696. var _p0 unsafe.Pointer
  1697. if len(p) > 0 {
  1698. _p0 = unsafe.Pointer(&p[0])
  1699. } else {
  1700. _p0 = unsafe.Pointer(&_zero)
  1701. }
  1702. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1703. n = int(r0)
  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 sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1711. var _p0 unsafe.Pointer
  1712. if len(buf) > 0 {
  1713. _p0 = unsafe.Pointer(&buf[0])
  1714. } else {
  1715. _p0 = unsafe.Pointer(&_zero)
  1716. }
  1717. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1718. if e1 != 0 {
  1719. err = errnoErr(e1)
  1720. }
  1721. return
  1722. }
  1723. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1724. func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) {
  1725. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)
  1726. if e1 != 0 {
  1727. err = errnoErr(e1)
  1728. }
  1729. return
  1730. }
  1731. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1732. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1733. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1734. n = int(r0)
  1735. if e1 != 0 {
  1736. err = errnoErr(e1)
  1737. }
  1738. return
  1739. }
  1740. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1741. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1742. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1743. n = int(r0)
  1744. if e1 != 0 {
  1745. err = errnoErr(e1)
  1746. }
  1747. return
  1748. }
  1749. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1750. func Dup2(oldfd int, newfd int) (err error) {
  1751. _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
  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 EpollCreate(size int) (fd int, err error) {
  1759. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
  1760. fd = int(r0)
  1761. if e1 != 0 {
  1762. err = errnoErr(e1)
  1763. }
  1764. return
  1765. }
  1766. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1767. func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1768. var _p0 unsafe.Pointer
  1769. if len(events) > 0 {
  1770. _p0 = unsafe.Pointer(&events[0])
  1771. } else {
  1772. _p0 = unsafe.Pointer(&_zero)
  1773. }
  1774. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1775. n = int(r0)
  1776. if e1 != 0 {
  1777. err = errnoErr(e1)
  1778. }
  1779. return
  1780. }
  1781. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1782. func Fchown(fd int, uid int, gid int) (err error) {
  1783. _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
  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 Fstat(fd int, stat *Stat_t) (err error) {
  1791. _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1792. if e1 != 0 {
  1793. err = errnoErr(e1)
  1794. }
  1795. return
  1796. }
  1797. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1798. func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
  1799. var _p0 *byte
  1800. _p0, err = BytePtrFromString(path)
  1801. if err != nil {
  1802. return
  1803. }
  1804. _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 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 Getegid() (egid int) {
  1812. r0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0)
  1813. egid = int(r0)
  1814. return
  1815. }
  1816. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1817. func Geteuid() (euid int) {
  1818. r0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0)
  1819. euid = int(r0)
  1820. return
  1821. }
  1822. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1823. func Getgid() (gid int) {
  1824. r0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0)
  1825. gid = int(r0)
  1826. return
  1827. }
  1828. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1829. func Getuid() (uid int) {
  1830. r0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0)
  1831. uid = int(r0)
  1832. return
  1833. }
  1834. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1835. func InotifyInit() (fd int, err error) {
  1836. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
  1837. fd = int(r0)
  1838. if e1 != 0 {
  1839. err = errnoErr(e1)
  1840. }
  1841. return
  1842. }
  1843. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1844. func Lchown(path string, uid int, gid int) (err error) {
  1845. var _p0 *byte
  1846. _p0, err = BytePtrFromString(path)
  1847. if err != nil {
  1848. return
  1849. }
  1850. _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1851. if e1 != 0 {
  1852. err = errnoErr(e1)
  1853. }
  1854. return
  1855. }
  1856. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1857. func Listen(s int, n int) (err error) {
  1858. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  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 Lstat(path string, stat *Stat_t) (err error) {
  1866. var _p0 *byte
  1867. _p0, err = BytePtrFromString(path)
  1868. if err != nil {
  1869. return
  1870. }
  1871. _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1872. if e1 != 0 {
  1873. err = errnoErr(e1)
  1874. }
  1875. return
  1876. }
  1877. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1878. func Pause() (err error) {
  1879. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  1880. if e1 != 0 {
  1881. err = errnoErr(e1)
  1882. }
  1883. return
  1884. }
  1885. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1886. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  1887. var _p0 *byte
  1888. _p0, err = BytePtrFromString(oldpath)
  1889. if err != nil {
  1890. return
  1891. }
  1892. var _p1 *byte
  1893. _p1, err = BytePtrFromString(newpath)
  1894. if err != nil {
  1895. return
  1896. }
  1897. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 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 sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1905. r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1906. written = int(r0)
  1907. if e1 != 0 {
  1908. err = errnoErr(e1)
  1909. }
  1910. return
  1911. }
  1912. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1913. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1914. r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1915. n = int(r0)
  1916. if e1 != 0 {
  1917. err = errnoErr(e1)
  1918. }
  1919. return
  1920. }
  1921. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1922. func setfsgid(gid int) (prev int, err error) {
  1923. r0, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
  1924. prev = int(r0)
  1925. if e1 != 0 {
  1926. err = errnoErr(e1)
  1927. }
  1928. return
  1929. }
  1930. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1931. func setfsuid(uid int) (prev int, err error) {
  1932. r0, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
  1933. prev = int(r0)
  1934. if e1 != 0 {
  1935. err = errnoErr(e1)
  1936. }
  1937. return
  1938. }
  1939. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1940. func Setregid(rgid int, egid int) (err error) {
  1941. _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
  1942. if e1 != 0 {
  1943. err = errnoErr(e1)
  1944. }
  1945. return
  1946. }
  1947. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1948. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1949. _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1950. if e1 != 0 {
  1951. err = errnoErr(e1)
  1952. }
  1953. return
  1954. }
  1955. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1956. func Setresuid(ruid int, euid int, suid int) (err error) {
  1957. _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
  1958. if e1 != 0 {
  1959. err = errnoErr(e1)
  1960. }
  1961. return
  1962. }
  1963. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1964. func Setreuid(ruid int, euid int) (err error) {
  1965. _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 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 Shutdown(fd int, how int) (err error) {
  1973. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  1974. if e1 != 0 {
  1975. err = errnoErr(e1)
  1976. }
  1977. return
  1978. }
  1979. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1980. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  1981. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1982. n = int(r0)
  1983. if e1 != 0 {
  1984. err = errnoErr(e1)
  1985. }
  1986. return
  1987. }
  1988. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1989. func Stat(path string, stat *Stat_t) (err error) {
  1990. var _p0 *byte
  1991. _p0, err = BytePtrFromString(path)
  1992. if err != nil {
  1993. return
  1994. }
  1995. _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1996. if e1 != 0 {
  1997. err = errnoErr(e1)
  1998. }
  1999. return
  2000. }
  2001. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2002. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  2003. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
  2004. if e1 != 0 {
  2005. err = errnoErr(e1)
  2006. }
  2007. return
  2008. }
  2009. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2010. func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  2011. var _p0 *byte
  2012. _p0, err = BytePtrFromString(path)
  2013. if err != nil {
  2014. return
  2015. }
  2016. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  2017. if e1 != 0 {
  2018. err = errnoErr(e1)
  2019. }
  2020. return
  2021. }
  2022. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2023. func Gettimeofday(tv *Timeval) (err error) {
  2024. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  2025. if e1 != 0 {
  2026. err = errnoErr(e1)
  2027. }
  2028. return
  2029. }
  2030. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2031. func utimes(path string, times *[2]Timeval) (err error) {
  2032. var _p0 *byte
  2033. _p0, err = BytePtrFromString(path)
  2034. if err != nil {
  2035. return
  2036. }
  2037. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  2038. if e1 != 0 {
  2039. err = errnoErr(e1)
  2040. }
  2041. return
  2042. }
  2043. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2044. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  2045. var _p0 unsafe.Pointer
  2046. if len(p) > 0 {
  2047. _p0 = unsafe.Pointer(&p[0])
  2048. } else {
  2049. _p0 = unsafe.Pointer(&_zero)
  2050. }
  2051. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
  2052. n = int(r0)
  2053. if e1 != 0 {
  2054. err = errnoErr(e1)
  2055. }
  2056. return
  2057. }
  2058. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2059. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  2060. var _p0 unsafe.Pointer
  2061. if len(p) > 0 {
  2062. _p0 = unsafe.Pointer(&p[0])
  2063. } else {
  2064. _p0 = unsafe.Pointer(&_zero)
  2065. }
  2066. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
  2067. n = int(r0)
  2068. if e1 != 0 {
  2069. err = errnoErr(e1)
  2070. }
  2071. return
  2072. }
  2073. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2074. func Truncate(path string, length int64) (err error) {
  2075. var _p0 *byte
  2076. _p0, err = BytePtrFromString(path)
  2077. if err != nil {
  2078. return
  2079. }
  2080. _, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
  2081. if e1 != 0 {
  2082. err = errnoErr(e1)
  2083. }
  2084. return
  2085. }
  2086. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2087. func Ftruncate(fd int, length int64) (err error) {
  2088. _, _, e1 := Syscall6(SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
  2089. if e1 != 0 {
  2090. err = errnoErr(e1)
  2091. }
  2092. return
  2093. }
  2094. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2095. func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
  2096. r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
  2097. xaddr = uintptr(r0)
  2098. if e1 != 0 {
  2099. err = errnoErr(e1)
  2100. }
  2101. return
  2102. }
  2103. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2104. func getrlimit(resource int, rlim *rlimit32) (err error) {
  2105. _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  2106. if e1 != 0 {
  2107. err = errnoErr(e1)
  2108. }
  2109. return
  2110. }
  2111. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2112. func setrlimit(resource int, rlim *rlimit32) (err error) {
  2113. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  2114. if e1 != 0 {
  2115. err = errnoErr(e1)
  2116. }
  2117. return
  2118. }
  2119. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2120. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  2121. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  2122. n = int(r0)
  2123. if e1 != 0 {
  2124. err = errnoErr(e1)
  2125. }
  2126. return
  2127. }
  2128. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2129. func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {
  2130. _, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))
  2131. if e1 != 0 {
  2132. err = errnoErr(e1)
  2133. }
  2134. return
  2135. }
  2136. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2137. func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
  2138. var _p0 *byte
  2139. _p0, err = BytePtrFromString(cmdline)
  2140. if err != nil {
  2141. return
  2142. }
  2143. _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  2144. if e1 != 0 {
  2145. err = errnoErr(e1)
  2146. }
  2147. return
  2148. }