zsyscall_linux_386.go 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010
  1. // mksyscall.pl -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 ClockGettime(clockid int32, time *Timespec) (err error) {
  365. _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 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 Close(fd int) (err error) {
  373. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 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 CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  381. r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  382. n = int(r0)
  383. if e1 != 0 {
  384. err = errnoErr(e1)
  385. }
  386. return
  387. }
  388. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  389. func Dup(oldfd int) (fd int, err error) {
  390. r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
  391. fd = int(r0)
  392. if e1 != 0 {
  393. err = errnoErr(e1)
  394. }
  395. return
  396. }
  397. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  398. func Dup3(oldfd int, newfd int, flags int) (err error) {
  399. _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
  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 EpollCreate1(flag int) (fd int, err error) {
  407. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
  408. fd = 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
  416. _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
  417. if e1 != 0 {
  418. err = errnoErr(e1)
  419. }
  420. return
  421. }
  422. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  423. func Eventfd(initval uint, flags int) (fd int, err error) {
  424. r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
  425. fd = int(r0)
  426. if e1 != 0 {
  427. err = errnoErr(e1)
  428. }
  429. return
  430. }
  431. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  432. func Exit(code int) {
  433. SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
  434. return
  435. }
  436. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  437. func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
  438. _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
  439. if e1 != 0 {
  440. err = errnoErr(e1)
  441. }
  442. return
  443. }
  444. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  445. func Fchdir(fd int) (err error) {
  446. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  447. if e1 != 0 {
  448. err = errnoErr(e1)
  449. }
  450. return
  451. }
  452. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  453. func Fchmod(fd int, mode uint32) (err error) {
  454. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  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 Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  462. var _p0 *byte
  463. _p0, err = BytePtrFromString(path)
  464. if err != nil {
  465. return
  466. }
  467. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  468. if e1 != 0 {
  469. err = errnoErr(e1)
  470. }
  471. return
  472. }
  473. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  474. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  475. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  476. val = int(r0)
  477. if e1 != 0 {
  478. err = errnoErr(e1)
  479. }
  480. return
  481. }
  482. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  483. func Fdatasync(fd int) (err error) {
  484. _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
  485. if e1 != 0 {
  486. err = errnoErr(e1)
  487. }
  488. return
  489. }
  490. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  491. func Flock(fd int, how int) (err error) {
  492. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  493. if e1 != 0 {
  494. err = errnoErr(e1)
  495. }
  496. return
  497. }
  498. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  499. func Fsync(fd int) (err error) {
  500. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  501. if e1 != 0 {
  502. err = errnoErr(e1)
  503. }
  504. return
  505. }
  506. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  507. func Getdents(fd int, buf []byte) (n int, err error) {
  508. var _p0 unsafe.Pointer
  509. if len(buf) > 0 {
  510. _p0 = unsafe.Pointer(&buf[0])
  511. } else {
  512. _p0 = unsafe.Pointer(&_zero)
  513. }
  514. r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  515. n = int(r0)
  516. if e1 != 0 {
  517. err = errnoErr(e1)
  518. }
  519. return
  520. }
  521. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  522. func Getpgid(pid int) (pgid int, err error) {
  523. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  524. pgid = int(r0)
  525. if e1 != 0 {
  526. err = errnoErr(e1)
  527. }
  528. return
  529. }
  530. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  531. func Getpid() (pid int) {
  532. r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
  533. pid = int(r0)
  534. return
  535. }
  536. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  537. func Getppid() (ppid int) {
  538. r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
  539. ppid = int(r0)
  540. return
  541. }
  542. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  543. func Getpriority(which int, who int) (prio int, err error) {
  544. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  545. prio = int(r0)
  546. if e1 != 0 {
  547. err = errnoErr(e1)
  548. }
  549. return
  550. }
  551. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  552. func Getrandom(buf []byte, flags int) (n int, err error) {
  553. var _p0 unsafe.Pointer
  554. if len(buf) > 0 {
  555. _p0 = unsafe.Pointer(&buf[0])
  556. } else {
  557. _p0 = unsafe.Pointer(&_zero)
  558. }
  559. r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
  560. n = int(r0)
  561. if e1 != 0 {
  562. err = errnoErr(e1)
  563. }
  564. return
  565. }
  566. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  567. func Getrusage(who int, rusage *Rusage) (err error) {
  568. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 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 Getsid(pid int) (sid int, err error) {
  576. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  577. sid = int(r0)
  578. if e1 != 0 {
  579. err = errnoErr(e1)
  580. }
  581. return
  582. }
  583. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  584. func Gettid() (tid int) {
  585. r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
  586. tid = int(r0)
  587. return
  588. }
  589. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  590. func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
  591. var _p0 *byte
  592. _p0, err = BytePtrFromString(path)
  593. if err != nil {
  594. return
  595. }
  596. var _p1 *byte
  597. _p1, err = BytePtrFromString(attr)
  598. if err != nil {
  599. return
  600. }
  601. var _p2 unsafe.Pointer
  602. if len(dest) > 0 {
  603. _p2 = unsafe.Pointer(&dest[0])
  604. } else {
  605. _p2 = unsafe.Pointer(&_zero)
  606. }
  607. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  608. sz = int(r0)
  609. if e1 != 0 {
  610. err = errnoErr(e1)
  611. }
  612. return
  613. }
  614. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  615. func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
  616. var _p0 *byte
  617. _p0, err = BytePtrFromString(pathname)
  618. if err != nil {
  619. return
  620. }
  621. r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
  622. watchdesc = int(r0)
  623. if e1 != 0 {
  624. err = errnoErr(e1)
  625. }
  626. return
  627. }
  628. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  629. func InotifyInit1(flags int) (fd int, err error) {
  630. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
  631. fd = int(r0)
  632. if e1 != 0 {
  633. err = errnoErr(e1)
  634. }
  635. return
  636. }
  637. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  638. func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
  639. r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
  640. success = int(r0)
  641. if e1 != 0 {
  642. err = errnoErr(e1)
  643. }
  644. return
  645. }
  646. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  647. func Kill(pid int, sig syscall.Signal) (err error) {
  648. _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
  649. if e1 != 0 {
  650. err = errnoErr(e1)
  651. }
  652. return
  653. }
  654. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  655. func Klogctl(typ int, buf []byte) (n int, err error) {
  656. var _p0 unsafe.Pointer
  657. if len(buf) > 0 {
  658. _p0 = unsafe.Pointer(&buf[0])
  659. } else {
  660. _p0 = unsafe.Pointer(&_zero)
  661. }
  662. r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
  663. n = int(r0)
  664. if e1 != 0 {
  665. err = errnoErr(e1)
  666. }
  667. return
  668. }
  669. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  670. func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
  671. var _p0 *byte
  672. _p0, err = BytePtrFromString(path)
  673. if err != nil {
  674. return
  675. }
  676. var _p1 *byte
  677. _p1, err = BytePtrFromString(attr)
  678. if err != nil {
  679. return
  680. }
  681. var _p2 unsafe.Pointer
  682. if len(dest) > 0 {
  683. _p2 = unsafe.Pointer(&dest[0])
  684. } else {
  685. _p2 = unsafe.Pointer(&_zero)
  686. }
  687. r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  688. sz = int(r0)
  689. if e1 != 0 {
  690. err = errnoErr(e1)
  691. }
  692. return
  693. }
  694. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  695. func Listxattr(path string, dest []byte) (sz int, err error) {
  696. var _p0 *byte
  697. _p0, err = BytePtrFromString(path)
  698. if err != nil {
  699. return
  700. }
  701. var _p1 unsafe.Pointer
  702. if len(dest) > 0 {
  703. _p1 = unsafe.Pointer(&dest[0])
  704. } else {
  705. _p1 = unsafe.Pointer(&_zero)
  706. }
  707. r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  708. sz = 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 Llistxattr(path string, dest []byte) (sz int, err error) {
  716. var _p0 *byte
  717. _p0, err = BytePtrFromString(path)
  718. if err != nil {
  719. return
  720. }
  721. var _p1 unsafe.Pointer
  722. if len(dest) > 0 {
  723. _p1 = unsafe.Pointer(&dest[0])
  724. } else {
  725. _p1 = unsafe.Pointer(&_zero)
  726. }
  727. r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  728. sz = int(r0)
  729. if e1 != 0 {
  730. err = errnoErr(e1)
  731. }
  732. return
  733. }
  734. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  735. func Lremovexattr(path string, attr string) (err error) {
  736. var _p0 *byte
  737. _p0, err = BytePtrFromString(path)
  738. if err != nil {
  739. return
  740. }
  741. var _p1 *byte
  742. _p1, err = BytePtrFromString(attr)
  743. if err != nil {
  744. return
  745. }
  746. _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  747. if e1 != 0 {
  748. err = errnoErr(e1)
  749. }
  750. return
  751. }
  752. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  753. func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
  754. var _p0 *byte
  755. _p0, err = BytePtrFromString(path)
  756. if err != nil {
  757. return
  758. }
  759. var _p1 *byte
  760. _p1, err = BytePtrFromString(attr)
  761. if err != nil {
  762. return
  763. }
  764. var _p2 unsafe.Pointer
  765. if len(data) > 0 {
  766. _p2 = unsafe.Pointer(&data[0])
  767. } else {
  768. _p2 = unsafe.Pointer(&_zero)
  769. }
  770. _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
  778. var _p0 *byte
  779. _p0, err = BytePtrFromString(path)
  780. if err != nil {
  781. return
  782. }
  783. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  784. if e1 != 0 {
  785. err = errnoErr(e1)
  786. }
  787. return
  788. }
  789. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  790. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  791. var _p0 *byte
  792. _p0, err = BytePtrFromString(path)
  793. if err != nil {
  794. return
  795. }
  796. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  797. if e1 != 0 {
  798. err = errnoErr(e1)
  799. }
  800. return
  801. }
  802. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  803. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  804. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  805. if e1 != 0 {
  806. err = errnoErr(e1)
  807. }
  808. return
  809. }
  810. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  811. func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
  812. r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
  813. fd = int(r0)
  814. if e1 != 0 {
  815. err = errnoErr(e1)
  816. }
  817. return
  818. }
  819. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  820. func PivotRoot(newroot string, putold string) (err error) {
  821. var _p0 *byte
  822. _p0, err = BytePtrFromString(newroot)
  823. if err != nil {
  824. return
  825. }
  826. var _p1 *byte
  827. _p1, err = BytePtrFromString(putold)
  828. if err != nil {
  829. return
  830. }
  831. _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  832. if e1 != 0 {
  833. err = errnoErr(e1)
  834. }
  835. return
  836. }
  837. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  838. func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
  839. _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
  840. if e1 != 0 {
  841. err = errnoErr(e1)
  842. }
  843. return
  844. }
  845. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  846. func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
  847. _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  848. if e1 != 0 {
  849. err = errnoErr(e1)
  850. }
  851. return
  852. }
  853. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  854. func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  855. 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)))
  856. n = 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 read(fd int, p []byte) (n int, err error) {
  864. var _p0 unsafe.Pointer
  865. if len(p) > 0 {
  866. _p0 = unsafe.Pointer(&p[0])
  867. } else {
  868. _p0 = unsafe.Pointer(&_zero)
  869. }
  870. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  871. n = int(r0)
  872. if e1 != 0 {
  873. err = errnoErr(e1)
  874. }
  875. return
  876. }
  877. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  878. func Removexattr(path string, attr string) (err error) {
  879. var _p0 *byte
  880. _p0, err = BytePtrFromString(path)
  881. if err != nil {
  882. return
  883. }
  884. var _p1 *byte
  885. _p1, err = BytePtrFromString(attr)
  886. if err != nil {
  887. return
  888. }
  889. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  890. if e1 != 0 {
  891. err = errnoErr(e1)
  892. }
  893. return
  894. }
  895. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  896. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  897. var _p0 *byte
  898. _p0, err = BytePtrFromString(oldpath)
  899. if err != nil {
  900. return
  901. }
  902. var _p1 *byte
  903. _p1, err = BytePtrFromString(newpath)
  904. if err != nil {
  905. return
  906. }
  907. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  908. if e1 != 0 {
  909. err = errnoErr(e1)
  910. }
  911. return
  912. }
  913. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  914. func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
  915. var _p0 *byte
  916. _p0, err = BytePtrFromString(keyType)
  917. if err != nil {
  918. return
  919. }
  920. var _p1 *byte
  921. _p1, err = BytePtrFromString(description)
  922. if err != nil {
  923. return
  924. }
  925. var _p2 *byte
  926. _p2, err = BytePtrFromString(callback)
  927. if err != nil {
  928. return
  929. }
  930. r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
  931. id = int(r0)
  932. if e1 != 0 {
  933. err = errnoErr(e1)
  934. }
  935. return
  936. }
  937. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  938. func Setdomainname(p []byte) (err error) {
  939. var _p0 unsafe.Pointer
  940. if len(p) > 0 {
  941. _p0 = unsafe.Pointer(&p[0])
  942. } else {
  943. _p0 = unsafe.Pointer(&_zero)
  944. }
  945. _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
  946. if e1 != 0 {
  947. err = errnoErr(e1)
  948. }
  949. return
  950. }
  951. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  952. func Sethostname(p []byte) (err error) {
  953. var _p0 unsafe.Pointer
  954. if len(p) > 0 {
  955. _p0 = unsafe.Pointer(&p[0])
  956. } else {
  957. _p0 = unsafe.Pointer(&_zero)
  958. }
  959. _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
  960. if e1 != 0 {
  961. err = errnoErr(e1)
  962. }
  963. return
  964. }
  965. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  966. func Setpgid(pid int, pgid int) (err error) {
  967. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  968. if e1 != 0 {
  969. err = errnoErr(e1)
  970. }
  971. return
  972. }
  973. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  974. func Setsid() (pid int, err error) {
  975. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  976. pid = int(r0)
  977. if e1 != 0 {
  978. err = errnoErr(e1)
  979. }
  980. return
  981. }
  982. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  983. func Settimeofday(tv *Timeval) (err error) {
  984. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  985. if e1 != 0 {
  986. err = errnoErr(e1)
  987. }
  988. return
  989. }
  990. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  991. func Setns(fd int, nstype int) (err error) {
  992. _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
  993. if e1 != 0 {
  994. err = errnoErr(e1)
  995. }
  996. return
  997. }
  998. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  999. func Setpriority(which int, who int, prio int) (err error) {
  1000. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1001. if e1 != 0 {
  1002. err = errnoErr(e1)
  1003. }
  1004. return
  1005. }
  1006. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1007. func Setxattr(path string, attr string, data []byte, flags int) (err error) {
  1008. var _p0 *byte
  1009. _p0, err = BytePtrFromString(path)
  1010. if err != nil {
  1011. return
  1012. }
  1013. var _p1 *byte
  1014. _p1, err = BytePtrFromString(attr)
  1015. if err != nil {
  1016. return
  1017. }
  1018. var _p2 unsafe.Pointer
  1019. if len(data) > 0 {
  1020. _p2 = unsafe.Pointer(&data[0])
  1021. } else {
  1022. _p2 = unsafe.Pointer(&_zero)
  1023. }
  1024. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  1025. if e1 != 0 {
  1026. err = errnoErr(e1)
  1027. }
  1028. return
  1029. }
  1030. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1031. func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
  1032. var _p0 *byte
  1033. _p0, err = BytePtrFromString(path)
  1034. if err != nil {
  1035. return
  1036. }
  1037. _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
  1038. if e1 != 0 {
  1039. err = errnoErr(e1)
  1040. }
  1041. return
  1042. }
  1043. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1044. func Sync() {
  1045. SyscallNoError(SYS_SYNC, 0, 0, 0)
  1046. return
  1047. }
  1048. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1049. func Syncfs(fd int) (err error) {
  1050. _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
  1051. if e1 != 0 {
  1052. err = errnoErr(e1)
  1053. }
  1054. return
  1055. }
  1056. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1057. func Sysinfo(info *Sysinfo_t) (err error) {
  1058. _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
  1059. if e1 != 0 {
  1060. err = errnoErr(e1)
  1061. }
  1062. return
  1063. }
  1064. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1065. func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
  1066. r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  1067. n = int64(int64(r1)<<32 | int64(r0))
  1068. if e1 != 0 {
  1069. err = errnoErr(e1)
  1070. }
  1071. return
  1072. }
  1073. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1074. func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
  1075. _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
  1076. if e1 != 0 {
  1077. err = errnoErr(e1)
  1078. }
  1079. return
  1080. }
  1081. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1082. func Times(tms *Tms) (ticks uintptr, err error) {
  1083. r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
  1084. ticks = uintptr(r0)
  1085. if e1 != 0 {
  1086. err = errnoErr(e1)
  1087. }
  1088. return
  1089. }
  1090. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1091. func Umask(mask int) (oldmask int) {
  1092. r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
  1093. oldmask = int(r0)
  1094. return
  1095. }
  1096. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1097. func Uname(buf *Utsname) (err error) {
  1098. _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
  1099. if e1 != 0 {
  1100. err = errnoErr(e1)
  1101. }
  1102. return
  1103. }
  1104. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1105. func Unmount(target string, flags int) (err error) {
  1106. var _p0 *byte
  1107. _p0, err = BytePtrFromString(target)
  1108. if err != nil {
  1109. return
  1110. }
  1111. _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1112. if e1 != 0 {
  1113. err = errnoErr(e1)
  1114. }
  1115. return
  1116. }
  1117. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1118. func Unshare(flags int) (err error) {
  1119. _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
  1120. if e1 != 0 {
  1121. err = errnoErr(e1)
  1122. }
  1123. return
  1124. }
  1125. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1126. func write(fd int, p []byte) (n int, err error) {
  1127. var _p0 unsafe.Pointer
  1128. if len(p) > 0 {
  1129. _p0 = unsafe.Pointer(&p[0])
  1130. } else {
  1131. _p0 = unsafe.Pointer(&_zero)
  1132. }
  1133. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1134. n = int(r0)
  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 exitThread(code int) (err error) {
  1142. _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
  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 readlen(fd int, p *byte, np int) (n int, err error) {
  1150. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1151. n = int(r0)
  1152. if e1 != 0 {
  1153. err = errnoErr(e1)
  1154. }
  1155. return
  1156. }
  1157. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1158. func writelen(fd int, p *byte, np int) (n int, err error) {
  1159. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1160. n = int(r0)
  1161. if e1 != 0 {
  1162. err = errnoErr(e1)
  1163. }
  1164. return
  1165. }
  1166. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1167. func munmap(addr uintptr, length uintptr) (err error) {
  1168. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1169. if e1 != 0 {
  1170. err = errnoErr(e1)
  1171. }
  1172. return
  1173. }
  1174. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1175. func Madvise(b []byte, advice int) (err error) {
  1176. var _p0 unsafe.Pointer
  1177. if len(b) > 0 {
  1178. _p0 = unsafe.Pointer(&b[0])
  1179. } else {
  1180. _p0 = unsafe.Pointer(&_zero)
  1181. }
  1182. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
  1183. if e1 != 0 {
  1184. err = errnoErr(e1)
  1185. }
  1186. return
  1187. }
  1188. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1189. func Mprotect(b []byte, prot int) (err error) {
  1190. var _p0 unsafe.Pointer
  1191. if len(b) > 0 {
  1192. _p0 = unsafe.Pointer(&b[0])
  1193. } else {
  1194. _p0 = unsafe.Pointer(&_zero)
  1195. }
  1196. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  1197. if e1 != 0 {
  1198. err = errnoErr(e1)
  1199. }
  1200. return
  1201. }
  1202. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1203. func Mlock(b []byte) (err error) {
  1204. var _p0 unsafe.Pointer
  1205. if len(b) > 0 {
  1206. _p0 = unsafe.Pointer(&b[0])
  1207. } else {
  1208. _p0 = unsafe.Pointer(&_zero)
  1209. }
  1210. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 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 Mlockall(flags int) (err error) {
  1218. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 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 Msync(b []byte, flags int) (err error) {
  1226. var _p0 unsafe.Pointer
  1227. if len(b) > 0 {
  1228. _p0 = unsafe.Pointer(&b[0])
  1229. } else {
  1230. _p0 = unsafe.Pointer(&_zero)
  1231. }
  1232. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  1233. if e1 != 0 {
  1234. err = errnoErr(e1)
  1235. }
  1236. return
  1237. }
  1238. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1239. func Munlock(b []byte) (err error) {
  1240. var _p0 unsafe.Pointer
  1241. if len(b) > 0 {
  1242. _p0 = unsafe.Pointer(&b[0])
  1243. } else {
  1244. _p0 = unsafe.Pointer(&_zero)
  1245. }
  1246. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1247. if e1 != 0 {
  1248. err = errnoErr(e1)
  1249. }
  1250. return
  1251. }
  1252. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1253. func Munlockall() (err error) {
  1254. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  1255. if e1 != 0 {
  1256. err = errnoErr(e1)
  1257. }
  1258. return
  1259. }
  1260. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1261. func faccessat(dirfd int, path string, mode uint32) (err error) {
  1262. var _p0 *byte
  1263. _p0, err = BytePtrFromString(path)
  1264. if err != nil {
  1265. return
  1266. }
  1267. _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1268. if e1 != 0 {
  1269. err = errnoErr(e1)
  1270. }
  1271. return
  1272. }
  1273. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1274. func pipe(p *[2]_C_int) (err error) {
  1275. _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
  1276. if e1 != 0 {
  1277. err = errnoErr(e1)
  1278. }
  1279. return
  1280. }
  1281. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1282. func pipe2(p *[2]_C_int, flags int) (err error) {
  1283. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  1284. if e1 != 0 {
  1285. err = errnoErr(e1)
  1286. }
  1287. return
  1288. }
  1289. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1290. func Dup2(oldfd int, newfd int) (err error) {
  1291. _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
  1292. if e1 != 0 {
  1293. err = errnoErr(e1)
  1294. }
  1295. return
  1296. }
  1297. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1298. func EpollCreate(size int) (fd int, err error) {
  1299. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
  1300. fd = int(r0)
  1301. if e1 != 0 {
  1302. err = errnoErr(e1)
  1303. }
  1304. return
  1305. }
  1306. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1307. func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1308. var _p0 unsafe.Pointer
  1309. if len(events) > 0 {
  1310. _p0 = unsafe.Pointer(&events[0])
  1311. } else {
  1312. _p0 = unsafe.Pointer(&_zero)
  1313. }
  1314. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1315. n = int(r0)
  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 Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  1323. _, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
  1324. if e1 != 0 {
  1325. err = errnoErr(e1)
  1326. }
  1327. return
  1328. }
  1329. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1330. func Fchown(fd int, uid int, gid int) (err error) {
  1331. _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
  1332. if e1 != 0 {
  1333. err = errnoErr(e1)
  1334. }
  1335. return
  1336. }
  1337. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1338. func Fstat(fd int, stat *Stat_t) (err error) {
  1339. _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1340. if e1 != 0 {
  1341. err = errnoErr(e1)
  1342. }
  1343. return
  1344. }
  1345. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1346. func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
  1347. var _p0 *byte
  1348. _p0, err = BytePtrFromString(path)
  1349. if err != nil {
  1350. return
  1351. }
  1352. _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  1353. if e1 != 0 {
  1354. err = errnoErr(e1)
  1355. }
  1356. return
  1357. }
  1358. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1359. func Ftruncate(fd int, length int64) (err error) {
  1360. _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))
  1361. if e1 != 0 {
  1362. err = errnoErr(e1)
  1363. }
  1364. return
  1365. }
  1366. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1367. func Getegid() (egid int) {
  1368. r0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0)
  1369. egid = int(r0)
  1370. return
  1371. }
  1372. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1373. func Geteuid() (euid int) {
  1374. r0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0)
  1375. euid = int(r0)
  1376. return
  1377. }
  1378. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1379. func Getgid() (gid int) {
  1380. r0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0)
  1381. gid = int(r0)
  1382. return
  1383. }
  1384. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1385. func Getuid() (uid int) {
  1386. r0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0)
  1387. uid = int(r0)
  1388. return
  1389. }
  1390. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1391. func InotifyInit() (fd int, err error) {
  1392. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
  1393. fd = int(r0)
  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 Ioperm(from int, num int, on int) (err error) {
  1401. _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
  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 Iopl(level int) (err error) {
  1409. _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
  1410. if e1 != 0 {
  1411. err = errnoErr(e1)
  1412. }
  1413. return
  1414. }
  1415. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1416. func Lchown(path string, uid int, gid int) (err error) {
  1417. var _p0 *byte
  1418. _p0, err = BytePtrFromString(path)
  1419. if err != nil {
  1420. return
  1421. }
  1422. _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  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 Lstat(path string, stat *Stat_t) (err error) {
  1430. var _p0 *byte
  1431. _p0, err = BytePtrFromString(path)
  1432. if err != nil {
  1433. return
  1434. }
  1435. _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1436. if e1 != 0 {
  1437. err = errnoErr(e1)
  1438. }
  1439. return
  1440. }
  1441. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1442. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1443. var _p0 unsafe.Pointer
  1444. if len(p) > 0 {
  1445. _p0 = unsafe.Pointer(&p[0])
  1446. } else {
  1447. _p0 = unsafe.Pointer(&_zero)
  1448. }
  1449. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  1450. n = int(r0)
  1451. if e1 != 0 {
  1452. err = errnoErr(e1)
  1453. }
  1454. return
  1455. }
  1456. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1457. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1458. var _p0 unsafe.Pointer
  1459. if len(p) > 0 {
  1460. _p0 = unsafe.Pointer(&p[0])
  1461. } else {
  1462. _p0 = unsafe.Pointer(&_zero)
  1463. }
  1464. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  1465. n = int(r0)
  1466. if e1 != 0 {
  1467. err = errnoErr(e1)
  1468. }
  1469. return
  1470. }
  1471. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1472. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1473. r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1474. written = int(r0)
  1475. if e1 != 0 {
  1476. err = errnoErr(e1)
  1477. }
  1478. return
  1479. }
  1480. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1481. func Setfsgid(gid int) (err error) {
  1482. _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
  1483. if e1 != 0 {
  1484. err = errnoErr(e1)
  1485. }
  1486. return
  1487. }
  1488. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1489. func Setfsuid(uid int) (err error) {
  1490. _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
  1491. if e1 != 0 {
  1492. err = errnoErr(e1)
  1493. }
  1494. return
  1495. }
  1496. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1497. func Setregid(rgid int, egid int) (err error) {
  1498. _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
  1499. if e1 != 0 {
  1500. err = errnoErr(e1)
  1501. }
  1502. return
  1503. }
  1504. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1505. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1506. _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1507. if e1 != 0 {
  1508. err = errnoErr(e1)
  1509. }
  1510. return
  1511. }
  1512. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1513. func Setresuid(ruid int, euid int, suid int) (err error) {
  1514. _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
  1515. if e1 != 0 {
  1516. err = errnoErr(e1)
  1517. }
  1518. return
  1519. }
  1520. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1521. func Setreuid(ruid int, euid int) (err error) {
  1522. _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
  1523. if e1 != 0 {
  1524. err = errnoErr(e1)
  1525. }
  1526. return
  1527. }
  1528. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1529. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  1530. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1531. n = int(r0)
  1532. if e1 != 0 {
  1533. err = errnoErr(e1)
  1534. }
  1535. return
  1536. }
  1537. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1538. func Stat(path string, stat *Stat_t) (err error) {
  1539. var _p0 *byte
  1540. _p0, err = BytePtrFromString(path)
  1541. if err != nil {
  1542. return
  1543. }
  1544. _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1545. if e1 != 0 {
  1546. err = errnoErr(e1)
  1547. }
  1548. return
  1549. }
  1550. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1551. func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1552. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags))
  1553. if e1 != 0 {
  1554. err = errnoErr(e1)
  1555. }
  1556. return
  1557. }
  1558. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1559. func Truncate(path string, length int64) (err error) {
  1560. var _p0 *byte
  1561. _p0, err = BytePtrFromString(path)
  1562. if err != nil {
  1563. return
  1564. }
  1565. _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
  1566. if e1 != 0 {
  1567. err = errnoErr(e1)
  1568. }
  1569. return
  1570. }
  1571. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1572. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  1573. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
  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 getgroups(n int, list *_Gid_t) (nn int, err error) {
  1581. r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1582. nn = int(r0)
  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 setgroups(n int, list *_Gid_t) (err error) {
  1590. _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1591. if e1 != 0 {
  1592. err = errnoErr(e1)
  1593. }
  1594. return
  1595. }
  1596. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1597. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1598. r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1599. n = int(r0)
  1600. if e1 != 0 {
  1601. err = errnoErr(e1)
  1602. }
  1603. return
  1604. }
  1605. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1606. func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
  1607. r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
  1608. xaddr = uintptr(r0)
  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 Pause() (err error) {
  1616. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  1617. if e1 != 0 {
  1618. err = errnoErr(e1)
  1619. }
  1620. return
  1621. }
  1622. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1623. func getrlimit(resource int, rlim *rlimit32) (err error) {
  1624. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1625. if e1 != 0 {
  1626. err = errnoErr(e1)
  1627. }
  1628. return
  1629. }
  1630. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1631. func setrlimit(resource int, rlim *rlimit32) (err error) {
  1632. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1633. if e1 != 0 {
  1634. err = errnoErr(e1)
  1635. }
  1636. return
  1637. }
  1638. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1639. func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  1640. var _p0 *byte
  1641. _p0, err = BytePtrFromString(path)
  1642. if err != nil {
  1643. return
  1644. }
  1645. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  1646. if e1 != 0 {
  1647. err = errnoErr(e1)
  1648. }
  1649. return
  1650. }
  1651. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1652. func Gettimeofday(tv *Timeval) (err error) {
  1653. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1654. if e1 != 0 {
  1655. err = errnoErr(e1)
  1656. }
  1657. return
  1658. }
  1659. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1660. func Time(t *Time_t) (tt Time_t, err error) {
  1661. r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
  1662. tt = Time_t(r0)
  1663. if e1 != 0 {
  1664. err = errnoErr(e1)
  1665. }
  1666. return
  1667. }
  1668. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1669. func Utime(path string, buf *Utimbuf) (err error) {
  1670. var _p0 *byte
  1671. _p0, err = BytePtrFromString(path)
  1672. if err != nil {
  1673. return
  1674. }
  1675. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1676. if e1 != 0 {
  1677. err = errnoErr(e1)
  1678. }
  1679. return
  1680. }
  1681. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1682. func utimes(path string, times *[2]Timeval) (err error) {
  1683. var _p0 *byte
  1684. _p0, err = BytePtrFromString(path)
  1685. if err != nil {
  1686. return
  1687. }
  1688. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  1689. if e1 != 0 {
  1690. err = errnoErr(e1)
  1691. }
  1692. return
  1693. }
  1694. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1695. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  1696. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  1697. n = int(r0)
  1698. if e1 != 0 {
  1699. err = errnoErr(e1)
  1700. }
  1701. return
  1702. }