• Home
  • Raw
  • Download

Lines Matching refs:timeout

41 	struct eloop_timeout *timeout;  member
116 struct eloop_timeout *timeout, *tmp, *prev; in eloop_register_timeout() local
118 timeout = (struct eloop_timeout *) malloc(sizeof(*timeout)); in eloop_register_timeout()
119 if (timeout == NULL) in eloop_register_timeout()
121 os_get_time(&timeout->time); in eloop_register_timeout()
122 timeout->time.sec += secs; in eloop_register_timeout()
123 timeout->time.usec += usecs; in eloop_register_timeout()
124 while (timeout->time.usec >= 1000000) { in eloop_register_timeout()
125 timeout->time.sec++; in eloop_register_timeout()
126 timeout->time.usec -= 1000000; in eloop_register_timeout()
128 timeout->eloop_data = eloop_data; in eloop_register_timeout()
129 timeout->user_data = user_data; in eloop_register_timeout()
130 timeout->handler = handler; in eloop_register_timeout()
131 timeout->next = NULL; in eloop_register_timeout()
133 if (eloop.timeout == NULL) { in eloop_register_timeout()
134 eloop.timeout = timeout; in eloop_register_timeout()
139 tmp = eloop.timeout; in eloop_register_timeout()
141 if (os_time_before(&timeout->time, &tmp->time)) in eloop_register_timeout()
148 timeout->next = eloop.timeout; in eloop_register_timeout()
149 eloop.timeout = timeout; in eloop_register_timeout()
151 timeout->next = prev->next; in eloop_register_timeout()
152 prev->next = timeout; in eloop_register_timeout()
162 struct eloop_timeout *timeout, *prev, *next; in eloop_cancel_timeout() local
166 timeout = eloop.timeout; in eloop_cancel_timeout()
167 while (timeout != NULL) { in eloop_cancel_timeout()
168 next = timeout->next; in eloop_cancel_timeout()
170 if (timeout->handler == handler && in eloop_cancel_timeout()
171 (timeout->eloop_data == eloop_data || in eloop_cancel_timeout()
173 (timeout->user_data == user_data || in eloop_cancel_timeout()
176 eloop.timeout = next; in eloop_cancel_timeout()
179 free(timeout); in eloop_cancel_timeout()
182 prev = timeout; in eloop_cancel_timeout()
184 timeout = next; in eloop_cancel_timeout()
197 tmp = eloop.timeout; in eloop_is_timeout_registered()
311 (eloop.timeout || eloop.reader_count > 0)) { in eloop_run()
312 if (eloop.timeout) { in eloop_run()
314 if (os_time_before(&now, &eloop.timeout->time)) in eloop_run()
315 os_time_sub(&eloop.timeout->time, &now, &tv); in eloop_run()
329 if (eloop.timeout) { in eloop_run()
333 if (!os_time_before(&now, &eloop.timeout->time)) { in eloop_run()
334 tmp = eloop.timeout; in eloop_run()
335 eloop.timeout = eloop.timeout->next; in eloop_run()
370 struct eloop_timeout *timeout, *prev; in eloop_destroy() local
372 timeout = eloop.timeout; in eloop_destroy()
373 while (timeout != NULL) { in eloop_destroy()
374 prev = timeout; in eloop_destroy()
375 timeout = timeout->next; in eloop_destroy()