zsyscall_linux_386.go 39 KB

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