mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-04-26 13:48:49 +08:00
15 lines
407 B
Go
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))
|
|
}
|