zsyscall_linux_ppc.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  1. // go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. //go:build linux && ppc
  4. // +build linux,ppc
  5. package unix
  6. import (
  7. "syscall"
  8. "unsafe"
  9. )
  10. var _ syscall.Errno
  11. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  12. func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
  13. _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
  14. if e1 != 0 {
  15. err = errnoErr(e1)
  16. }
  17. return
  18. }
  19. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  20. func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
  21. _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off>>32), uintptr(off), uintptr(len>>32), uintptr(len))
  22. if e1 != 0 {
  23. err = errnoErr(e1)
  24. }
  25. return
  26. }
  27. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  28. func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
  29. r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  30. n = int64(int64(r0)<<32 | int64(r1))
  31. if e1 != 0 {
  32. err = errnoErr(e1)
  33. }
  34. return
  35. }
  36. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  37. func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  38. var _p0 unsafe.Pointer
  39. if len(events) > 0 {
  40. _p0 = unsafe.Pointer(&events[0])
  41. } else {
  42. _p0 = unsafe.Pointer(&_zero)
  43. }
  44. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  45. n = int(r0)
  46. if e1 != 0 {
  47. err = errnoErr(e1)
  48. }
  49. return
  50. }
  51. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  52. func Fchown(fd int, uid int, gid int) (err error) {
  53. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  54. if e1 != 0 {
  55. err = errnoErr(e1)
  56. }
  57. return
  58. }
  59. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  60. func Fstat(fd int, stat *Stat_t) (err error) {
  61. _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  62. if e1 != 0 {
  63. err = errnoErr(e1)
  64. }
  65. return
  66. }
  67. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  68. func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
  69. var _p0 *byte
  70. _p0, err = BytePtrFromString(path)
  71. if err != nil {
  72. return
  73. }
  74. _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  75. if e1 != 0 {
  76. err = errnoErr(e1)
  77. }
  78. return
  79. }
  80. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  81. func Ftruncate(fd int, length int64) (err error) {
  82. _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length>>32), uintptr(length))
  83. if e1 != 0 {
  84. err = errnoErr(e1)
  85. }
  86. return
  87. }
  88. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  89. func Getegid() (egid int) {
  90. r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
  91. egid = int(r0)
  92. return
  93. }
  94. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  95. func Geteuid() (euid int) {
  96. r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
  97. euid = int(r0)
  98. return
  99. }
  100. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  101. func Getgid() (gid int) {
  102. r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
  103. gid = int(r0)
  104. return
  105. }
  106. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  107. func Getuid() (uid int) {
  108. r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
  109. uid = int(r0)
  110. return
  111. }
  112. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  113. func Ioperm(from int, num int, on int) (err error) {
  114. _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
  115. if e1 != 0 {
  116. err = errnoErr(e1)
  117. }
  118. return
  119. }
  120. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  121. func Iopl(level int) (err error) {
  122. _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
  123. if e1 != 0 {
  124. err = errnoErr(e1)
  125. }
  126. return
  127. }
  128. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  129. func Lchown(path string, uid int, gid int) (err error) {
  130. var _p0 *byte
  131. _p0, err = BytePtrFromString(path)
  132. if err != nil {
  133. return
  134. }
  135. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  136. if e1 != 0 {
  137. err = errnoErr(e1)
  138. }
  139. return
  140. }
  141. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  142. func Listen(s int, n int) (err error) {
  143. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  144. if e1 != 0 {
  145. err = errnoErr(e1)
  146. }
  147. return
  148. }
  149. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  150. func Lstat(path string, stat *Stat_t) (err error) {
  151. var _p0 *byte
  152. _p0, err = BytePtrFromString(path)
  153. if err != nil {
  154. return
  155. }
  156. _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  157. if e1 != 0 {
  158. err = errnoErr(e1)
  159. }
  160. return
  161. }
  162. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  163. func Pause() (err error) {
  164. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  165. if e1 != 0 {
  166. err = errnoErr(e1)
  167. }
  168. return
  169. }
  170. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  171. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  172. var _p0 unsafe.Pointer
  173. if len(p) > 0 {
  174. _p0 = unsafe.Pointer(&p[0])
  175. } else {
  176. _p0 = unsafe.Pointer(&_zero)
  177. }
  178. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset>>32), uintptr(offset), 0)
  179. n = int(r0)
  180. if e1 != 0 {
  181. err = errnoErr(e1)
  182. }
  183. return
  184. }
  185. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  186. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  187. var _p0 unsafe.Pointer
  188. if len(p) > 0 {
  189. _p0 = unsafe.Pointer(&p[0])
  190. } else {
  191. _p0 = unsafe.Pointer(&_zero)
  192. }
  193. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset>>32), uintptr(offset), 0)
  194. n = int(r0)
  195. if e1 != 0 {
  196. err = errnoErr(e1)
  197. }
  198. return
  199. }
  200. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  201. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  202. var _p0 *byte
  203. _p0, err = BytePtrFromString(oldpath)
  204. if err != nil {
  205. return
  206. }
  207. var _p1 *byte
  208. _p1, err = BytePtrFromString(newpath)
  209. if err != nil {
  210. return
  211. }
  212. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  213. if e1 != 0 {
  214. err = errnoErr(e1)
  215. }
  216. return
  217. }
  218. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  219. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  220. r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  221. n = int(r0)
  222. if e1 != 0 {
  223. err = errnoErr(e1)
  224. }
  225. return
  226. }
  227. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  228. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  229. r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  230. written = int(r0)
  231. if e1 != 0 {
  232. err = errnoErr(e1)
  233. }
  234. return
  235. }
  236. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  237. func setfsgid(gid int) (prev int, err error) {
  238. r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  239. prev = int(r0)
  240. if e1 != 0 {
  241. err = errnoErr(e1)
  242. }
  243. return
  244. }
  245. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  246. func setfsuid(uid int) (prev int, err error) {
  247. r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  248. prev = int(r0)
  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 Setregid(rgid int, egid int) (err error) {
  256. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  257. if e1 != 0 {
  258. err = errnoErr(e1)
  259. }
  260. return
  261. }
  262. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  263. func Setresgid(rgid int, egid int, sgid int) (err error) {
  264. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  265. if e1 != 0 {
  266. err = errnoErr(e1)
  267. }
  268. return
  269. }
  270. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  271. func Setresuid(ruid int, euid int, suid int) (err error) {
  272. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  273. if e1 != 0 {
  274. err = errnoErr(e1)
  275. }
  276. return
  277. }
  278. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  279. func Setreuid(ruid int, euid int) (err error) {
  280. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  281. if e1 != 0 {
  282. err = errnoErr(e1)
  283. }
  284. return
  285. }
  286. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  287. func Shutdown(fd int, how int) (err error) {
  288. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  289. if e1 != 0 {
  290. err = errnoErr(e1)
  291. }
  292. return
  293. }
  294. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  295. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  296. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  297. n = int(r0)
  298. if e1 != 0 {
  299. err = errnoErr(e1)
  300. }
  301. return
  302. }
  303. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  304. func Stat(path string, stat *Stat_t) (err error) {
  305. var _p0 *byte
  306. _p0, err = BytePtrFromString(path)
  307. if err != nil {
  308. return
  309. }
  310. _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  311. if e1 != 0 {
  312. err = errnoErr(e1)
  313. }
  314. return
  315. }
  316. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  317. func Truncate(path string, length int64) (err error) {
  318. var _p0 *byte
  319. _p0, err = BytePtrFromString(path)
  320. if err != nil {
  321. return
  322. }
  323. _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length>>32), uintptr(length))
  324. if e1 != 0 {
  325. err = errnoErr(e1)
  326. }
  327. return
  328. }
  329. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  330. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  331. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
  332. if e1 != 0 {
  333. err = errnoErr(e1)
  334. }
  335. return
  336. }
  337. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  338. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  339. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  340. fd = int(r0)
  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 accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  348. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  349. fd = int(r0)
  350. if e1 != 0 {
  351. err = errnoErr(e1)
  352. }
  353. return
  354. }
  355. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  356. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  357. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  358. if e1 != 0 {
  359. err = errnoErr(e1)
  360. }
  361. return
  362. }
  363. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  364. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  365. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  366. if e1 != 0 {
  367. err = errnoErr(e1)
  368. }
  369. return
  370. }
  371. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  372. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  373. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  374. nn = int(r0)
  375. if e1 != 0 {
  376. err = errnoErr(e1)
  377. }
  378. return
  379. }
  380. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  381. func setgroups(n int, list *_Gid_t) (err error) {
  382. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  383. if e1 != 0 {
  384. err = errnoErr(e1)
  385. }
  386. return
  387. }
  388. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  389. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  390. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  391. if e1 != 0 {
  392. err = errnoErr(e1)
  393. }
  394. return
  395. }
  396. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  397. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  398. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  399. if e1 != 0 {
  400. err = errnoErr(e1)
  401. }
  402. return
  403. }
  404. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  405. func socket(domain int, typ int, proto int) (fd int, err error) {
  406. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  407. fd = int(r0)
  408. if e1 != 0 {
  409. err = errnoErr(e1)
  410. }
  411. return
  412. }
  413. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  414. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  415. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  416. if e1 != 0 {
  417. err = errnoErr(e1)
  418. }
  419. return
  420. }
  421. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  422. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  423. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  424. if e1 != 0 {
  425. err = errnoErr(e1)
  426. }
  427. return
  428. }
  429. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  430. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  431. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  432. if e1 != 0 {
  433. err = errnoErr(e1)
  434. }
  435. return
  436. }
  437. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  438. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  439. var _p0 unsafe.Pointer
  440. if len(p) > 0 {
  441. _p0 = unsafe.Pointer(&p[0])
  442. } else {
  443. _p0 = unsafe.Pointer(&_zero)
  444. }
  445. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  446. n = int(r0)
  447. if e1 != 0 {
  448. err = errnoErr(e1)
  449. }
  450. return
  451. }
  452. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  453. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  454. var _p0 unsafe.Pointer
  455. if len(buf) > 0 {
  456. _p0 = unsafe.Pointer(&buf[0])
  457. } else {
  458. _p0 = unsafe.Pointer(&_zero)
  459. }
  460. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  461. if e1 != 0 {
  462. err = errnoErr(e1)
  463. }
  464. return
  465. }
  466. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  467. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  468. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  469. n = int(r0)
  470. if e1 != 0 {
  471. err = errnoErr(e1)
  472. }
  473. return
  474. }
  475. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  476. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  477. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  478. n = int(r0)
  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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  486. var _p0 *byte
  487. _p0, err = BytePtrFromString(path)
  488. if err != nil {
  489. return
  490. }
  491. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  492. if e1 != 0 {
  493. err = errnoErr(e1)
  494. }
  495. return
  496. }
  497. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  498. func Gettimeofday(tv *Timeval) (err error) {
  499. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  500. if e1 != 0 {
  501. err = errnoErr(e1)
  502. }
  503. return
  504. }
  505. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  506. func Time(t *Time_t) (tt Time_t, err error) {
  507. r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
  508. tt = Time_t(r0)
  509. if e1 != 0 {
  510. err = errnoErr(e1)
  511. }
  512. return
  513. }
  514. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  515. func Utime(path string, buf *Utimbuf) (err error) {
  516. var _p0 *byte
  517. _p0, err = BytePtrFromString(path)
  518. if err != nil {
  519. return
  520. }
  521. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  522. if e1 != 0 {
  523. err = errnoErr(e1)
  524. }
  525. return
  526. }
  527. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  528. func utimes(path string, times *[2]Timeval) (err error) {
  529. var _p0 *byte
  530. _p0, err = BytePtrFromString(path)
  531. if err != nil {
  532. return
  533. }
  534. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  535. if e1 != 0 {
  536. err = errnoErr(e1)
  537. }
  538. return
  539. }
  540. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  541. func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
  542. r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
  543. xaddr = uintptr(r0)
  544. if e1 != 0 {
  545. err = errnoErr(e1)
  546. }
  547. return
  548. }
  549. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  550. func getrlimit(resource int, rlim *rlimit32) (err error) {
  551. _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  552. if e1 != 0 {
  553. err = errnoErr(e1)
  554. }
  555. return
  556. }
  557. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  558. func setrlimit(resource int, rlim *rlimit32) (err error) {
  559. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  560. if e1 != 0 {
  561. err = errnoErr(e1)
  562. }
  563. return
  564. }
  565. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  566. func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
  567. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n))
  568. if e1 != 0 {
  569. err = errnoErr(e1)
  570. }
  571. return
  572. }
  573. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  574. func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
  575. var _p0 *byte
  576. _p0, err = BytePtrFromString(cmdline)
  577. if err != nil {
  578. return
  579. }
  580. _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  581. if e1 != 0 {
  582. err = errnoErr(e1)
  583. }
  584. return
  585. }