Ready to release 0.6.0
[aya.git] / vendor / golang.org / x / sys / unix / zsyscall_linux_arm64.go
blob190609f2140d4118993865e99a2f3fa20e326926
1 // go run mksyscall.go -tags linux,arm64 syscall_linux.go syscall_linux_arm64.go
2 // Code generated by the command above; see README.md. DO NOT EDIT.
4 //go:build linux && arm64
5 // +build linux,arm64
7 package unix
9 import (
10 "syscall"
11 "unsafe"
14 var _ syscall.Errno
16 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
18 func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
19 _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
20 if e1 != 0 {
21 err = errnoErr(e1)
23 return
26 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
28 func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
29 _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
30 if e1 != 0 {
31 err = errnoErr(e1)
33 return
36 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
38 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
39 r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
40 n = int64(r0)
41 if e1 != 0 {
42 err = errnoErr(e1)
44 return
47 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
49 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
50 var _p0 unsafe.Pointer
51 if len(events) > 0 {
52 _p0 = unsafe.Pointer(&events[0])
53 } else {
54 _p0 = unsafe.Pointer(&_zero)
56 r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
57 n = int(r0)
58 if e1 != 0 {
59 err = errnoErr(e1)
61 return
64 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
66 func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
67 _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
68 if e1 != 0 {
69 err = errnoErr(e1)
71 return
74 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
76 func Fchown(fd int, uid int, gid int) (err error) {
77 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
78 if e1 != 0 {
79 err = errnoErr(e1)
81 return
84 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
86 func Fstat(fd int, stat *Stat_t) (err error) {
87 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
88 if e1 != 0 {
89 err = errnoErr(e1)
91 return
94 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
96 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
97 var _p0 *byte
98 _p0, err = BytePtrFromString(path)
99 if err != nil {
100 return
102 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
103 if e1 != 0 {
104 err = errnoErr(e1)
106 return
109 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
111 func Fstatfs(fd int, buf *Statfs_t) (err error) {
112 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
113 if e1 != 0 {
114 err = errnoErr(e1)
116 return
119 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
121 func Ftruncate(fd int, length int64) (err error) {
122 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
123 if e1 != 0 {
124 err = errnoErr(e1)
126 return
129 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
131 func Getegid() (egid int) {
132 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
133 egid = int(r0)
134 return
137 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
139 func Geteuid() (euid int) {
140 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
141 euid = int(r0)
142 return
145 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
147 func Getgid() (gid int) {
148 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
149 gid = int(r0)
150 return
153 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
155 func getrlimit(resource int, rlim *Rlimit) (err error) {
156 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
157 if e1 != 0 {
158 err = errnoErr(e1)
160 return
163 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
165 func Getuid() (uid int) {
166 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
167 uid = int(r0)
168 return
171 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
173 func Listen(s int, n int) (err error) {
174 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
175 if e1 != 0 {
176 err = errnoErr(e1)
178 return
181 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
183 func MemfdSecret(flags int) (fd int, err error) {
184 r0, _, e1 := Syscall(SYS_MEMFD_SECRET, uintptr(flags), 0, 0)
185 fd = int(r0)
186 if e1 != 0 {
187 err = errnoErr(e1)
189 return
192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
194 func pread(fd int, p []byte, offset int64) (n int, err error) {
195 var _p0 unsafe.Pointer
196 if len(p) > 0 {
197 _p0 = unsafe.Pointer(&p[0])
198 } else {
199 _p0 = unsafe.Pointer(&_zero)
201 r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
202 n = int(r0)
203 if e1 != 0 {
204 err = errnoErr(e1)
206 return
209 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
211 func pwrite(fd int, p []byte, offset int64) (n int, err error) {
212 var _p0 unsafe.Pointer
213 if len(p) > 0 {
214 _p0 = unsafe.Pointer(&p[0])
215 } else {
216 _p0 = unsafe.Pointer(&_zero)
218 r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
219 n = int(r0)
220 if e1 != 0 {
221 err = errnoErr(e1)
223 return
226 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
228 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
229 var _p0 *byte
230 _p0, err = BytePtrFromString(oldpath)
231 if err != nil {
232 return
234 var _p1 *byte
235 _p1, err = BytePtrFromString(newpath)
236 if err != nil {
237 return
239 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
240 if e1 != 0 {
241 err = errnoErr(e1)
243 return
246 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
248 func Seek(fd int, offset int64, whence int) (off int64, err error) {
249 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
250 off = int64(r0)
251 if e1 != 0 {
252 err = errnoErr(e1)
254 return
257 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
259 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
260 r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
261 written = int(r0)
262 if e1 != 0 {
263 err = errnoErr(e1)
265 return
268 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
270 func setfsgid(gid int) (prev int, err error) {
271 r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
272 prev = int(r0)
273 if e1 != 0 {
274 err = errnoErr(e1)
276 return
279 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
281 func setfsuid(uid int) (prev int, err error) {
282 r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
283 prev = int(r0)
284 if e1 != 0 {
285 err = errnoErr(e1)
287 return
290 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
292 func setrlimit(resource int, rlim *Rlimit) (err error) {
293 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
294 if e1 != 0 {
295 err = errnoErr(e1)
297 return
300 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
302 func Shutdown(fd int, how int) (err error) {
303 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
304 if e1 != 0 {
305 err = errnoErr(e1)
307 return
310 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
312 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
313 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
314 n = int64(r0)
315 if e1 != 0 {
316 err = errnoErr(e1)
318 return
321 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
323 func Statfs(path string, buf *Statfs_t) (err error) {
324 var _p0 *byte
325 _p0, err = BytePtrFromString(path)
326 if err != nil {
327 return
329 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
330 if e1 != 0 {
331 err = errnoErr(e1)
333 return
336 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
338 func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
339 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
340 if e1 != 0 {
341 err = errnoErr(e1)
343 return
346 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
348 func Truncate(path string, length int64) (err error) {
349 var _p0 *byte
350 _p0, err = BytePtrFromString(path)
351 if err != nil {
352 return
354 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
355 if e1 != 0 {
356 err = errnoErr(e1)
358 return
361 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
363 func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
364 r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
365 fd = int(r0)
366 if e1 != 0 {
367 err = errnoErr(e1)
369 return
372 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
374 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
375 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
376 if e1 != 0 {
377 err = errnoErr(e1)
379 return
382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
384 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
385 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
386 if e1 != 0 {
387 err = errnoErr(e1)
389 return
392 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
394 func getgroups(n int, list *_Gid_t) (nn int, err error) {
395 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
396 nn = int(r0)
397 if e1 != 0 {
398 err = errnoErr(e1)
400 return
403 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
405 func setgroups(n int, list *_Gid_t) (err error) {
406 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
407 if e1 != 0 {
408 err = errnoErr(e1)
410 return
413 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
415 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
416 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
417 if e1 != 0 {
418 err = errnoErr(e1)
420 return
423 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
425 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
426 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
427 if e1 != 0 {
428 err = errnoErr(e1)
430 return
433 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
435 func socket(domain int, typ int, proto int) (fd int, err error) {
436 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
437 fd = int(r0)
438 if e1 != 0 {
439 err = errnoErr(e1)
441 return
444 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
446 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
447 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
448 if e1 != 0 {
449 err = errnoErr(e1)
451 return
454 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
456 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
457 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
458 if e1 != 0 {
459 err = errnoErr(e1)
461 return
464 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
466 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
467 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
468 if e1 != 0 {
469 err = errnoErr(e1)
471 return
474 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
476 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
477 var _p0 unsafe.Pointer
478 if len(p) > 0 {
479 _p0 = unsafe.Pointer(&p[0])
480 } else {
481 _p0 = unsafe.Pointer(&_zero)
483 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
484 n = int(r0)
485 if e1 != 0 {
486 err = errnoErr(e1)
488 return
491 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
493 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
494 var _p0 unsafe.Pointer
495 if len(buf) > 0 {
496 _p0 = unsafe.Pointer(&buf[0])
497 } else {
498 _p0 = unsafe.Pointer(&_zero)
500 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
501 if e1 != 0 {
502 err = errnoErr(e1)
504 return
507 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
509 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
510 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
511 n = int(r0)
512 if e1 != 0 {
513 err = errnoErr(e1)
515 return
518 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
520 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
521 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
522 n = int(r0)
523 if e1 != 0 {
524 err = errnoErr(e1)
526 return
529 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
531 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
532 r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
533 xaddr = uintptr(r0)
534 if e1 != 0 {
535 err = errnoErr(e1)
537 return
540 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
542 func Gettimeofday(tv *Timeval) (err error) {
543 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
544 if e1 != 0 {
545 err = errnoErr(e1)
547 return
550 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
552 func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
553 var _p0 *byte
554 _p0, err = BytePtrFromString(cmdline)
555 if err != nil {
556 return
558 _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
559 if e1 != 0 {
560 err = errnoErr(e1)
562 return