| // go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go syscall_linux_alarm.go |
| // Code generated by the command above; see README.md. DO NOT EDIT. |
| |
| //go:build linux && 386 |
| |
| package unix |
| |
| import ( |
| "syscall" |
| "unsafe" |
| ) |
| |
| var _ syscall.Errno |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { |
| _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { |
| _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { |
| r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) |
| n = int64(int64(r1)<<32 | int64(r0)) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { |
| var _p0 unsafe.Pointer |
| if len(events) > 0 { |
| _p0 = unsafe.Pointer(&events[0]) |
| } else { |
| _p0 = unsafe.Pointer(&_zero) |
| } |
| r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) |
| n = int(r0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Fadvise(fd int, offset int64, length int64, advice int) (err error) { |
| _, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice)) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Fchown(fd int, uid int, gid int) (err error) { |
| _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid)) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Fstat(fd int, stat *Stat_t) (err error) { |
| _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { |
| var _p0 *byte |
| _p0, err = BytePtrFromString(path) |
| if err != nil { |
| return |
| } |
| _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Ftruncate(fd int, length int64) (err error) { |
| _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32)) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Getegid() (egid int) { |
| r0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0) |
| egid = int(r0) |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Geteuid() (euid int) { |
| r0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0) |
| euid = int(r0) |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Getgid() (gid int) { |
| r0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0) |
| gid = int(r0) |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Getuid() (uid int) { |
| r0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0) |
| uid = int(r0) |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Ioperm(from int, num int, on int) (err error) { |
| _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Iopl(level int) (err error) { |
| _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Lchown(path string, uid int, gid int) (err error) { |
| var _p0 *byte |
| _p0, err = BytePtrFromString(path) |
| if err != nil { |
| return |
| } |
| _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Lstat(path string, stat *Stat_t) (err error) { |
| var _p0 *byte |
| _p0, err = BytePtrFromString(path) |
| if err != nil { |
| return |
| } |
| _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func pread(fd int, p []byte, offset int64) (n int, err error) { |
| var _p0 unsafe.Pointer |
| if len(p) > 0 { |
| _p0 = unsafe.Pointer(&p[0]) |
| } else { |
| _p0 = unsafe.Pointer(&_zero) |
| } |
| r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) |
| n = int(r0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func pwrite(fd int, p []byte, offset int64) (n int, err error) { |
| var _p0 unsafe.Pointer |
| if len(p) > 0 { |
| _p0 = unsafe.Pointer(&p[0]) |
| } else { |
| _p0 = unsafe.Pointer(&_zero) |
| } |
| r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) |
| n = int(r0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { |
| var _p0 *byte |
| _p0, err = BytePtrFromString(oldpath) |
| if err != nil { |
| return |
| } |
| var _p1 *byte |
| _p1, err = BytePtrFromString(newpath) |
| if err != nil { |
| return |
| } |
| _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { |
| r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) |
| written = int(r0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func setfsgid(gid int) (prev int, err error) { |
| r0, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) |
| prev = int(r0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func setfsuid(uid int) (prev int, err error) { |
| r0, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) |
| prev = int(r0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { |
| r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) |
| n = int(r0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Stat(path string, stat *Stat_t) (err error) { |
| var _p0 *byte |
| _p0, err = BytePtrFromString(path) |
| if err != nil { |
| return |
| } |
| _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { |
| _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags)) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Truncate(path string, length int64) (err error) { |
| var _p0 *byte |
| _p0, err = BytePtrFromString(path) |
| if err != nil { |
| return |
| } |
| _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32)) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Ustat(dev int, ubuf *Ustat_t) (err error) { |
| _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func getgroups(n int, list *_Gid_t) (nn int, err error) { |
| r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) |
| nn = int(r0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func setgroups(n int, list *_Gid_t) (err error) { |
| _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { |
| r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) |
| n = int(r0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { |
| r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) |
| xaddr = uintptr(r0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Pause() (err error) { |
| _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func getrlimit(resource int, rlim *rlimit32) (err error) { |
| _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func futimesat(dirfd int, path string, times *[2]Timeval) (err error) { |
| var _p0 *byte |
| _p0, err = BytePtrFromString(path) |
| if err != nil { |
| return |
| } |
| _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times))) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Gettimeofday(tv *Timeval) (err error) { |
| _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Time(t *Time_t) (tt Time_t, err error) { |
| r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) |
| tt = Time_t(r0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Utime(path string, buf *Utimbuf) (err error) { |
| var _p0 *byte |
| _p0, err = BytePtrFromString(path) |
| if err != nil { |
| return |
| } |
| _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func utimes(path string, times *[2]Timeval) (err error) { |
| var _p0 *byte |
| _p0, err = BytePtrFromString(path) |
| if err != nil { |
| return |
| } |
| _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |
| |
| // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| |
| func Alarm(seconds uint) (remaining uint, err error) { |
| r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) |
| remaining = uint(r0) |
| if e1 != 0 { |
| err = errnoErr(e1) |
| } |
| return |
| } |