zsyscall_linux_sparc64.go 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846
  1. // mksyscall.pl syscall_linux.go syscall_linux_sparc64.go
  2. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  3. // +build sparc64,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(len), 0, 0)
  349. if e1 != 0 {
  350. err = errnoErr(e1)
  351. }
  352. return
  353. }
  354. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  355. func 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, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  841. n = 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 EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1031. var _p0 unsafe.Pointer
  1032. if len(events) > 0 {
  1033. _p0 = unsafe.Pointer(&events[0])
  1034. } else {
  1035. _p0 = unsafe.Pointer(&_zero)
  1036. }
  1037. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1038. n = int(r0)
  1039. if e1 != 0 {
  1040. err = errnoErr(e1)
  1041. }
  1042. return
  1043. }
  1044. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1045. func Dup2(oldfd int, newfd int) (err error) {
  1046. _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
  1047. if e1 != 0 {
  1048. err = errnoErr(e1)
  1049. }
  1050. return
  1051. }
  1052. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1053. func Fchown(fd int, uid int, gid int) (err error) {
  1054. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  1055. if e1 != 0 {
  1056. err = errnoErr(e1)
  1057. }
  1058. return
  1059. }
  1060. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1061. func Fstat(fd int, stat *Stat_t) (err error) {
  1062. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1063. if e1 != 0 {
  1064. err = errnoErr(e1)
  1065. }
  1066. return
  1067. }
  1068. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1069. func Fstatfs(fd int, buf *Statfs_t) (err error) {
  1070. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1071. if e1 != 0 {
  1072. err = errnoErr(e1)
  1073. }
  1074. return
  1075. }
  1076. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1077. func Ftruncate(fd int, length int64) (err error) {
  1078. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1079. if e1 != 0 {
  1080. err = errnoErr(e1)
  1081. }
  1082. return
  1083. }
  1084. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1085. func Getegid() (egid int) {
  1086. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  1087. egid = int(r0)
  1088. return
  1089. }
  1090. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1091. func Geteuid() (euid int) {
  1092. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  1093. euid = int(r0)
  1094. return
  1095. }
  1096. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1097. func Getgid() (gid int) {
  1098. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  1099. gid = int(r0)
  1100. return
  1101. }
  1102. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1103. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1104. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1105. if e1 != 0 {
  1106. err = errnoErr(e1)
  1107. }
  1108. return
  1109. }
  1110. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1111. func Getuid() (uid int) {
  1112. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  1113. uid = int(r0)
  1114. return
  1115. }
  1116. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1117. func InotifyInit() (fd int, err error) {
  1118. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
  1119. fd = int(r0)
  1120. if e1 != 0 {
  1121. err = errnoErr(e1)
  1122. }
  1123. return
  1124. }
  1125. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1126. func Lchown(path string, uid int, gid int) (err error) {
  1127. var _p0 *byte
  1128. _p0, err = BytePtrFromString(path)
  1129. if err != nil {
  1130. return
  1131. }
  1132. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1133. use(unsafe.Pointer(_p0))
  1134. if e1 != 0 {
  1135. err = errnoErr(e1)
  1136. }
  1137. return
  1138. }
  1139. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1140. func Listen(s int, n int) (err error) {
  1141. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  1142. if e1 != 0 {
  1143. err = errnoErr(e1)
  1144. }
  1145. return
  1146. }
  1147. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1148. func Lstat(path string, stat *Stat_t) (err error) {
  1149. var _p0 *byte
  1150. _p0, err = BytePtrFromString(path)
  1151. if err != nil {
  1152. return
  1153. }
  1154. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1155. use(unsafe.Pointer(_p0))
  1156. if e1 != 0 {
  1157. err = errnoErr(e1)
  1158. }
  1159. return
  1160. }
  1161. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1162. func Pause() (err error) {
  1163. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  1164. if e1 != 0 {
  1165. err = errnoErr(e1)
  1166. }
  1167. return
  1168. }
  1169. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1170. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1171. var _p0 unsafe.Pointer
  1172. if len(p) > 0 {
  1173. _p0 = unsafe.Pointer(&p[0])
  1174. } else {
  1175. _p0 = unsafe.Pointer(&_zero)
  1176. }
  1177. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1178. n = int(r0)
  1179. if e1 != 0 {
  1180. err = errnoErr(e1)
  1181. }
  1182. return
  1183. }
  1184. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1185. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1186. var _p0 unsafe.Pointer
  1187. if len(p) > 0 {
  1188. _p0 = unsafe.Pointer(&p[0])
  1189. } else {
  1190. _p0 = unsafe.Pointer(&_zero)
  1191. }
  1192. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1193. n = int(r0)
  1194. if e1 != 0 {
  1195. err = errnoErr(e1)
  1196. }
  1197. return
  1198. }
  1199. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1200. func Seek(fd int, offset int64, whence int) (off int64, err error) {
  1201. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1202. off = int64(r0)
  1203. if e1 != 0 {
  1204. err = errnoErr(e1)
  1205. }
  1206. return
  1207. }
  1208. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1209. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1210. r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1211. n = int(r0)
  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 sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1219. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1220. written = int(r0)
  1221. if e1 != 0 {
  1222. err = errnoErr(e1)
  1223. }
  1224. return
  1225. }
  1226. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1227. func Setfsgid(gid int) (err error) {
  1228. _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  1229. if e1 != 0 {
  1230. err = errnoErr(e1)
  1231. }
  1232. return
  1233. }
  1234. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1235. func Setfsuid(uid int) (err error) {
  1236. _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  1237. if e1 != 0 {
  1238. err = errnoErr(e1)
  1239. }
  1240. return
  1241. }
  1242. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1243. func Setregid(rgid int, egid int) (err error) {
  1244. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1245. if e1 != 0 {
  1246. err = errnoErr(e1)
  1247. }
  1248. return
  1249. }
  1250. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1251. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1252. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  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 Setresuid(ruid int, euid int, suid int) (err error) {
  1260. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1261. if e1 != 0 {
  1262. err = errnoErr(e1)
  1263. }
  1264. return
  1265. }
  1266. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1267. func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1268. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1269. if e1 != 0 {
  1270. err = errnoErr(e1)
  1271. }
  1272. return
  1273. }
  1274. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1275. func Setreuid(ruid int, euid int) (err error) {
  1276. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1277. if e1 != 0 {
  1278. err = errnoErr(e1)
  1279. }
  1280. return
  1281. }
  1282. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1283. func Shutdown(fd int, how int) (err error) {
  1284. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  1285. if e1 != 0 {
  1286. err = errnoErr(e1)
  1287. }
  1288. return
  1289. }
  1290. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1291. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1292. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1293. n = int64(r0)
  1294. if e1 != 0 {
  1295. err = errnoErr(e1)
  1296. }
  1297. return
  1298. }
  1299. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1300. func Stat(path string, stat *Stat_t) (err error) {
  1301. var _p0 *byte
  1302. _p0, err = BytePtrFromString(path)
  1303. if err != nil {
  1304. return
  1305. }
  1306. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1307. use(unsafe.Pointer(_p0))
  1308. if e1 != 0 {
  1309. err = errnoErr(e1)
  1310. }
  1311. return
  1312. }
  1313. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1314. func Statfs(path string, buf *Statfs_t) (err error) {
  1315. var _p0 *byte
  1316. _p0, err = BytePtrFromString(path)
  1317. if err != nil {
  1318. return
  1319. }
  1320. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1321. use(unsafe.Pointer(_p0))
  1322. if e1 != 0 {
  1323. err = errnoErr(e1)
  1324. }
  1325. return
  1326. }
  1327. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1328. func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1329. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
  1330. if e1 != 0 {
  1331. err = errnoErr(e1)
  1332. }
  1333. return
  1334. }
  1335. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1336. func Truncate(path string, length int64) (err error) {
  1337. var _p0 *byte
  1338. _p0, err = BytePtrFromString(path)
  1339. if err != nil {
  1340. return
  1341. }
  1342. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1343. use(unsafe.Pointer(_p0))
  1344. if e1 != 0 {
  1345. err = errnoErr(e1)
  1346. }
  1347. return
  1348. }
  1349. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1350. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1351. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1352. fd = int(r0)
  1353. if e1 != 0 {
  1354. err = errnoErr(e1)
  1355. }
  1356. return
  1357. }
  1358. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1359. func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1360. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1361. fd = int(r0)
  1362. if e1 != 0 {
  1363. err = errnoErr(e1)
  1364. }
  1365. return
  1366. }
  1367. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1368. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1369. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  1370. if e1 != 0 {
  1371. err = errnoErr(e1)
  1372. }
  1373. return
  1374. }
  1375. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1376. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1377. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1378. if e1 != 0 {
  1379. err = errnoErr(e1)
  1380. }
  1381. return
  1382. }
  1383. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1384. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1385. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1386. nn = int(r0)
  1387. if e1 != 0 {
  1388. err = errnoErr(e1)
  1389. }
  1390. return
  1391. }
  1392. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1393. func setgroups(n int, list *_Gid_t) (err error) {
  1394. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1395. if e1 != 0 {
  1396. err = errnoErr(e1)
  1397. }
  1398. return
  1399. }
  1400. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1401. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1402. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1403. if e1 != 0 {
  1404. err = errnoErr(e1)
  1405. }
  1406. return
  1407. }
  1408. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1409. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1410. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1411. if e1 != 0 {
  1412. err = errnoErr(e1)
  1413. }
  1414. return
  1415. }
  1416. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1417. func socket(domain int, typ int, proto int) (fd int, err error) {
  1418. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  1419. fd = int(r0)
  1420. if e1 != 0 {
  1421. err = errnoErr(e1)
  1422. }
  1423. return
  1424. }
  1425. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1426. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1427. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1428. if e1 != 0 {
  1429. err = errnoErr(e1)
  1430. }
  1431. return
  1432. }
  1433. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1434. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1435. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1436. if e1 != 0 {
  1437. err = errnoErr(e1)
  1438. }
  1439. return
  1440. }
  1441. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1442. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1443. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1444. if e1 != 0 {
  1445. err = errnoErr(e1)
  1446. }
  1447. return
  1448. }
  1449. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1450. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1451. var _p0 unsafe.Pointer
  1452. if len(p) > 0 {
  1453. _p0 = unsafe.Pointer(&p[0])
  1454. } else {
  1455. _p0 = unsafe.Pointer(&_zero)
  1456. }
  1457. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1458. n = int(r0)
  1459. if e1 != 0 {
  1460. err = errnoErr(e1)
  1461. }
  1462. return
  1463. }
  1464. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1465. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1466. var _p0 unsafe.Pointer
  1467. if len(buf) > 0 {
  1468. _p0 = unsafe.Pointer(&buf[0])
  1469. } else {
  1470. _p0 = unsafe.Pointer(&_zero)
  1471. }
  1472. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1473. if e1 != 0 {
  1474. err = errnoErr(e1)
  1475. }
  1476. return
  1477. }
  1478. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1479. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1480. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1481. n = int(r0)
  1482. if e1 != 0 {
  1483. err = errnoErr(e1)
  1484. }
  1485. return
  1486. }
  1487. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1488. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1489. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1490. n = int(r0)
  1491. if e1 != 0 {
  1492. err = errnoErr(e1)
  1493. }
  1494. return
  1495. }
  1496. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1497. func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  1498. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  1499. xaddr = uintptr(r0)
  1500. if e1 != 0 {
  1501. err = errnoErr(e1)
  1502. }
  1503. return
  1504. }
  1505. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1506. func Gettimeofday(tv *Timeval) (err error) {
  1507. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1508. if e1 != 0 {
  1509. err = errnoErr(e1)
  1510. }
  1511. return
  1512. }
  1513. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1514. func Utime(path string, buf *Utimbuf) (err error) {
  1515. var _p0 *byte
  1516. _p0, err = BytePtrFromString(path)
  1517. if err != nil {
  1518. return
  1519. }
  1520. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1521. use(unsafe.Pointer(_p0))
  1522. if e1 != 0 {
  1523. err = errnoErr(e1)
  1524. }
  1525. return
  1526. }
  1527. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1528. func pipe(p *[2]_C_int) (err error) {
  1529. _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
  1530. if e1 != 0 {
  1531. err = errnoErr(e1)
  1532. }
  1533. return
  1534. }
  1535. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1536. func pipe2(p *[2]_C_int, flags int) (err error) {
  1537. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  1538. if e1 != 0 {
  1539. err = errnoErr(e1)
  1540. }
  1541. return
  1542. }
  1543. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1544. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  1545. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  1546. n = int(r0)
  1547. if e1 != 0 {
  1548. err = errnoErr(e1)
  1549. }
  1550. return
  1551. }