• Home
  • Raw
  • Download

Lines Matching refs:ps

91     poll_slot_t ps[MAX_POLL];  member
385 ts[h].ps[i].pfd.fd = -1; in init_poll()
401 static inline void set_poll(poll_slot_t* ps, int fd, int type, int flags, uint32_t user_id) in set_poll() argument
403 ps->pfd.fd = fd; in set_poll()
404 ps->user_id = user_id; in set_poll()
405 if(ps->type != 0 && ps->type != type) in set_poll()
406 … APPL_TRACE_ERROR("poll socket type should not changed! type was:%d, type now:%d", ps->type, type); in set_poll()
407 ps->type = type; in set_poll()
408 ps->flags = flags; in set_poll()
409 ps->pfd.events = flags2pevents(flags); in set_poll()
410 ps->pfd.revents = 0; in set_poll()
417 poll_slot_t* ps = ts[h].ps; in add_poll() local
421 if(ps[i].pfd.fd == fd) in add_poll()
425 set_poll(&ps[i], fd, type, flags | ps[i].flags, user_id); in add_poll()
428 else if(empty < 0 && ps[i].pfd.fd == -1) in add_poll()
434 set_poll(&ps[empty], fd, type, flags, user_id); in add_poll()
440 static inline void remove_poll(int h, poll_slot_t* ps, int flags) in remove_poll() argument
442 if(flags == ps->flags) in remove_poll()
446 memset(ps, 0, sizeof(*ps)); in remove_poll()
447 ps->pfd.fd = -1; in remove_poll()
452 ps->flags &= ~flags; in remove_poll()
454 ps->pfd.events = flags2pevents(ps->flags); in remove_poll()
479 poll_slot_t *poll_slot = &ts[h].ps[i]; in process_cmd_sock()
512 asrt(pfds[i].fd == ts[h].ps[ps_i].pfd.fd); in process_data_sock()
513 uint32_t user_id = ts[h].ps[ps_i].user_id; in process_data_sock()
514 int type = ts[h].ps[ps_i].type; in process_data_sock()
529 remove_poll(h, &ts[h].ps[ps_i], ts[h].ps[ps_i].flags); in process_data_sock()
532 … remove_poll(h, &ts[h].ps[ps_i], flags); //remove the monitor flags that already processed in process_data_sock()
554 if(ts[h].ps[ps_i].pfd.fd >= 0) in prepare_poll_fds()
556 pfds[pfd_i] = ts[h].ps[ps_i].pfd; in prepare_poll_fds()