1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-26 13:48:49 +08:00
2022-11-09 17:30:57 +01:00

15 lines
407 B
Go

package sysfs
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))
}