mirror of
https://github.com/impact-eintr/netstack.git
synced 2025-10-23 04:39:23 +08:00
太难了
This commit is contained in:
12
tcpip/link/rawfile/blockingpoll_unsafe.go
Normal file
12
tcpip/link/rawfile/blockingpoll_unsafe.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package rawfile
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func blockingPoll(fds *pollEvent, nfds int, timeout int64) (int, syscall.Errno) {
|
||||
n, _, e := syscall.Syscall(syscall.SYS_POLL,
|
||||
uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
return int(n), e
|
||||
}
|
Reference in New Issue
Block a user