#include "lwip/opt.h"
#include "lwip/err.h"
#include "lwip/sys.h"
Data Structures | |
struct | sys_timeo |
Macros | |
#define | LWIP_DEBUG_TIMERNAMES 0 |
#define | LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) |
Typedefs | |
typedef void(* | sys_timeout_handler )(void *arg) |
Function prototype for a timeout callback function. More... | |
Functions | |
void | sys_timeout (u32_t msecs, sys_timeout_handler handler, void *arg) |
Create a one-shot timer (aka timeout). More... | |
void | sys_timeouts_init (void) |
void | sys_timeouts_mbox_fetch (sys_mbox_t *mbox, void **msg) |
void | sys_untimeout (sys_timeout_handler handler, void *arg) |
Go through timeout list (for this task only) and remove the first matching entry, even though the timeout has not triggered yet. More... | |
#define LWIP_DEBUG_TIMERNAMES 0 |
#define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) |
typedef void(* sys_timeout_handler)(void *arg) |
Function prototype for a timeout callback function.
Register such a function using sys_timeout().
arg | Additional argument to pass to the function - set up by sys_timeout() |
void sys_timeout | ( | u32_t | msecs, |
sys_timeout_handler | h, | ||
void * | arg | ||
) |
Create a one-shot timer (aka timeout).
Timeouts are processed in the following cases:
msecs | time in milliseconds after that the timer should expire |
h | callback function to call when msecs have elapsed |
arg | argument to pass to the callback function |
References sys_timeo::arg, arg, sys_timeo::h, LWIP_ASSERT, LWIP_DEBUGF, memp_malloc(), sys_timeo::next, sys_timeouts::next, NULL, sys_arch_timeouts(), SYS_DEBUG, sys_timeo::time, and U32_F.
void sys_timeouts_init | ( | void | ) |
void sys_timeouts_mbox_fetch | ( | sys_mbox_t * | mbox, |
void ** | msg | ||
) |
void sys_untimeout | ( | sys_timeout_handler | h, |
void * | arg | ||
) |
Go through timeout list (for this task only) and remove the first matching entry, even though the timeout has not triggered yet.
h | callback function that would be called by the timeout |
arg | callback argument that would be passed to h |
References sys_timeo::arg, sys_timeo::h, LWIP_ASSERT, memp_free(), sys_timeo::next, sys_timeouts::next, NULL, sys_arch_timeouts(), and sys_timeo::time.