1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-26 13:48:49 +08:00

15 lines
407 B
Go
Raw Normal View History

2014-11-07 16:56:13 -08:00
package sysfs
import (
"syscall"
2022-10-26 18:21:34 +02:00
"unsafe"
2014-11-07 16:56:13 -08:00
)
2022-11-05 07:42:28 +01:00
// nativeSyscall represents the native Syscall
type nativeSyscall struct{}
2014-11-07 16:56:13 -08:00
2022-10-26 18:21:34 +02:00
// Syscall calls the native syscall.Syscall, implements the SystemCaller interface
2022-11-05 07:42:28 +01:00
func (sys *nativeSyscall) syscall(trap uintptr, f File, signal uintptr, payload unsafe.Pointer) (r1, r2 uintptr, err syscall.Errno) {
2022-10-26 18:21:34 +02:00
return syscall.Syscall(trap, f.Fd(), signal, uintptr(payload))
2014-11-07 16:56:13 -08:00
}