Lines Matching defs:n_events
85 int n_events;
116 if (wes->n_events < wes->capacity)
118 we_set_event (wes, wes->n_events, event, EVENT_WRITE, arg);
119 ++wes->n_events;
126 if (wes->n_events < wes->capacity)
128 we_set_event (wes, wes->n_events, event, EVENT_READ, arg);
129 ++wes->n_events;
141 const int len = wes->n_events;
147 --wes->n_events;
164 ASSERT (index >= 0 && index < wes->n_events);
165 for (i = index; i < wes->n_events - 1; ++i)
170 --wes->n_events;
178 for (i = 0; i < wes->n_events; ++i)
208 wes->n_events = 0;
225 wes->n_events,
348 dmsg (D_EVENT_WAIT, "WE_WAIT enter n=%d to=%d", wes->n_events, timeout);
353 for (i = 0; i < wes->n_events; ++i)
366 (DWORD) wes->n_events,
376 if (status >= WSA_WAIT_EVENT_0 && status < WSA_WAIT_EVENT_0 + (DWORD) wes->n_events)
380 for (i = 0; i < wes->n_events; ++i)
408 (DWORD) wes->n_events,
414 if (outlen >= 1 && status >= WSA_WAIT_EVENT_0 && status < WSA_WAIT_EVENT_0 + (DWORD) wes->n_events)
446 wes->n_events = 0;
621 int n_events;
639 pos->n_events = 0;
651 for (i = 0; i < pos->n_events; ++i)
656 for (j = i; j < pos->n_events - 1; ++j)
661 --pos->n_events;
680 if (pos->n_events < pos->capacity)
682 struct pollfd *pfdp = &pos->events[pos->n_events];
684 pos->args[pos->n_events] = arg;
686 ++pos->n_events;
709 for (i = 0; i < pos->n_events; ++i)
736 stat = poll (pos->events, pos->n_events, tv_to_ms_timeout (tv));
738 ASSERT (stat <= pos->n_events);
744 for (i = 0; i < pos->n_events && j < outlen; ++i)
789 pos->n_events = 0;