diff options
author | Russ Cox <rsc@golang.org> | 2009-11-01 11:13:27 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-11-01 11:13:27 -0800 |
commit | e553412f7d28715525607dcd86f48723bc28423b (patch) | |
tree | 865762db2f724d6fdba1bb99fd65b02ca56edd8b /src/pkg/syscall/zsyscall_linux_386.go | |
parent | 70e1eeffd9a4848d9c31ce9945226cafd9273c60 (diff) | |
download | golang-e553412f7d28715525607dcd86f48723bc28423b.tar.gz |
syscall cleanup.
* rename PORT.sh -> mkall.sh (hopefully more obvious),
change behavior: run commands by default.
* pull more constants out of #defines automatically,
instead of editing large lists by hand.
* add Recvfrom, Sendto
add os.O_EXCL.
R=r
http://go/go-review/1017009
Diffstat (limited to 'src/pkg/syscall/zsyscall_linux_386.go')
-rw-r--r-- | src/pkg/syscall/zsyscall_linux_386.go | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/pkg/syscall/zsyscall_linux_386.go b/src/pkg/syscall/zsyscall_linux_386.go index 226e9d6c0..13ec70e64 100644 --- a/src/pkg/syscall/zsyscall_linux_386.go +++ b/src/pkg/syscall/zsyscall_linux_386.go @@ -261,18 +261,6 @@ func Gettimeofday(tv *Timeval) (errno int) { return; } -func Ioperm(from int, num int, on int) (errno int) { - _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)); - errno = int(e1); - return; -} - -func Iopl(level int) (errno int) { - _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0); - errno = int(e1); - return; -} - func Kill(pid int, sig int) (errno int) { _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(sig), 0); errno = int(e1); @@ -481,12 +469,6 @@ func Sync() { return; } -func SyncFileRange(fd int, off int64, n int64, flags int) (errno int) { - _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags)); - errno = int(e1); - return; -} - func Sysinfo(info *Sysinfo_t) (errno int) { _, _, e1 := Syscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0); errno = int(e1); @@ -646,6 +628,18 @@ func Getuid() (uid int) { return; } +func Ioperm(from int, num int, on int) (errno int) { + _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)); + errno = int(e1); + return; +} + +func Iopl(level int) (errno int) { + _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0); + errno = int(e1); + return; +} + func Lchown(path string, uid int, gid int) (errno int) { _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid)); errno = int(e1); @@ -712,6 +706,12 @@ func Statfs(path string, buf *Statfs_t) (errno int) { return; } +func SyncFileRange(fd int, off int64, n int64, flags int) (errno int) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags)); + errno = int(e1); + return; +} + func getgroups(n int, list *_Gid_t) (nn int, errno int) { r0, _, e1 := Syscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0); nn = int(r0); |