Lines Matching refs:pfds
503 static void process_data_sock(int h, struct pollfd *pfds, int count) in process_data_sock() argument
509 if(pfds[i].revents) in process_data_sock()
512 asrt(pfds[i].fd == ts[h].ps[ps_i].pfd.fd); in process_data_sock()
516 print_events(pfds[i].revents); in process_data_sock()
517 if(IS_READ(pfds[i].revents)) in process_data_sock()
521 if(IS_WRITE(pfds[i].revents)) in process_data_sock()
525 if(IS_EXCEPTION(pfds[i].revents)) in process_data_sock()
534 ts[h].callback(pfds[i].fd, type, flags, user_id); in process_data_sock()
539 static void prepare_poll_fds(int h, struct pollfd* pfds) in prepare_poll_fds() argument
545 memset(pfds, 0, sizeof(pfds[0])*ts[h].poll_count); in prepare_poll_fds()
556 pfds[pfd_i] = ts[h].ps[ps_i].pfd; in prepare_poll_fds()
566 struct pollfd pfds[MAX_POLL]; in sock_poll_thread() local
567 memset(pfds, 0, sizeof(pfds)); in sock_poll_thread()
571 prepare_poll_fds(h, pfds); in sock_poll_thread()
573 OSI_NO_INTR(ret = poll(pfds, ts[h].poll_count, -1)); in sock_poll_thread()
582 if(pfds[0].revents) //cmd fd always is the first one in sock_poll_thread()
584 asrt(pfds[0].fd == ts[h].cmd_fdr); in sock_poll_thread()
595 process_data_sock(h, pfds, ret); in sock_poll_thread()