#include "lwip/opt.h"
#include "lwip/err.h"
#include "lwip/sys.h"
#define LWIP_DEBUG_TIMERNAMES 0 |
typedef void(* sys_timeout_handler)(void *arg) |
Function prototype for a timeout callback function.
Register such a function using sys_timeout().
- Parameters
-
arg | Additional argument to pass to the function - set up by sys_timeout() |
Create a one-shot timer (aka timeout).
Timeouts are processed in the following cases:
- Parameters
-
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 |
Referenced by sys_sem_wait_timeout(), and tcpip_thread().
void sys_timeouts_init |
( |
void |
| ) |
|
void sys_timeouts_mbox_fetch |
( |
sys_mbox_t * |
mbox, |
|
|
void ** |
msg |
|
) |
| |
Go through timeout list (for this task only) and remove the first matching entry, even though the timeout has not triggered yet.
- Note
- This function only works as expected if there is only one timeout calling 'h' in the list of timeouts.
- Parameters
-
h | callback function that would be called by the timeout |
arg | callback argument that would be passed to h |
Referenced by sys_sem_wait_timeout(), and tcpip_thread().