zsyscall_linux.go 54 KB

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