Blame vendor/golang.org/x/sys/unix/gccgo.go

Packit Service 4d2de5
// Copyright 2015 The Go Authors. All rights reserved.
Packit Service 4d2de5
// Use of this source code is governed by a BSD-style
Packit Service 4d2de5
// license that can be found in the LICENSE file.
Packit Service 4d2de5
Packit Service 4d2de5
// +build gccgo
Packit Service 4d2de5
// +build !aix
Packit Service 4d2de5
Packit Service 4d2de5
package unix
Packit Service 4d2de5
Packit Service 4d2de5
import "syscall"
Packit Service 4d2de5
Packit Service 4d2de5
// We can't use the gc-syntax .s files for gccgo. On the plus side
Packit Service 4d2de5
// much of the functionality can be written directly in Go.
Packit Service 4d2de5
Packit Service 4d2de5
//extern gccgoRealSyscallNoError
Packit Service 4d2de5
func realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr)
Packit Service 4d2de5
Packit Service 4d2de5
//extern gccgoRealSyscall
Packit Service 4d2de5
func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)
Packit Service 4d2de5
Packit Service 4d2de5
func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
Packit Service 4d2de5
	syscall.Entersyscall()
Packit Service 4d2de5
	r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
Packit Service 4d2de5
	syscall.Exitsyscall()
Packit Service 4d2de5
	return r, 0
Packit Service 4d2de5
}
Packit Service 4d2de5
Packit Service 4d2de5
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
Packit Service 4d2de5
	syscall.Entersyscall()
Packit Service 4d2de5
	r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
Packit Service 4d2de5
	syscall.Exitsyscall()
Packit Service 4d2de5
	return r, 0, syscall.Errno(errno)
Packit Service 4d2de5
}
Packit Service 4d2de5
Packit Service 4d2de5
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
Packit Service 4d2de5
	syscall.Entersyscall()
Packit Service 4d2de5
	r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
Packit Service 4d2de5
	syscall.Exitsyscall()
Packit Service 4d2de5
	return r, 0, syscall.Errno(errno)
Packit Service 4d2de5
}
Packit Service 4d2de5
Packit Service 4d2de5
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) {
Packit Service 4d2de5
	syscall.Entersyscall()
Packit Service 4d2de5
	r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9)
Packit Service 4d2de5
	syscall.Exitsyscall()
Packit Service 4d2de5
	return r, 0, syscall.Errno(errno)
Packit Service 4d2de5
}
Packit Service 4d2de5
Packit Service 4d2de5
func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
Packit Service 4d2de5
	r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
Packit Service 4d2de5
	return r, 0
Packit Service 4d2de5
}
Packit Service 4d2de5
Packit Service 4d2de5
func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
Packit Service 4d2de5
	r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
Packit Service 4d2de5
	return r, 0, syscall.Errno(errno)
Packit Service 4d2de5
}
Packit Service 4d2de5
Packit Service 4d2de5
func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
Packit Service 4d2de5
	r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
Packit Service 4d2de5
	return r, 0, syscall.Errno(errno)
Packit Service 4d2de5
}