Lines Matching refs:pt

34 	struct lws_context_per_thread *pt = &context->pt[tsi];
40 for (n = 0; n < (int)pt->fds_count; n++) {
41 if (!pt->fds[n].revents)
44 unsigned int fds_count = pt->fds_count;
45 m = lws_service_fd_tsi(context, &pt->fds[n], tsi);
49 if (pt->fds_count != fds_count)
53 lws_service_do_ripe_rxflow(pt);
63 struct lws_context_per_thread *pt;
74 pt = &context->pt[tsi];
76 if (!pt->service_tid_detected && context->vhost_list) {
77 lws_fakewsi_def_plwsa(pt);
81 pt->service_tid = context->vhost_list->
85 pt->service_tid_detected = 1;
98 for (i = 0; i < pt->fds_count; ++i) {
99 pfd = &pt->fds[i];
131 lws_pt_lock(pt, __func__);
133 us = __lws_sul_service_ripe(pt->pt_sul_owner,
145 lws_pt_unlock(pt);
158 // lwsl_notice("%s: in %dms, count %d\n", __func__, (int)(timeout_us / 1000), pt->fds_count);
159 // for (n = 0; n < (int)pt->fds_count; n++)
160 // lwsl_notice("%s: fd %d ev 0x%x POLLIN %d, POLLOUT %d\n", __func__, (int)pt->fds[n].fd, (int)pt->fds[n].events, POLLIN, POLLOUT);
161 int d = WSAPoll((WSAPOLLFD *)&pt->fds[0], pt->fds_count, (int)(timeout_us / LWS_US_PER_MS));
163 lwsl_err("%s: WSAPoll failed: count %d, err %d: %d\n", __func__, pt->fds_count, d, WSAGetLastError());
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);
174 for (n = 0; n < (int)pt->fds_count; n++)
175 if (pt->fds[n].fd != LWS_SOCK_INVALID && pt->fds[n].revents) {
176 // lwsl_notice("%s: idx %d, revents 0x%x\n", __func__, n, pt->fds[n].revents);
177 lws_service_fd_tsi(context, &pt->fds[n], tsi);