summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/unix/gccgo.go
diff options
context:
space:
mode:
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>2018-10-27 01:18:40 +0200
committertechknowlogick <hello@techknowlogick.com>2018-10-26 19:18:40 -0400
commit99c09dfbfa818c753459e90db5ff12a323d2936f (patch)
tree207f9b07137f2c01a9b7ebf53cc63da89731f518 /vendor/golang.org/x/sys/unix/gccgo.go
parent2af57c78206272c771e0798db953b9dea42e2fbe (diff)
downloadgitea-99c09dfbfa818c753459e90db5ff12a323d2936f.tar.gz
gitea-99c09dfbfa818c753459e90db5ff12a323d2936f.zip
Update vendor/golang.org/x/sys (#5059)
Diffstat (limited to 'vendor/golang.org/x/sys/unix/gccgo.go')
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo.go20
1 files changed, 18 insertions, 2 deletions
diff --git a/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go
index 94c8232124..cd6f5a6133 100644
--- a/vendor/golang.org/x/sys/unix/gccgo.go
+++ b/vendor/golang.org/x/sys/unix/gccgo.go
@@ -1,19 +1,30 @@
-// Copyright 2015 The Go Authors. All rights reserved.
+// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build gccgo
+// +build !aix
package unix
import "syscall"
-// We can't use the gc-syntax .s files for gccgo. On the plus side
+// We can't use the gc-syntax .s files for gccgo. On the plus side
// much of the functionality can be written directly in Go.
+//extern gccgoRealSyscallNoError
+func realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr)
+
//extern gccgoRealSyscall
func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)
+func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
+ syscall.Entersyscall()
+ r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
+ syscall.Exitsyscall()
+ return r, 0
+}
+
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
syscall.Entersyscall()
r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
@@ -35,6 +46,11 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
return r, 0, syscall.Errno(errno)
}
+func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
+ r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
+ return r, 0
+}
+
func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
return r, 0, syscall.Errno(errno)