zsyscall_linux.go 49 KB

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