1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-24 13:48:49 +08:00
2022-11-20 19:22:26 +01:00

15 lines
408 B
Go

package system
import (
"syscall"
"unsafe"
)
// nativeSyscall represents the native Syscall
type nativeSyscall struct{}
// Syscall calls the native syscall.Syscall, implements the SystemCaller interface
func (sys *nativeSyscall) syscall(trap uintptr, f File, signal uintptr, payload unsafe.Pointer) (r1, r2 uintptr, err syscall.Errno) {
return syscall.Syscall(trap, f.Fd(), signal, uintptr(payload))
}