diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-03-13 23:01:30 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-03-13 23:01:30 +0000 |
commit | 24aea5875315b22d270d443e6fda77487ba8f2a8 (patch) | |
tree | dc76d4b8449ae8e1babfb7edd2a73620d3aa3ecb /libgo/go/syscall | |
parent | 13bd57a17741f2aa6c966f3709a86a94b16de388 (diff) | |
download | gcc-24aea5875315b22d270d443e6fda77487ba8f2a8.zip gcc-24aea5875315b22d270d443e6fda77487ba8f2a8.tar.gz gcc-24aea5875315b22d270d443e6fda77487ba8f2a8.tar.bz2 |
libgo: Export {enter,exit}syscall and use it for getaddrinfo.
From-SVN: r185363
Diffstat (limited to 'libgo/go/syscall')
-rw-r--r-- | libgo/go/syscall/libcall_linux.go | 4 | ||||
-rw-r--r-- | libgo/go/syscall/libcall_support.go | 4 | ||||
-rw-r--r-- | libgo/go/syscall/mksyscall.awk | 4 | ||||
-rw-r--r-- | libgo/go/syscall/syscall_unix.go | 8 |
4 files changed, 10 insertions, 10 deletions
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go index bb96073..f5358f5 100644 --- a/libgo/go/syscall/libcall_linux.go +++ b/libgo/go/syscall/libcall_linux.go @@ -202,13 +202,13 @@ func Getdents(fd int, buf []byte) (n int, err error) { } else { p = (*byte)(unsafe.Pointer(&_zero)) } - entersyscall() + Entersyscall() r1, _, errno := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(len(buf))) n = int(r1) if n < 0 { err = errno } - exitsyscall() + Exitsyscall() return } diff --git a/libgo/go/syscall/libcall_support.go b/libgo/go/syscall/libcall_support.go index 7449a0a..7746cc2 100644 --- a/libgo/go/syscall/libcall_support.go +++ b/libgo/go/syscall/libcall_support.go @@ -6,7 +6,7 @@ package syscall -func entersyscall() -func exitsyscall() +func Entersyscall() +func Exitsyscall() func GetErrno() Errno func SetErrno(Errno) diff --git a/libgo/go/syscall/mksyscall.awk b/libgo/go/syscall/mksyscall.awk index 8da0234..5e30e86 100644 --- a/libgo/go/syscall/mksyscall.awk +++ b/libgo/go/syscall/mksyscall.awk @@ -190,7 +190,7 @@ BEGIN { } if (blocking) { - print "\tentersyscall()" + print "\tEntersyscall()" } printf("\t") @@ -240,7 +240,7 @@ BEGIN { } if (blocking) { - print "\texitsyscall()" + print "\tExitsyscall()" } if (gofnresults != "") { diff --git a/libgo/go/syscall/syscall_unix.go b/libgo/go/syscall/syscall_unix.go index 85182b7..e3c6629 100644 --- a/libgo/go/syscall/syscall_unix.go +++ b/libgo/go/syscall/syscall_unix.go @@ -30,7 +30,7 @@ const darwinAMD64 = runtime.GOOS == "darwin" && runtime.GOARCH == "amd64" // the arguments, so that we don't pass a 64-bit value when the function // expects a 32-bit one. func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) { - entersyscall() + Entersyscall() var r uintptr if unsafe.Sizeof(r) == 4 { r1 := c_syscall32(int32(trap), int32(a1), int32(a2), int32(a3), 0, 0, 0) @@ -40,12 +40,12 @@ func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) { r = uintptr(r1) } err = GetErrno() - exitsyscall() + Exitsyscall() return r, 0, err } func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) { - entersyscall() + Entersyscall() var r uintptr if unsafe.Sizeof(r) == 4 { r1 := c_syscall32(int32(trap), int32(a1), int32(a2), int32(a3), @@ -57,7 +57,7 @@ func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) r = uintptr(r1) } err = GetErrno() - exitsyscall() + Exitsyscall() return r, 0, err } |