summaryrefslogtreecommitdiff
path: root/src/syscall/syscall_linux.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2022-02-24 17:00:12 -0500
committerMichael Pratt <mpratt@google.com>2022-04-22 19:02:29 +0000
commit808d40d7809a46703f43fc2d6911957135f4563c (patch)
tree353c044af0a8a44b03a78521420abe9fd3f51755 /src/syscall/syscall_linux.go
parent534a911338a05b74b5c419080d563c6ae06d6dc8 (diff)
downloadgo-git-808d40d7809a46703f43fc2d6911957135f4563c.tar.gz
syscall: define Syscall6 in terms of RawSyscall6 on linux
This is an exact copy of CL 388478 after fixing #52472 in CL 401654. For #51087 For #52472 Change-Id: I6c6bd7ddcab1512c682e6b44f61c7bcde97f5c58 Reviewed-on: https://go-review.googlesource.com/c/go/+/401655 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/syscall/syscall_linux.go')
-rw-r--r--src/syscall/syscall_linux.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/syscall/syscall_linux.go b/src/syscall/syscall_linux.go
index 999ca5bb7f..f9adecdd5e 100644
--- a/src/syscall/syscall_linux.go
+++ b/src/syscall/syscall_linux.go
@@ -16,8 +16,6 @@ import (
"unsafe"
)
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
-
// N.B. RawSyscall6 is provided via linkname by runtime/internal/syscall.
//
// Errno is uintptr and thus compatible with the runtime/internal/syscall
@@ -80,6 +78,16 @@ func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) {
return
}
+//go:uintptrkeepalive
+//go:nosplit
+//go:linkname Syscall6
+func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) {
+ runtime_entersyscall()
+ r1, r2, err = RawSyscall6(trap, a1, a2, a3, a4, a5, a6)
+ runtime_exitsyscall()
+ return
+}
+
func rawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
/*