Lines Matching defs:pt
33 struct lws_context_per_thread *pt = &wsi->a.context->pt[(int)wsi->tsi];
37 pt->dummy_pipe_fds[0] = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
38 pt->dummy_pipe_fds[1] = -1;
40 n = pt->dummy_pipe_fds[0] < 0 ? -1 : 0;
44 n = pipe2(pt->dummy_pipe_fds, O_NONBLOCK);
46 n = pipe(pt->dummy_pipe_fds);
53 if (fcntl(pt->dummy_pipe_fds[0], F_SETFL, O_NONBLOCK) < 0)
55 else if (pt->dummy_pipe_fds[1] >= 0) {
56 if (fcntl(pt->dummy_pipe_fds[1], F_SETFL, O_NONBLOCK) < 0)
67 struct lws_context_per_thread *pt = &ctx->pt[tsi];
71 return eventfd_write(pt->dummy_pipe_fds[0], value);
76 n = (int)write(pt->dummy_pipe_fds[1], &buf, 1);
85 struct lws_context_per_thread *pt = &wsi->a.context->pt[(int)wsi->tsi];
87 if (pt->dummy_pipe_fds[0] && pt->dummy_pipe_fds[0] != -1)
88 close(pt->dummy_pipe_fds[0]);
89 if (pt->dummy_pipe_fds[1] && pt->dummy_pipe_fds[1] != -1)
90 close(pt->dummy_pipe_fds[1]);
92 pt->dummy_pipe_fds[0] = pt->dummy_pipe_fds[1] = -1;