]> Cypherpunks.ru repositories - gostls13.git/commitdiff
syscall: change Dup,Dup2,Dup3 to use Syscall, not RawSyscall
authorIan Lance Taylor <iant@golang.org>
Thu, 26 Mar 2015 15:02:16 +0000 (08:02 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 26 Mar 2015 17:29:08 +0000 (17:29 +0000)
This avoids hanging when a Go program uses a FUSE filesystem and the
dup system call has to close a file descriptor.  When dup uses
RawSyscall then the goroutine calling dup will occupy a scheduler slot
(a p structure) during the call, and may block waiting for some other
goroutine to respond to the close call on the FUSE filesystem.
Changing to Syscall avoids the problem.  This makes Dup a tiny bit
slower but is quite unlikely to make a difference for any real
programs.

Fixes #10202.

Change-Id: If6490a8f9b3c9cfed6acbfb4bfd1eaeac62ced17
Reviewed-on: https://go-review.googlesource.com/8095
Reviewed-by: Rob Pike <r@golang.org>
29 files changed:
src/syscall/syscall_darwin.go
src/syscall/syscall_dragonfly.go
src/syscall/syscall_freebsd.go
src/syscall/syscall_linux.go
src/syscall/syscall_linux_386.go
src/syscall/syscall_linux_amd64.go
src/syscall/syscall_linux_arm.go
src/syscall/syscall_linux_ppc64x.go
src/syscall/syscall_netbsd.go
src/syscall/syscall_openbsd.go
src/syscall/zsyscall_darwin_386.go
src/syscall/zsyscall_darwin_amd64.go
src/syscall/zsyscall_darwin_arm.go
src/syscall/zsyscall_dragonfly_amd64.go
src/syscall/zsyscall_freebsd_386.go
src/syscall/zsyscall_freebsd_amd64.go
src/syscall/zsyscall_freebsd_arm.go
src/syscall/zsyscall_linux_386.go
src/syscall/zsyscall_linux_amd64.go
src/syscall/zsyscall_linux_arm.go
src/syscall/zsyscall_linux_arm64.go
src/syscall/zsyscall_linux_ppc64.go
src/syscall/zsyscall_linux_ppc64le.go
src/syscall/zsyscall_netbsd_386.go
src/syscall/zsyscall_netbsd_amd64.go
src/syscall/zsyscall_netbsd_arm.go
src/syscall/zsyscall_openbsd_386.go
src/syscall/zsyscall_openbsd_amd64.go
src/syscall/zsyscall_openbsd_arm.go

index f026a56d8b2934e50979f743c1f4fe48cf6662b1..52fd4e7094cbe5cd4c825192c9e48bbfd61f4e89 100644 (file)
@@ -222,8 +222,8 @@ func Kill(pid int, signum Signal) (err error) { return kill(pid, int(signum), 1)
 //sys  Chown(path string, uid int, gid int) (err error)
 //sys  Chroot(path string) (err error)
 //sys  Close(fd int) (err error)
-//sysnb        Dup(fd int) (nfd int, err error)
-//sysnb        Dup2(from int, to int) (err error)
+//sys  Dup(fd int) (nfd int, err error)
+//sys  Dup2(from int, to int) (err error)
 //sys  Exchangedata(path1 string, path2 string, options int) (err error)
 //sys  Exit(code int)
 //sys  Fchdir(fd int) (err error)
index 50068dec6c60e1ab2608657aea89bfaba7a58767..c25963c437571658aa63aa84ba00e7231c11d6c9 100644 (file)
@@ -127,8 +127,8 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
 //sys  Chown(path string, uid int, gid int) (err error)
 //sys  Chroot(path string) (err error)
 //sys  Close(fd int) (err error)
-//sysnb        Dup(fd int) (nfd int, err error)
-//sysnb        Dup2(from int, to int) (err error)
+//sys  Dup(fd int) (nfd int, err error)
+//sys  Dup2(from int, to int) (err error)
 //sys  Exit(code int)
 //sys  Fchdir(fd int) (err error)
 //sys  Fchflags(fd int, flags int) (err error)
index 3d834f52b5c2509f0b93e0ee4bffce927ceac154..257d41960fe12959f1aac50a28ebf8c81c9961b0 100644 (file)
@@ -147,8 +147,8 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
 //sys  Chown(path string, uid int, gid int) (err error)
 //sys  Chroot(path string) (err error)
 //sys  Close(fd int) (err error)
-//sysnb        Dup(fd int) (nfd int, err error)
-//sysnb        Dup2(from int, to int) (err error)
+//sys  Dup(fd int) (nfd int, err error)
+//sys  Dup2(from int, to int) (err error)
 //sys  Exit(code int)
 //sys  Fchdir(fd int) (err error)
 //sys  Fchflags(fd int, flags int) (err error)
index 0a80560645a12b46cbaadb5024ff2bfb368475d9..05d40446356b606090744ea641bf4ee95cfa0100 100644 (file)
@@ -820,8 +820,8 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
 //sys  Chdir(path string) (err error)
 //sys  Chroot(path string) (err error)
 //sys  Close(fd int) (err error)
-//sysnb        Dup(oldfd int) (fd int, err error)
-//sysnb        Dup3(oldfd int, newfd int, flags int) (err error)
+//sys  Dup(oldfd int) (fd int, err error)
+//sys  Dup3(oldfd int, newfd int, flags int) (err error)
 //sysnb        EpollCreate(size int) (fd int, err error)
 //sysnb        EpollCreate1(flag int) (fd int, err error)
 //sysnb        EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
index 61ff233ddc9eaaa1e7fb308cf6ad3a685388839d..98636a53ada9d706ecf37db9fcc1277dbd994a83 100644 (file)
@@ -58,7 +58,7 @@ func Pipe2(p []int, flags int) (err error) {
 
 // 64-bit file system and 32-bit uid calls
 // (386 default is 32-bit file system and 16-bit uid).
-//sysnb        Dup2(oldfd int, newfd int) (err error)
+//sys  Dup2(oldfd int, newfd int) (err error)
 //sys  Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
 //sys  Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
 //sys  Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
index ff00ed549a6688f08356b37aab9e1a4f678bb773..4111c075e81c7602577c9cc7c785070764084707 100644 (file)
@@ -6,7 +6,7 @@ package syscall
 
 const _SYS_dup = SYS_DUP2
 
-//sysnb        Dup2(oldfd int, newfd int) (err error)
+//sys  Dup2(oldfd int, newfd int) (err error)
 //sys  Fchown(fd int, uid int, gid int) (err error)
 //sys  Fstat(fd int, stat *Stat_t) (err error)
 //sys  Fstatfs(fd int, buf *Statfs_t) (err error)
index 862c01c24d4dcc943b21339669759d06732c56c0..f0cc25ebed0b803482895cd00877d7602eaabb80 100644 (file)
@@ -80,7 +80,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
 
 // 64-bit file system and 32-bit uid calls
 // (16-bit uid calls are not always supported in newer kernels)
-//sysnb        Dup2(oldfd int, newfd int) (err error)
+//sys  Dup2(oldfd int, newfd int) (err error)
 //sys  Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
 //sys  Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
 //sysnb        Getegid() (egid int) = SYS_GETEGID32
index fcf1d7b178d348feffe6096e8b98d064453d8c04..5318c6128c2e389540ab2cc91040feca91837fb8 100644 (file)
@@ -9,7 +9,7 @@ package syscall
 
 const _SYS_dup = SYS_DUP2
 
-//sysnb        Dup2(oldfd int, newfd int) (err error)
+//sys  Dup2(oldfd int, newfd int) (err error)
 //sys  Fchown(fd int, uid int, gid int) (err error)
 //sys  Fstat(fd int, stat *Stat_t) (err error)
 //sys  Fstatfs(fd int, buf *Statfs_t) (err error)
index 97812717f5bc2b98d451e516bce4216a8796c357..7fd6e2bf46566987f6997f42814c4041fa40f6f9 100644 (file)
@@ -148,8 +148,8 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
 //sys  Chown(path string, uid int, gid int) (err error)
 //sys  Chroot(path string) (err error)
 //sys  Close(fd int) (err error)
-//sysnb        Dup(fd int) (nfd int, err error)
-//sysnb        Dup2(from int, to int) (err error)
+//sys  Dup(fd int) (nfd int, err error)
+//sys  Dup2(from int, to int) (err error)
 //sys  Exit(code int)
 //sys  Fchdir(fd int) (err error)
 //sys  Fchflags(fd int, flags int) (err error)
index 8d3f825f8f59010b7ab590479b4e62d8bc41f352..e196e5966c9b248b7bca2402022a63c5295bfb28 100644 (file)
@@ -126,8 +126,8 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
 //sys  Chown(path string, uid int, gid int) (err error)
 //sys  Chroot(path string) (err error)
 //sys  Close(fd int) (err error)
-//sysnb        Dup(fd int) (nfd int, err error)
-//sysnb        Dup2(from int, to int) (err error)
+//sys  Dup(fd int) (nfd int, err error)
+//sys  Dup2(from int, to int) (err error)
 //sys  Exit(code int)
 //sys  Fchdir(fd int) (err error)
 //sys  Fchflags(fd int, flags int) (err error)
index 934565fc317d7a8106bcbf92971ad1eafbfc15af..fa25eb83a2ebd909e82fa7573827b3ec331de7a4 100644 (file)
@@ -409,7 +409,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(fd int) (nfd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
        nfd = int(r0)
        if e1 != 0 {
                err = e1
@@ -420,7 +420,7 @@ func Dup(fd int) (nfd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(from int, to int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
        if e1 != 0 {
                err = e1
        }
index 75cf2513b5ccf54f08bbbd27a5f906443354af39..8293901933ee1f9106700d1e1229da82037ea7c2 100644 (file)
@@ -409,7 +409,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(fd int) (nfd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
        nfd = int(r0)
        if e1 != 0 {
                err = e1
@@ -420,7 +420,7 @@ func Dup(fd int) (nfd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(from int, to int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
        if e1 != 0 {
                err = e1
        }
index 83b25a6ae4aeec2f9f70938881d604ee12e48f79..5ae0a5ee14bdf84737b9822fbe7f96d1214f758c 100644 (file)
@@ -409,7 +409,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(fd int) (nfd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
        nfd = int(r0)
        if e1 != 0 {
                err = e1
@@ -420,7 +420,7 @@ func Dup(fd int) (nfd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(from int, to int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
        if e1 != 0 {
                err = e1
        }
index 0121374692aee076bb49ff0d0f90333500668942..bbf9a84afc7e5ef5ce4d55a399554ac0841e303e 100644 (file)
@@ -423,7 +423,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(fd int) (nfd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
        nfd = int(r0)
        if e1 != 0 {
                err = e1
@@ -434,7 +434,7 @@ func Dup(fd int) (nfd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(from int, to int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
        if e1 != 0 {
                err = e1
        }
index c8c636fa11e5623458661e6416f3dc307e4e5932..8264305fcb02a0a1e5227b01c13d058cba62c2d0 100644 (file)
@@ -389,7 +389,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(fd int) (nfd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
        nfd = int(r0)
        if e1 != 0 {
                err = e1
@@ -400,7 +400,7 @@ func Dup(fd int) (nfd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(from int, to int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
        if e1 != 0 {
                err = e1
        }
index 026b560ca0ebbedf1262b1bdecbd398e70cb14c2..ff8ae5ed8c743b8a113afe5158cd6e3ace355350 100644 (file)
@@ -389,7 +389,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(fd int) (nfd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
        nfd = int(r0)
        if e1 != 0 {
                err = e1
@@ -400,7 +400,7 @@ func Dup(fd int) (nfd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(from int, to int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
        if e1 != 0 {
                err = e1
        }
index 0c349cb61dfefe8779a4de3001cd8042f2b332fe..ea99bf83ba46984b61a63b717bc88384d3bff19c 100644 (file)
@@ -389,7 +389,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(fd int) (nfd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
        nfd = int(r0)
        if e1 != 0 {
                err = e1
@@ -400,7 +400,7 @@ func Dup(fd int) (nfd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(from int, to int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
        if e1 != 0 {
                err = e1
        }
index 587918f8344149501c001237ffbe4049d819e830..6bff9bd394203b8d2671966509c29224fb514b6e 100644 (file)
@@ -301,7 +301,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(oldfd int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(oldfd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
        fd = int(r0)
        if e1 != 0 {
                err = e1
@@ -312,7 +312,7 @@ func Dup(oldfd int) (fd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup3(oldfd int, newfd int, flags int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
+       _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
        if e1 != 0 {
                err = e1
        }
@@ -1227,7 +1227,7 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
        if e1 != 0 {
                err = e1
        }
index 17b7d929e06000a0a39a0f1a957eb0afbf737064..f81cd4d4aaad23dd4dfb5c002278f03e59ab644c 100644 (file)
@@ -301,7 +301,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(oldfd int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(oldfd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
        fd = int(r0)
        if e1 != 0 {
                err = e1
@@ -312,7 +312,7 @@ func Dup(oldfd int) (fd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup3(oldfd int, newfd int, flags int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
+       _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
        if e1 != 0 {
                err = e1
        }
@@ -1207,7 +1207,7 @@ func Munlockall() (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
        if e1 != 0 {
                err = e1
        }
index 74bf02db3eb64a5507827597972b39bbc00fe92f..6e493793e58aa3d6aec1fca1021ddc5d19d8419a 100644 (file)
@@ -301,7 +301,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(oldfd int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(oldfd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
        fd = int(r0)
        if e1 != 0 {
                err = e1
@@ -312,7 +312,7 @@ func Dup(oldfd int) (fd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup3(oldfd int, newfd int, flags int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
+       _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
        if e1 != 0 {
                err = e1
        }
@@ -1396,7 +1396,7 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
        if e1 != 0 {
                err = e1
        }
index a7dfc81fee764082175d7b421de56570bb80018c..c0b22463e9c76d0f7cdaab016a3b4c8ee23f5bf1 100644 (file)
@@ -301,7 +301,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(oldfd int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(oldfd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
        fd = int(r0)
        if e1 != 0 {
                err = e1
@@ -312,7 +312,7 @@ func Dup(oldfd int) (fd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup3(oldfd int, newfd int, flags int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
+       _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
        if e1 != 0 {
                err = e1
        }
index 2de0de80db7938408c511ac323d639d6ac1fa451..505b7bf73b8ff480edd206094ebb07ad12f753e4 100644 (file)
@@ -301,7 +301,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(oldfd int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(oldfd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
        fd = int(r0)
        if e1 != 0 {
                err = e1
@@ -312,7 +312,7 @@ func Dup(oldfd int) (fd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup3(oldfd int, newfd int, flags int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
+       _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
        if e1 != 0 {
                err = e1
        }
@@ -1207,7 +1207,7 @@ func Munlockall() (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
        if e1 != 0 {
                err = e1
        }
index 2de0de80db7938408c511ac323d639d6ac1fa451..505b7bf73b8ff480edd206094ebb07ad12f753e4 100644 (file)
@@ -301,7 +301,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(oldfd int) (fd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(oldfd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
        fd = int(r0)
        if e1 != 0 {
                err = e1
@@ -312,7 +312,7 @@ func Dup(oldfd int) (fd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup3(oldfd int, newfd int, flags int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
+       _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
        if e1 != 0 {
                err = e1
        }
@@ -1207,7 +1207,7 @@ func Munlockall() (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(oldfd int, newfd int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
        if e1 != 0 {
                err = e1
        }
index e9bd3d0f677b898ee6dfaf7caf572de7328b89d6..1874d72f49840d074e5b5ab86731e4e12d402968 100644 (file)
@@ -406,7 +406,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(fd int) (nfd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
        nfd = int(r0)
        if e1 != 0 {
                err = e1
@@ -417,7 +417,7 @@ func Dup(fd int) (nfd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(from int, to int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
        if e1 != 0 {
                err = e1
        }
index 1acd7c2736336917de3d0ec1d199a4a6f3b0e1b6..f294585449e092c8bb99e4493e72909365af675b 100644 (file)
@@ -406,7 +406,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(fd int) (nfd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
        nfd = int(r0)
        if e1 != 0 {
                err = e1
@@ -417,7 +417,7 @@ func Dup(fd int) (nfd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(from int, to int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
        if e1 != 0 {
                err = e1
        }
index 898e0ce809d2285e05aa2789ca68be3f4821d405..289201ffcbcb1132378b8ac348bff899c5996bb8 100644 (file)
@@ -406,7 +406,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(fd int) (nfd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
        nfd = int(r0)
        if e1 != 0 {
                err = e1
@@ -417,7 +417,7 @@ func Dup(fd int) (nfd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(from int, to int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
        if e1 != 0 {
                err = e1
        }
index 5b005d2dc3bac561f55f6a7fbf4a45635a91ccfa..614344693dfd55d725b12ac47d0f0fca7b1368ce 100644 (file)
@@ -404,7 +404,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(fd int) (nfd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
        nfd = int(r0)
        if e1 != 0 {
                err = e1
@@ -415,7 +415,7 @@ func Dup(fd int) (nfd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(from int, to int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
        if e1 != 0 {
                err = e1
        }
index ce9397bcae1f56878edbab6a68bfa120695424e3..f1d2fa5769a3cddc0e4f4be849f508c6c948abfc 100644 (file)
@@ -404,7 +404,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(fd int) (nfd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
        nfd = int(r0)
        if e1 != 0 {
                err = e1
@@ -415,7 +415,7 @@ func Dup(fd int) (nfd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(from int, to int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
        if e1 != 0 {
                err = e1
        }
index bf53d168352b2691d2392409d90d86bf78a5b650..21f84d83c30c4f81322eb0ec169ab3a63a3226ad 100644 (file)
@@ -404,7 +404,7 @@ func Close(fd int) (err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup(fd int) (nfd int, err error) {
-       r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
+       r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
        nfd = int(r0)
        if e1 != 0 {
                err = e1
@@ -415,7 +415,7 @@ func Dup(fd int) (nfd int, err error) {
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
 func Dup2(from int, to int) (err error) {
-       _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+       _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
        if e1 != 0 {
                err = e1
        }