zsyscall_linux_386.go 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629
  1. // mksyscall.pl -l32 syscall_linux.go syscall_linux_386.go
  2. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  3. // +build 386,linux
  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 linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
  12. var _p0 *byte
  13. _p0, err = BytePtrFromString(oldpath)
  14. if err != nil {
  15. return
  16. }
  17. var _p1 *byte
  18. _p1, err = BytePtrFromString(newpath)
  19. if err != nil {
  20. return
  21. }
  22. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  23. use(unsafe.Pointer(_p0))
  24. use(unsafe.Pointer(_p1))
  25. if e1 != 0 {
  26. err = errnoErr(e1)
  27. }
  28. return
  29. }
  30. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  31. func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
  32. var _p0 *byte
  33. _p0, err = BytePtrFromString(path)
  34. if err != nil {
  35. return
  36. }
  37. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
  38. use(unsafe.Pointer(_p0))
  39. fd = int(r0)
  40. if e1 != 0 {
  41. err = errnoErr(e1)
  42. }
  43. return
  44. }
  45. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  46. func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  47. var _p0 *byte
  48. _p0, err = BytePtrFromString(path)
  49. if err != nil {
  50. return
  51. }
  52. var _p1 unsafe.Pointer
  53. if len(buf) > 0 {
  54. _p1 = unsafe.Pointer(&buf[0])
  55. } else {
  56. _p1 = unsafe.Pointer(&_zero)
  57. }
  58. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  59. use(unsafe.Pointer(_p0))
  60. n = int(r0)
  61. if e1 != 0 {
  62. err = errnoErr(e1)
  63. }
  64. return
  65. }
  66. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  67. func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  68. var _p0 *byte
  69. _p0, err = BytePtrFromString(oldpath)
  70. if err != nil {
  71. return
  72. }
  73. var _p1 *byte
  74. _p1, err = BytePtrFromString(newpath)
  75. if err != nil {
  76. return
  77. }
  78. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  79. use(unsafe.Pointer(_p0))
  80. use(unsafe.Pointer(_p1))
  81. if e1 != 0 {
  82. err = errnoErr(e1)
  83. }
  84. return
  85. }
  86. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  87. func unlinkat(dirfd int, path string, flags int) (err error) {
  88. var _p0 *byte
  89. _p0, err = BytePtrFromString(path)
  90. if err != nil {
  91. return
  92. }
  93. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  94. use(unsafe.Pointer(_p0))
  95. if e1 != 0 {
  96. err = errnoErr(e1)
  97. }
  98. return
  99. }
  100. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  101. func utimes(path string, times *[2]Timeval) (err error) {
  102. var _p0 *byte
  103. _p0, err = BytePtrFromString(path)
  104. if err != nil {
  105. return
  106. }
  107. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  108. use(unsafe.Pointer(_p0))
  109. if e1 != 0 {
  110. err = errnoErr(e1)
  111. }
  112. return
  113. }
  114. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  115. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  116. var _p0 *byte
  117. _p0, err = BytePtrFromString(path)
  118. if err != nil {
  119. return
  120. }
  121. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  122. use(unsafe.Pointer(_p0))
  123. if e1 != 0 {
  124. err = errnoErr(e1)
  125. }
  126. return
  127. }
  128. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  129. func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
  130. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
  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 ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
  162. _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
  163. if e1 != 0 {
  164. err = errnoErr(e1)
  165. }
  166. return
  167. }
  168. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  169. func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
  170. var _p0 *byte
  171. _p0, err = BytePtrFromString(arg)
  172. if err != nil {
  173. return
  174. }
  175. _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
  176. use(unsafe.Pointer(_p0))
  177. if e1 != 0 {
  178. err = errnoErr(e1)
  179. }
  180. return
  181. }
  182. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  183. func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
  184. var _p0 *byte
  185. _p0, err = BytePtrFromString(source)
  186. if err != nil {
  187. return
  188. }
  189. var _p1 *byte
  190. _p1, err = BytePtrFromString(target)
  191. if err != nil {
  192. return
  193. }
  194. var _p2 *byte
  195. _p2, err = BytePtrFromString(fstype)
  196. if err != nil {
  197. return
  198. }
  199. _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
  200. use(unsafe.Pointer(_p0))
  201. use(unsafe.Pointer(_p1))
  202. use(unsafe.Pointer(_p2))
  203. if e1 != 0 {
  204. err = errnoErr(e1)
  205. }
  206. return
  207. }
  208. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  209. func Acct(path string) (err error) {
  210. var _p0 *byte
  211. _p0, err = BytePtrFromString(path)
  212. if err != nil {
  213. return
  214. }
  215. _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  216. use(unsafe.Pointer(_p0))
  217. if e1 != 0 {
  218. err = errnoErr(e1)
  219. }
  220. return
  221. }
  222. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  223. func Adjtimex(buf *Timex) (state int, err error) {
  224. r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
  225. state = int(r0)
  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 Chdir(path string) (err error) {
  233. var _p0 *byte
  234. _p0, err = BytePtrFromString(path)
  235. if err != nil {
  236. return
  237. }
  238. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  239. use(unsafe.Pointer(_p0))
  240. if e1 != 0 {
  241. err = errnoErr(e1)
  242. }
  243. return
  244. }
  245. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  246. func Chroot(path string) (err error) {
  247. var _p0 *byte
  248. _p0, err = BytePtrFromString(path)
  249. if err != nil {
  250. return
  251. }
  252. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  253. use(unsafe.Pointer(_p0))
  254. if e1 != 0 {
  255. err = errnoErr(e1)
  256. }
  257. return
  258. }
  259. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  260. func ClockGettime(clockid int32, time *Timespec) (err error) {
  261. _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 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 Close(fd int) (err error) {
  269. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  270. if e1 != 0 {
  271. err = errnoErr(e1)
  272. }
  273. return
  274. }
  275. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  276. func Dup(oldfd int) (fd int, err error) {
  277. r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
  278. fd = int(r0)
  279. if e1 != 0 {
  280. err = errnoErr(e1)
  281. }
  282. return
  283. }
  284. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  285. func Dup3(oldfd int, newfd int, flags int) (err error) {
  286. _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
  287. if e1 != 0 {
  288. err = errnoErr(e1)
  289. }
  290. return
  291. }
  292. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  293. func EpollCreate(size int) (fd int, err error) {
  294. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
  295. fd = int(r0)
  296. if e1 != 0 {
  297. err = errnoErr(e1)
  298. }
  299. return
  300. }
  301. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  302. func EpollCreate1(flag int) (fd int, err error) {
  303. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
  304. fd = int(r0)
  305. if e1 != 0 {
  306. err = errnoErr(e1)
  307. }
  308. return
  309. }
  310. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  311. func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
  312. _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
  313. if e1 != 0 {
  314. err = errnoErr(e1)
  315. }
  316. return
  317. }
  318. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  319. func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  320. var _p0 unsafe.Pointer
  321. if len(events) > 0 {
  322. _p0 = unsafe.Pointer(&events[0])
  323. } else {
  324. _p0 = unsafe.Pointer(&_zero)
  325. }
  326. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  327. n = int(r0)
  328. if e1 != 0 {
  329. err = errnoErr(e1)
  330. }
  331. return
  332. }
  333. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  334. func Exit(code int) {
  335. Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
  336. return
  337. }
  338. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  339. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  340. var _p0 *byte
  341. _p0, err = BytePtrFromString(path)
  342. if err != nil {
  343. return
  344. }
  345. _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  346. use(unsafe.Pointer(_p0))
  347. if e1 != 0 {
  348. err = errnoErr(e1)
  349. }
  350. return
  351. }
  352. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  353. func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
  354. _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
  355. if e1 != 0 {
  356. err = errnoErr(e1)
  357. }
  358. return
  359. }
  360. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  361. func Fchdir(fd int) (err error) {
  362. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  363. if e1 != 0 {
  364. err = errnoErr(e1)
  365. }
  366. return
  367. }
  368. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  369. func Fchmod(fd int, mode uint32) (err error) {
  370. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  371. if e1 != 0 {
  372. err = errnoErr(e1)
  373. }
  374. return
  375. }
  376. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  377. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  378. var _p0 *byte
  379. _p0, err = BytePtrFromString(path)
  380. if err != nil {
  381. return
  382. }
  383. _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  384. use(unsafe.Pointer(_p0))
  385. if e1 != 0 {
  386. err = errnoErr(e1)
  387. }
  388. return
  389. }
  390. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  391. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  392. var _p0 *byte
  393. _p0, err = BytePtrFromString(path)
  394. if err != nil {
  395. return
  396. }
  397. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  398. use(unsafe.Pointer(_p0))
  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 fcntl(fd int, cmd int, arg int) (val int, err error) {
  406. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  407. val = int(r0)
  408. if e1 != 0 {
  409. err = errnoErr(e1)
  410. }
  411. return
  412. }
  413. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  414. func Fdatasync(fd int) (err error) {
  415. _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
  416. if e1 != 0 {
  417. err = errnoErr(e1)
  418. }
  419. return
  420. }
  421. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  422. func Flock(fd int, how int) (err error) {
  423. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  424. if e1 != 0 {
  425. err = errnoErr(e1)
  426. }
  427. return
  428. }
  429. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  430. func Fsync(fd int) (err error) {
  431. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  432. if e1 != 0 {
  433. err = errnoErr(e1)
  434. }
  435. return
  436. }
  437. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  438. func Getdents(fd int, buf []byte) (n int, err error) {
  439. var _p0 unsafe.Pointer
  440. if len(buf) > 0 {
  441. _p0 = unsafe.Pointer(&buf[0])
  442. } else {
  443. _p0 = unsafe.Pointer(&_zero)
  444. }
  445. r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  446. n = int(r0)
  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 Getpgid(pid int) (pgid int, err error) {
  454. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  455. pgid = int(r0)
  456. if e1 != 0 {
  457. err = errnoErr(e1)
  458. }
  459. return
  460. }
  461. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  462. func Getpid() (pid int) {
  463. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  464. pid = int(r0)
  465. return
  466. }
  467. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  468. func Getppid() (ppid int) {
  469. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  470. ppid = int(r0)
  471. return
  472. }
  473. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  474. func Getpriority(which int, who int) (prio int, err error) {
  475. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  476. prio = 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 Getrusage(who int, rusage *Rusage) (err error) {
  484. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 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 Gettid() (tid int) {
  492. r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
  493. tid = int(r0)
  494. return
  495. }
  496. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  497. func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
  498. var _p0 *byte
  499. _p0, err = BytePtrFromString(path)
  500. if err != nil {
  501. return
  502. }
  503. var _p1 *byte
  504. _p1, err = BytePtrFromString(attr)
  505. if err != nil {
  506. return
  507. }
  508. var _p2 unsafe.Pointer
  509. if len(dest) > 0 {
  510. _p2 = unsafe.Pointer(&dest[0])
  511. } else {
  512. _p2 = unsafe.Pointer(&_zero)
  513. }
  514. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  515. use(unsafe.Pointer(_p0))
  516. use(unsafe.Pointer(_p1))
  517. sz = int(r0)
  518. if e1 != 0 {
  519. err = errnoErr(e1)
  520. }
  521. return
  522. }
  523. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  524. func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
  525. var _p0 *byte
  526. _p0, err = BytePtrFromString(pathname)
  527. if err != nil {
  528. return
  529. }
  530. r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
  531. use(unsafe.Pointer(_p0))
  532. watchdesc = int(r0)
  533. if e1 != 0 {
  534. err = errnoErr(e1)
  535. }
  536. return
  537. }
  538. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  539. func InotifyInit1(flags int) (fd int, err error) {
  540. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
  541. fd = int(r0)
  542. if e1 != 0 {
  543. err = errnoErr(e1)
  544. }
  545. return
  546. }
  547. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  548. func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
  549. r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
  550. success = int(r0)
  551. if e1 != 0 {
  552. err = errnoErr(e1)
  553. }
  554. return
  555. }
  556. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  557. func Kill(pid int, sig syscall.Signal) (err error) {
  558. _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
  559. if e1 != 0 {
  560. err = errnoErr(e1)
  561. }
  562. return
  563. }
  564. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  565. func Klogctl(typ int, buf []byte) (n int, err error) {
  566. var _p0 unsafe.Pointer
  567. if len(buf) > 0 {
  568. _p0 = unsafe.Pointer(&buf[0])
  569. } else {
  570. _p0 = unsafe.Pointer(&_zero)
  571. }
  572. r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
  573. n = int(r0)
  574. if e1 != 0 {
  575. err = errnoErr(e1)
  576. }
  577. return
  578. }
  579. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  580. func Listxattr(path string, dest []byte) (sz int, err error) {
  581. var _p0 *byte
  582. _p0, err = BytePtrFromString(path)
  583. if err != nil {
  584. return
  585. }
  586. var _p1 unsafe.Pointer
  587. if len(dest) > 0 {
  588. _p1 = unsafe.Pointer(&dest[0])
  589. } else {
  590. _p1 = unsafe.Pointer(&_zero)
  591. }
  592. r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  593. use(unsafe.Pointer(_p0))
  594. sz = int(r0)
  595. if e1 != 0 {
  596. err = errnoErr(e1)
  597. }
  598. return
  599. }
  600. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  601. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  602. var _p0 *byte
  603. _p0, err = BytePtrFromString(path)
  604. if err != nil {
  605. return
  606. }
  607. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  608. use(unsafe.Pointer(_p0))
  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 Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  616. var _p0 *byte
  617. _p0, err = BytePtrFromString(path)
  618. if err != nil {
  619. return
  620. }
  621. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  622. use(unsafe.Pointer(_p0))
  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 Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  630. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  631. if e1 != 0 {
  632. err = errnoErr(e1)
  633. }
  634. return
  635. }
  636. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  637. func Pause() (err error) {
  638. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  639. if e1 != 0 {
  640. err = errnoErr(e1)
  641. }
  642. return
  643. }
  644. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  645. func PivotRoot(newroot string, putold string) (err error) {
  646. var _p0 *byte
  647. _p0, err = BytePtrFromString(newroot)
  648. if err != nil {
  649. return
  650. }
  651. var _p1 *byte
  652. _p1, err = BytePtrFromString(putold)
  653. if err != nil {
  654. return
  655. }
  656. _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  657. use(unsafe.Pointer(_p0))
  658. use(unsafe.Pointer(_p1))
  659. if e1 != 0 {
  660. err = errnoErr(e1)
  661. }
  662. return
  663. }
  664. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  665. func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
  666. _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
  667. if e1 != 0 {
  668. err = errnoErr(e1)
  669. }
  670. return
  671. }
  672. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  673. func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
  674. _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  675. if e1 != 0 {
  676. err = errnoErr(e1)
  677. }
  678. return
  679. }
  680. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  681. func read(fd int, p []byte) (n int, err error) {
  682. var _p0 unsafe.Pointer
  683. if len(p) > 0 {
  684. _p0 = unsafe.Pointer(&p[0])
  685. } else {
  686. _p0 = unsafe.Pointer(&_zero)
  687. }
  688. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  689. n = int(r0)
  690. if e1 != 0 {
  691. err = errnoErr(e1)
  692. }
  693. return
  694. }
  695. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  696. func Removexattr(path string, attr string) (err error) {
  697. var _p0 *byte
  698. _p0, err = BytePtrFromString(path)
  699. if err != nil {
  700. return
  701. }
  702. var _p1 *byte
  703. _p1, err = BytePtrFromString(attr)
  704. if err != nil {
  705. return
  706. }
  707. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  708. use(unsafe.Pointer(_p0))
  709. use(unsafe.Pointer(_p1))
  710. if e1 != 0 {
  711. err = errnoErr(e1)
  712. }
  713. return
  714. }
  715. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  716. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  717. var _p0 *byte
  718. _p0, err = BytePtrFromString(oldpath)
  719. if err != nil {
  720. return
  721. }
  722. var _p1 *byte
  723. _p1, err = BytePtrFromString(newpath)
  724. if err != nil {
  725. return
  726. }
  727. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  728. use(unsafe.Pointer(_p0))
  729. use(unsafe.Pointer(_p1))
  730. if e1 != 0 {
  731. err = errnoErr(e1)
  732. }
  733. return
  734. }
  735. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  736. func Setdomainname(p []byte) (err error) {
  737. var _p0 unsafe.Pointer
  738. if len(p) > 0 {
  739. _p0 = unsafe.Pointer(&p[0])
  740. } else {
  741. _p0 = unsafe.Pointer(&_zero)
  742. }
  743. _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
  744. if e1 != 0 {
  745. err = errnoErr(e1)
  746. }
  747. return
  748. }
  749. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  750. func Sethostname(p []byte) (err error) {
  751. var _p0 unsafe.Pointer
  752. if len(p) > 0 {
  753. _p0 = unsafe.Pointer(&p[0])
  754. } else {
  755. _p0 = unsafe.Pointer(&_zero)
  756. }
  757. _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
  758. if e1 != 0 {
  759. err = errnoErr(e1)
  760. }
  761. return
  762. }
  763. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  764. func Setpgid(pid int, pgid int) (err error) {
  765. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  766. if e1 != 0 {
  767. err = errnoErr(e1)
  768. }
  769. return
  770. }
  771. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  772. func Setsid() (pid int, err error) {
  773. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  774. pid = int(r0)
  775. if e1 != 0 {
  776. err = errnoErr(e1)
  777. }
  778. return
  779. }
  780. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  781. func Settimeofday(tv *Timeval) (err error) {
  782. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  783. if e1 != 0 {
  784. err = errnoErr(e1)
  785. }
  786. return
  787. }
  788. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  789. func Setpriority(which int, who int, prio int) (err error) {
  790. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  791. if e1 != 0 {
  792. err = errnoErr(e1)
  793. }
  794. return
  795. }
  796. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  797. func Setxattr(path string, attr string, data []byte, flags int) (err error) {
  798. var _p0 *byte
  799. _p0, err = BytePtrFromString(path)
  800. if err != nil {
  801. return
  802. }
  803. var _p1 *byte
  804. _p1, err = BytePtrFromString(attr)
  805. if err != nil {
  806. return
  807. }
  808. var _p2 unsafe.Pointer
  809. if len(data) > 0 {
  810. _p2 = unsafe.Pointer(&data[0])
  811. } else {
  812. _p2 = unsafe.Pointer(&_zero)
  813. }
  814. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  815. use(unsafe.Pointer(_p0))
  816. use(unsafe.Pointer(_p1))
  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 Sync() {
  824. Syscall(SYS_SYNC, 0, 0, 0)
  825. return
  826. }
  827. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  828. func Sysinfo(info *Sysinfo_t) (err error) {
  829. _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
  830. if e1 != 0 {
  831. err = errnoErr(e1)
  832. }
  833. return
  834. }
  835. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  836. func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
  837. r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  838. n = int64(int64(r1)<<32 | int64(r0))
  839. if e1 != 0 {
  840. err = errnoErr(e1)
  841. }
  842. return
  843. }
  844. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  845. func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
  846. _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
  847. if e1 != 0 {
  848. err = errnoErr(e1)
  849. }
  850. return
  851. }
  852. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  853. func Times(tms *Tms) (ticks uintptr, err error) {
  854. r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
  855. ticks = uintptr(r0)
  856. if e1 != 0 {
  857. err = errnoErr(e1)
  858. }
  859. return
  860. }
  861. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  862. func Umask(mask int) (oldmask int) {
  863. r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
  864. oldmask = int(r0)
  865. return
  866. }
  867. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  868. func Uname(buf *Utsname) (err error) {
  869. _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
  870. if e1 != 0 {
  871. err = errnoErr(e1)
  872. }
  873. return
  874. }
  875. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  876. func Unmount(target string, flags int) (err error) {
  877. var _p0 *byte
  878. _p0, err = BytePtrFromString(target)
  879. if err != nil {
  880. return
  881. }
  882. _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  883. use(unsafe.Pointer(_p0))
  884. if e1 != 0 {
  885. err = errnoErr(e1)
  886. }
  887. return
  888. }
  889. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  890. func Unshare(flags int) (err error) {
  891. _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
  892. if e1 != 0 {
  893. err = errnoErr(e1)
  894. }
  895. return
  896. }
  897. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  898. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  899. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
  900. if e1 != 0 {
  901. err = errnoErr(e1)
  902. }
  903. return
  904. }
  905. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  906. func Utime(path string, buf *Utimbuf) (err error) {
  907. var _p0 *byte
  908. _p0, err = BytePtrFromString(path)
  909. if err != nil {
  910. return
  911. }
  912. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  913. use(unsafe.Pointer(_p0))
  914. if e1 != 0 {
  915. err = errnoErr(e1)
  916. }
  917. return
  918. }
  919. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  920. func write(fd int, p []byte) (n int, err error) {
  921. var _p0 unsafe.Pointer
  922. if len(p) > 0 {
  923. _p0 = unsafe.Pointer(&p[0])
  924. } else {
  925. _p0 = unsafe.Pointer(&_zero)
  926. }
  927. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  928. n = int(r0)
  929. if e1 != 0 {
  930. err = errnoErr(e1)
  931. }
  932. return
  933. }
  934. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  935. func exitThread(code int) (err error) {
  936. _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
  937. if e1 != 0 {
  938. err = errnoErr(e1)
  939. }
  940. return
  941. }
  942. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  943. func readlen(fd int, p *byte, np int) (n int, err error) {
  944. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  945. n = int(r0)
  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 writelen(fd int, p *byte, np int) (n int, err error) {
  953. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  954. n = int(r0)
  955. if e1 != 0 {
  956. err = errnoErr(e1)
  957. }
  958. return
  959. }
  960. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  961. func munmap(addr uintptr, length uintptr) (err error) {
  962. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  963. if e1 != 0 {
  964. err = errnoErr(e1)
  965. }
  966. return
  967. }
  968. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  969. func Madvise(b []byte, advice int) (err error) {
  970. var _p0 unsafe.Pointer
  971. if len(b) > 0 {
  972. _p0 = unsafe.Pointer(&b[0])
  973. } else {
  974. _p0 = unsafe.Pointer(&_zero)
  975. }
  976. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
  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 Mprotect(b []byte, prot int) (err error) {
  984. var _p0 unsafe.Pointer
  985. if len(b) > 0 {
  986. _p0 = unsafe.Pointer(&b[0])
  987. } else {
  988. _p0 = unsafe.Pointer(&_zero)
  989. }
  990. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  991. if e1 != 0 {
  992. err = errnoErr(e1)
  993. }
  994. return
  995. }
  996. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  997. func Mlock(b []byte) (err error) {
  998. var _p0 unsafe.Pointer
  999. if len(b) > 0 {
  1000. _p0 = unsafe.Pointer(&b[0])
  1001. } else {
  1002. _p0 = unsafe.Pointer(&_zero)
  1003. }
  1004. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1005. if e1 != 0 {
  1006. err = errnoErr(e1)
  1007. }
  1008. return
  1009. }
  1010. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1011. func Munlock(b []byte) (err error) {
  1012. var _p0 unsafe.Pointer
  1013. if len(b) > 0 {
  1014. _p0 = unsafe.Pointer(&b[0])
  1015. } else {
  1016. _p0 = unsafe.Pointer(&_zero)
  1017. }
  1018. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1019. if e1 != 0 {
  1020. err = errnoErr(e1)
  1021. }
  1022. return
  1023. }
  1024. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1025. func Mlockall(flags int) (err error) {
  1026. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  1027. if e1 != 0 {
  1028. err = errnoErr(e1)
  1029. }
  1030. return
  1031. }
  1032. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1033. func Munlockall() (err error) {
  1034. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  1035. if e1 != 0 {
  1036. err = errnoErr(e1)
  1037. }
  1038. return
  1039. }
  1040. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1041. func pipe(p *[2]_C_int) (err error) {
  1042. _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
  1043. if e1 != 0 {
  1044. err = errnoErr(e1)
  1045. }
  1046. return
  1047. }
  1048. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1049. func pipe2(p *[2]_C_int, flags int) (err error) {
  1050. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 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 Dup2(oldfd int, newfd int) (err error) {
  1058. _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 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 Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  1066. _, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
  1067. if e1 != 0 {
  1068. err = errnoErr(e1)
  1069. }
  1070. return
  1071. }
  1072. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1073. func Fchown(fd int, uid int, gid int) (err error) {
  1074. _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
  1075. if e1 != 0 {
  1076. err = errnoErr(e1)
  1077. }
  1078. return
  1079. }
  1080. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1081. func Fstat(fd int, stat *Stat_t) (err error) {
  1082. _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1083. if e1 != 0 {
  1084. err = errnoErr(e1)
  1085. }
  1086. return
  1087. }
  1088. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1089. func Ftruncate(fd int, length int64) (err error) {
  1090. _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))
  1091. if e1 != 0 {
  1092. err = errnoErr(e1)
  1093. }
  1094. return
  1095. }
  1096. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1097. func Getegid() (egid int) {
  1098. r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
  1099. egid = int(r0)
  1100. return
  1101. }
  1102. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1103. func Geteuid() (euid int) {
  1104. r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0)
  1105. euid = int(r0)
  1106. return
  1107. }
  1108. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1109. func Getgid() (gid int) {
  1110. r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0)
  1111. gid = int(r0)
  1112. return
  1113. }
  1114. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1115. func Getuid() (uid int) {
  1116. r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0)
  1117. uid = int(r0)
  1118. return
  1119. }
  1120. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1121. func InotifyInit() (fd int, err error) {
  1122. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
  1123. fd = int(r0)
  1124. if e1 != 0 {
  1125. err = errnoErr(e1)
  1126. }
  1127. return
  1128. }
  1129. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1130. func Ioperm(from int, num int, on int) (err error) {
  1131. _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
  1132. if e1 != 0 {
  1133. err = errnoErr(e1)
  1134. }
  1135. return
  1136. }
  1137. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1138. func Iopl(level int) (err error) {
  1139. _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
  1140. if e1 != 0 {
  1141. err = errnoErr(e1)
  1142. }
  1143. return
  1144. }
  1145. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1146. func Lchown(path string, uid int, gid int) (err error) {
  1147. var _p0 *byte
  1148. _p0, err = BytePtrFromString(path)
  1149. if err != nil {
  1150. return
  1151. }
  1152. _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1153. use(unsafe.Pointer(_p0))
  1154. if e1 != 0 {
  1155. err = errnoErr(e1)
  1156. }
  1157. return
  1158. }
  1159. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1160. func Lstat(path string, stat *Stat_t) (err error) {
  1161. var _p0 *byte
  1162. _p0, err = BytePtrFromString(path)
  1163. if err != nil {
  1164. return
  1165. }
  1166. _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1167. use(unsafe.Pointer(_p0))
  1168. if e1 != 0 {
  1169. err = errnoErr(e1)
  1170. }
  1171. return
  1172. }
  1173. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1174. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1175. var _p0 unsafe.Pointer
  1176. if len(p) > 0 {
  1177. _p0 = unsafe.Pointer(&p[0])
  1178. } else {
  1179. _p0 = unsafe.Pointer(&_zero)
  1180. }
  1181. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  1182. n = int(r0)
  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 Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1190. var _p0 unsafe.Pointer
  1191. if len(p) > 0 {
  1192. _p0 = unsafe.Pointer(&p[0])
  1193. } else {
  1194. _p0 = unsafe.Pointer(&_zero)
  1195. }
  1196. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  1197. n = int(r0)
  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 sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1205. r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1206. written = int(r0)
  1207. if e1 != 0 {
  1208. err = errnoErr(e1)
  1209. }
  1210. return
  1211. }
  1212. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1213. func Setfsgid(gid int) (err error) {
  1214. _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
  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 Setfsuid(uid int) (err error) {
  1222. _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
  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 Setregid(rgid int, egid int) (err error) {
  1230. _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
  1231. if e1 != 0 {
  1232. err = errnoErr(e1)
  1233. }
  1234. return
  1235. }
  1236. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1237. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1238. _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1239. if e1 != 0 {
  1240. err = errnoErr(e1)
  1241. }
  1242. return
  1243. }
  1244. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1245. func Setresuid(ruid int, euid int, suid int) (err error) {
  1246. _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
  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 Setreuid(ruid int, euid int) (err error) {
  1254. _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 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 Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  1262. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1263. n = int(r0)
  1264. if e1 != 0 {
  1265. err = errnoErr(e1)
  1266. }
  1267. return
  1268. }
  1269. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1270. func Stat(path string, stat *Stat_t) (err error) {
  1271. var _p0 *byte
  1272. _p0, err = BytePtrFromString(path)
  1273. if err != nil {
  1274. return
  1275. }
  1276. _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1277. use(unsafe.Pointer(_p0))
  1278. if e1 != 0 {
  1279. err = errnoErr(e1)
  1280. }
  1281. return
  1282. }
  1283. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1284. func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1285. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags))
  1286. if e1 != 0 {
  1287. err = errnoErr(e1)
  1288. }
  1289. return
  1290. }
  1291. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1292. func Truncate(path string, length int64) (err error) {
  1293. var _p0 *byte
  1294. _p0, err = BytePtrFromString(path)
  1295. if err != nil {
  1296. return
  1297. }
  1298. _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
  1299. use(unsafe.Pointer(_p0))
  1300. if e1 != 0 {
  1301. err = errnoErr(e1)
  1302. }
  1303. return
  1304. }
  1305. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1306. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1307. r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1308. nn = int(r0)
  1309. if e1 != 0 {
  1310. err = errnoErr(e1)
  1311. }
  1312. return
  1313. }
  1314. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1315. func setgroups(n int, list *_Gid_t) (err error) {
  1316. _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1317. if e1 != 0 {
  1318. err = errnoErr(e1)
  1319. }
  1320. return
  1321. }
  1322. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1323. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1324. r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1325. n = int(r0)
  1326. if e1 != 0 {
  1327. err = errnoErr(e1)
  1328. }
  1329. return
  1330. }
  1331. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1332. func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
  1333. r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
  1334. xaddr = uintptr(r0)
  1335. if e1 != 0 {
  1336. err = errnoErr(e1)
  1337. }
  1338. return
  1339. }
  1340. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1341. func getrlimit(resource int, rlim *rlimit32) (err error) {
  1342. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1343. if e1 != 0 {
  1344. err = errnoErr(e1)
  1345. }
  1346. return
  1347. }
  1348. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1349. func setrlimit(resource int, rlim *rlimit32) (err error) {
  1350. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1351. if e1 != 0 {
  1352. err = errnoErr(e1)
  1353. }
  1354. return
  1355. }
  1356. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1357. func Gettimeofday(tv *Timeval) (err error) {
  1358. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1359. if e1 != 0 {
  1360. err = errnoErr(e1)
  1361. }
  1362. return
  1363. }
  1364. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1365. func Time(t *Time_t) (tt Time_t, err error) {
  1366. r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
  1367. tt = Time_t(r0)
  1368. if e1 != 0 {
  1369. err = errnoErr(e1)
  1370. }
  1371. return
  1372. }