Lines Matching refs:ps

88   poll_slot_t ps[MAX_POLL];  member
349 ts[h].ps[i].pfd.fd = -1; in init_poll()
362 static inline void set_poll(poll_slot_t* ps, int fd, int type, int flags, in set_poll() argument
364 ps->pfd.fd = fd; in set_poll()
365 ps->user_id = user_id; in set_poll()
366 if (ps->type != 0 && ps->type != type) in set_poll()
369 ps->type, type); in set_poll()
370 ps->type = type; in set_poll()
371 ps->flags = flags; in set_poll()
372 ps->pfd.events = flags2pevents(flags); in set_poll()
373 ps->pfd.revents = 0; in set_poll()
380 poll_slot_t* ps = ts[h].ps; in add_poll() local
383 if (ps[i].pfd.fd == fd) { in add_poll()
386 set_poll(&ps[i], fd, type, flags | ps[i].flags, user_id); in add_poll()
388 } else if (empty < 0 && ps[i].pfd.fd == -1) in add_poll()
393 set_poll(&ps[empty], fd, type, flags, user_id); in add_poll()
399 static inline void remove_poll(int h, poll_slot_t* ps, int flags) { in remove_poll() argument
400 if (flags == ps->flags) { in remove_poll()
403 memset(ps, 0, sizeof(*ps)); in remove_poll()
404 ps->pfd.fd = -1; in remove_poll()
407 ps->flags &= ~flags; in remove_poll()
409 ps->pfd.events = flags2pevents(ps->flags); in remove_poll()
430 poll_slot_t* poll_slot = &ts[h].ps[i]; in process_cmd_sock()
472 asrt(pfds[i].fd == ts[h].ps[ps_i].pfd.fd); in process_data_sock()
473 uint32_t user_id = ts[h].ps[ps_i].user_id; in process_data_sock()
474 int type = ts[h].ps[ps_i].type; in process_data_sock()
486 remove_poll(h, &ts[h].ps[ps_i], ts[h].ps[ps_i].flags); in process_data_sock()
488 remove_poll(h, &ts[h].ps[ps_i], in process_data_sock()
509 if (ts[h].ps[ps_i].pfd.fd >= 0) { in prepare_poll_fds()
510 pfds[pfd_i] = ts[h].ps[ps_i].pfd; in prepare_poll_fds()