太难了

This commit is contained in:
impact-eintr
2021-09-02 21:48:59 +08:00
parent 347bc5217b
commit 293b15a309
9 changed files with 196 additions and 9 deletions

View 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
}