Florian Weimer
unread,Mar 3, 2021, 5:00:32 PM3/3/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
Do I have to tell the runtime that a system call is blocking? For
example, I use this code snippet to perform a blocking ioctl:
conn, err := file.SyscallConn()
if err != nil {
return
}
err1 := conn.Control(func(fd uintptr) {
_, _, err2 := syscall.Syscall(syscall.SYS_IOCTL,
fd, uintptr(req), 0)
if err2 != 0 {
err = err2
}
})
And the syscall can block until some hardware timeout occurs. The
file descriptor has already been transitioned to blocking mode using
file.FD(). Is there anything else left to do, so that the runtime
knows it may have to spawn a new worker thread or something like that?