Lines Matching refs:pfds
15 func libc_poll(pfds *pollfd, npfds uintptr, timeout uintptr) int32
42 pfds []pollfd var
75 pfds = make([]pollfd, 1, 128)
77 println("*** allocating done", &pfds[0])
81 pfds[0].fd = rdwake
82 pfds[0].events = _POLLIN
118 pd.user = uint32(len(pfds))
119 pfds = append(pfds, pollfd{fd: int32(fd)})
135 for i := 0; i < len(pfds); i++ {
136 if pfds[i].fd == int32(fd) {
137 pfds[i] = pfds[len(pfds)-1]
138 pfds = pfds[:len(pfds)-1]
162 pfds[pd.user].events |= _POLLIN
164 pfds[pd.user].events |= _POLLOUT
188 n := libc_poll(&pfds[0], uintptr(len(pfds)), timeout)
195 println("errno=", e, " len(pfds)=", len(pfds))
205 if n != 0 && pfds[0].revents&(_POLLIN|_POLLHUP|_POLLERR) != 0 {
218 for i := 0; i < len(pfds) && n > 0; i++ {
219 pfd := &pfds[i]