Lines Matching refs:pfds
494 static void process_data_sock(int h, struct pollfd *pfds, int count) in process_data_sock() argument
500 if(pfds[i].revents) in process_data_sock()
503 asrt(pfds[i].fd == ts[h].ps[ps_i].pfd.fd); in process_data_sock()
507 print_events(pfds[i].revents); in process_data_sock()
508 if(IS_READ(pfds[i].revents)) in process_data_sock()
512 if(IS_WRITE(pfds[i].revents)) in process_data_sock()
516 if(IS_EXCEPTION(pfds[i].revents)) in process_data_sock()
525 ts[h].callback(pfds[i].fd, type, flags, user_id); in process_data_sock()
530 static void prepare_poll_fds(int h, struct pollfd* pfds) in prepare_poll_fds() argument
536 memset(pfds, 0, sizeof(pfds[0])*ts[h].poll_count); in prepare_poll_fds()
547 pfds[pfd_i] = ts[h].ps[ps_i].pfd; in prepare_poll_fds()
557 struct pollfd pfds[MAX_POLL]; in sock_poll_thread() local
558 memset(pfds, 0, sizeof(pfds)); in sock_poll_thread()
562 prepare_poll_fds(h, pfds); in sock_poll_thread()
563 int ret = poll(pfds, ts[h].poll_count, -1); in sock_poll_thread()
572 if(pfds[0].revents) //cmd fd always is the first one in sock_poll_thread()
574 asrt(pfds[0].fd == ts[h].cmd_fdr); in sock_poll_thread()
585 process_data_sock(h, pfds, ret); in sock_poll_thread()