Lines Matching refs:ptpr
35 struct lws_pt_eventlibs_libevent *ptpr = pt_to_priv_event(pt); in lws_event_hrtimer_cb() local
50 evtimer_add(ptpr->hrtimer, &tv); in lws_event_hrtimer_cb()
59 struct lws_pt_eventlibs_libevent *ptpr = pt_to_priv_event(pt); in lws_event_idle_timer_cb() local
80 evtimer_add(ptpr->idle_timer, &tv); in lws_event_idle_timer_cb()
94 evtimer_add(ptpr->hrtimer, &tv); in lws_event_idle_timer_cb()
182 struct lws_pt_eventlibs_libevent *ptpr = pt_to_priv_event(pt); in elops_listen_init_event() local
187 w_read->watcher = event_new(ptpr->io_loop, wsi->desc.sockfd, in elops_listen_init_event()
200 struct lws_pt_eventlibs_libevent *ptpr = pt_to_priv_event(pt); in elops_init_pt_event() local
215 ptpr->io_loop = loop; in elops_init_pt_event()
221 ptpr->hrtimer = event_new(loop, -1, EV_PERSIST, in elops_init_pt_event()
224 ptpr->idle_timer = event_new(loop, -1, 0, in elops_init_pt_event()
230 evtimer_add(ptpr->hrtimer, &tv); in elops_init_pt_event()
238 ptpr->w_sigint.watcher = evsignal_new(loop, SIGINT, in elops_init_pt_event()
240 event_add(ptpr->w_sigint.watcher, NULL); in elops_init_pt_event()
264 struct lws_pt_eventlibs_libevent *ptpr; in elops_accept_event() local
273 ptpr = pt_to_priv_event(pt); in elops_accept_event()
280 wpr->w_read.watcher = event_new(ptpr->io_loop, fd, in elops_accept_event()
282 wpr->w_write.watcher = event_new(ptpr->io_loop, fd, in elops_accept_event()
292 struct lws_pt_eventlibs_libevent *ptpr = pt_to_priv_event(pt); in elops_io_event() local
295 if (!ptpr->io_loop || wsi->a.context->being_destroyed || in elops_io_event()
352 struct lws_pt_eventlibs_libevent *ptpr = pt_to_priv_event(pt); in elops_destroy_pt_event() local
354 if (!ptpr->io_loop) in elops_destroy_pt_event()
359 event_free(ptpr->hrtimer); in elops_destroy_pt_event()
360 event_free(ptpr->idle_timer); in elops_destroy_pt_event()
363 event_del(ptpr->w_sigint.watcher); in elops_destroy_pt_event()
364 event_free(ptpr->w_sigint.watcher); in elops_destroy_pt_event()
365 event_base_loopexit(ptpr->io_loop, NULL); in elops_destroy_pt_event()
410 struct lws_pt_eventlibs_libevent *ptpr; in elops_init_vhost_listen_wsi_event() local
425 ptpr = pt_to_priv_event(pt); in elops_init_vhost_listen_wsi_event()
432 w->w_read.watcher = event_new(ptpr->io_loop, fd, (EV_READ | EV_PERSIST), in elops_init_vhost_listen_wsi_event()
434 w->w_write.watcher = event_new(ptpr->io_loop, fd, in elops_init_vhost_listen_wsi_event()
447 struct lws_pt_eventlibs_libevent *ptpr; in elops_destroy_context2_event() local
454 ptpr = pt_to_priv_event(pt); in elops_destroy_context2_event()
458 if (pt->event_loop_foreign || !ptpr->io_loop) in elops_destroy_context2_event()
462 event_base_loopexit(ptpr->io_loop, NULL); in elops_destroy_context2_event()
466 (m = event_base_loop(ptpr->io_loop, EVLOOP_NONBLOCK))) in elops_destroy_context2_event()
471 event_base_free(ptpr->io_loop); in elops_destroy_context2_event()
472 ptpr->io_loop = NULL; in elops_destroy_context2_event()