Lines Matching refs:pfds
19 func poll(pfds *pollfd, npfds uintptr, timeout uintptr) (int32, int32) {
20 r, err := syscall3(&libc_poll, uintptr(unsafe.Pointer(pfds)), npfds, timeout)
37 pfds []pollfd var
56 pfds = make([]pollfd, 1, 128)
59 pfds[0].fd = rdwake
60 pfds[0].events = _POLLIN
86 pd.user = uint32(len(pfds))
87 pfds = append(pfds, pollfd{fd: int32(fd)})
100 for i := 0; i < len(pfds); i++ {
101 if pfds[i].fd == int32(fd) {
102 pfds[i] = pfds[len(pfds)-1]
103 pfds = pfds[:len(pfds)-1]
124 pfds[pd.user].events |= _POLLIN
126 pfds[pd.user].events |= _POLLOUT
164 n, e := poll(&pfds[0], uintptr(len(pfds)), timeout)
167 println("errno=", e, " len(pfds)=", len(pfds))
179 if n != 0 && pfds[0].revents&(_POLLIN|_POLLHUP|_POLLERR) != 0 {
193 for i := 1; i < len(pfds) && n > 0; i++ {
194 pfd := &pfds[i]