Lines Matching refs:pfds
466 static void process_data_sock(int h, struct pollfd* pfds, int count) { in process_data_sock() argument
470 if (pfds[i].revents) { in process_data_sock()
472 asrt(pfds[i].fd == ts[h].ps[ps_i].pfd.fd); in process_data_sock()
476 print_events(pfds[i].revents); in process_data_sock()
477 if (IS_READ(pfds[i].revents)) { in process_data_sock()
480 if (IS_WRITE(pfds[i].revents)) { in process_data_sock()
483 if (IS_EXCEPTION(pfds[i].revents)) { in process_data_sock()
490 if (flags) ts[h].callback(pfds[i].fd, type, flags, user_id); in process_data_sock()
495 static void prepare_poll_fds(int h, struct pollfd* pfds) { in prepare_poll_fds() argument
500 memset(pfds, 0, sizeof(pfds[0]) * ts[h].poll_count); in prepare_poll_fds()
510 pfds[pfd_i] = ts[h].ps[ps_i].pfd; in prepare_poll_fds()
519 struct pollfd pfds[MAX_POLL]; in sock_poll_thread() local
520 memset(pfds, 0, sizeof(pfds)); in sock_poll_thread()
523 prepare_poll_fds(h, pfds); in sock_poll_thread()
525 OSI_NO_INTR(ret = poll(pfds, ts[h].poll_count, -1)); in sock_poll_thread()
533 if (pfds[0].revents) // cmd fd always is the first one in sock_poll_thread()
535 asrt(pfds[0].fd == ts[h].cmd_fdr); in sock_poll_thread()
545 if (need_process_data_fd) process_data_sock(h, pfds, ret); in sock_poll_thread()