gobot.io/x/gobot/v2@v2.1.0/system/syscall.go (about)

     1  package system
     2  
     3  import (
     4  	"syscall"
     5  	"unsafe"
     6  )
     7  
     8  // nativeSyscall represents the native Syscall
     9  type nativeSyscall struct{}
    10  
    11  // Syscall calls the native syscall.Syscall, implements the SystemCaller interface
    12  func (sys *nativeSyscall) syscall(trap uintptr, f File, signal uintptr, payload unsafe.Pointer) (r1, r2 uintptr, err syscall.Errno) {
    13  	return syscall.Syscall(trap, f.Fd(), signal, uintptr(payload))
    14  }