Lines Matching defs:context
32 _lws_plat_service_forced_tsi(struct lws_context *context, int tsi)
34 struct lws_context_per_thread *pt = &context->pt[tsi];
37 r = lws_service_flag_pending(context, tsi);
45 m = lws_service_fd_tsi(context, &pt->fds[n], tsi);
61 _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
71 if (context == NULL)
74 pt = &context->pt[tsi];
76 if (!pt->service_tid_detected && context->vhost_list) {
79 lws_fakewsi_prep_plwsa_ctx(context);
81 pt->service_tid = context->vhost_list->
95 if (context->event_loop_ops->run_pt)
96 context->event_loop_ops->run_pt(context, tsi);
104 wsi = wsi_from_fd(context, pfd->fd);
110 n = lws_service_fd(context, pfd);
142 timeout_us = us < context->us_wait_resolution ?
143 context->us_wait_resolution : us;
148 if (_lws_plat_service_forced_tsi(context, tsi))
155 if (!lws_service_adjust_timeout(context, 1, tsi))
169 if (pt->context->tls_ops &&
170 pt->context->tls_ops->fake_POLLIN_for_buffered)
171 pt->context->tls_ops->fake_POLLIN_for_buffered(pt);
177 lws_service_fd_tsi(context, &pt->fds[n], tsi);
184 lws_plat_service(struct lws_context *context, int timeout_ms)
186 return _lws_plat_service_tsi(context, timeout_ms, 0);