66static u32_t timeouts_last_time;
71static int tcpip_tcp_timer_active;
79tcpip_tcp_timer(
void *
arg)
86 if (tcp_active_pcbs || tcp_tw_pcbs) {
91 tcpip_tcp_timer_active = 0;
104 if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) {
106 tcpip_tcp_timer_active = 1;
119ip_reass_timer(
void *
arg)
151dhcp_timer_coarse(
void *
arg)
165dhcp_timer_fine(
void *
arg)
181autoip_timer(
void *
arg)
247 timeouts_last_time =
sys_now();
261#if LWIP_DEBUG_TIMERNAMES
280#if LWIP_DEBUG_TIMERNAMES
281 timeout->handler_name = handler_name;
283 (
void *)
timeout, msecs, handler_name, (
void *)
arg));
286 if (next_timeout ==
NULL) {
291 if (next_timeout->
time > msecs) {
292 next_timeout->
time -= msecs;
299 if (
t->next !=
NULL) {
325 if (next_timeout ==
NULL) {
329 for (
t = next_timeout, prev_t =
NULL;
t !=
NULL; prev_t =
t,
t =
t->next) {
333 if (prev_t ==
NULL) {
334 next_timeout =
t->
next;
336 prev_t->
next =
t->next;
339 if (
t->next !=
NULL) {
340 t->next->time +=
t->time;
358sys_check_timeouts(
void)
370 diff =
now - timeouts_last_time;
373#if PBUF_POOL_FREE_OOSEQ
374 PBUF_CHECK_FREE_OOSEQ();
377 tmptimeout = next_timeout;
378 if (tmptimeout && (tmptimeout->
time <= diff)) {
381 timeouts_last_time =
now;
382 diff -= tmptimeout->
time;
383 next_timeout = tmptimeout->
next;
386#if LWIP_DEBUG_TIMERNAMES
389 tmptimeout->handler_name,
arg));
408sys_restart_timeouts(
void)
410 timeouts_last_time =
sys_now();
434 if (next_timeout->
time > 0) {
444 tmptimeout = next_timeout;
445 next_timeout = tmptimeout->
next;
448#if LWIP_DEBUG_TIMERNAMES
451 tmptimeout->handler_name,
arg));
470 if (time_needed < next_timeout->
time) {
471 next_timeout->
time -= time_needed;
473 next_timeout->
time = 0;
#define LWIP_UNUSED_ARG(x)
UINT(* handler)(MSIPACKAGE *)
#define LWIP_DEBUGF(debug, message)
#define LWIP_ASSERT(message, assertion)
#define LOCK_TCPIP_CORE()
#define LWIP_TCPIP_THREAD_ALIVE()
#define UNLOCK_TCPIP_CORE()
void * memp_malloc(memp_t type)
void memp_free(memp_t type, void *mem)
u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
void tcp_timer_needed(void)
void(* sys_timeout_handler)(void *arg)
void sys_timeouts_init(void)
void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg)
void sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg)
void sys_untimeout(sys_timeout_handler handler, void *arg)