aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/unix/gccgo.go
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2023-12-29 21:31:53 +0100
committerLibravatar Rutger Broekhoff2023-12-29 21:31:53 +0100
commit404aeae4545d2426c089a5f8d5e82dae56f5212b (patch)
tree2d84e00af272b39fc04f3795ae06bc48970e57b5 /vendor/golang.org/x/sys/unix/gccgo.go
parent209d8b0187ed025dec9ac149ebcced3462877bff (diff)
downloadgitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.tar.gz
gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.zip
Make Nix builds work
Diffstat (limited to 'vendor/golang.org/x/sys/unix/gccgo.go')
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo.go59
1 files changed, 59 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go
new file mode 100644
index 0000000..aca5721
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/gccgo.go
@@ -0,0 +1,59 @@
1// Copyright 2015 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5//go:build gccgo && !aix && !hurd
6
7package unix
8
9import "syscall"
10
11// We can't use the gc-syntax .s files for gccgo. On the plus side
12// much of the functionality can be written directly in Go.
13
14func realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr)
15
16func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)
17
18func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
19 syscall.Entersyscall()
20 r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
21 syscall.Exitsyscall()
22 return r, 0
23}
24
25func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
26 syscall.Entersyscall()
27 r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
28 syscall.Exitsyscall()
29 return r, 0, syscall.Errno(errno)
30}
31
32func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
33 syscall.Entersyscall()
34 r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
35 syscall.Exitsyscall()
36 return r, 0, syscall.Errno(errno)
37}
38
39func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) {
40 syscall.Entersyscall()
41 r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9)
42 syscall.Exitsyscall()
43 return r, 0, syscall.Errno(errno)
44}
45
46func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
47 r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
48 return r, 0
49}
50
51func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
52 r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
53 return r, 0, syscall.Errno(errno)
54}
55
56func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
57 r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
58 return r, 0, syscall.Errno(errno)
59}