Lines Matching refs:pfds
22 func poll(pfds *pollfd, npfds uintptr, timeout uintptr) (int32, int32) {
23 r, err := syscall3(&libc_poll, uintptr(unsafe.Pointer(pfds)), npfds, timeout)
40 pfds []pollfd var
61 pfds = make([]pollfd, 1, 128)
64 pfds[0].fd = rdwake
65 pfds[0].events = _POLLIN
91 pd.user = uint32(len(pfds))
92 pfds = append(pfds, pollfd{fd: int32(fd)})
105 for i := 0; i < len(pfds); i++ {
106 if pfds[i].fd == int32(fd) {
107 pfds[i] = pfds[len(pfds)-1]
108 pfds = pfds[:len(pfds)-1]
129 pfds[pd.user].events |= _POLLIN
131 pfds[pd.user].events |= _POLLOUT
172 n, e := poll(&pfds[0], uintptr(len(pfds)), timeout)
175 println("errno=", e, " len(pfds)=", len(pfds))
187 if n != 0 && pfds[0].revents&(_POLLIN|_POLLHUP|_POLLERR) != 0 {
202 for i := 1; i < len(pfds) && n > 0; i++ {
203 pfd := &pfds[i]