zsyscall_linux_386.go 52 KB

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