1
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
57
58
59
62
63
64
66
67
68
70
77
78
80
81
82
83
84
85
86
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
109
110
111
112
113
114
115
116
117
118
120
121
122
123
124
125
126
127
128
/* ... */
/* ... */
#ifndef LWIP_HDR_TIMEOUTS_H
#define LWIP_HDR_TIMEOUTS_H
#include "lwip/opt.h"
#include "lwip/err.h"
#if !NO_SYS
#include "lwip/sys.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef LWIP_DEBUG_TIMERNAMES
#ifdef LWIP_DEBUG
#define LWIP_DEBUG_TIMERNAMES SYS_DEBUG
#else
#define LWIP_DEBUG_TIMERNAMES 0
#endif /* ... */
#endif
/* ... */
#define SYS_TIMEOUTS_SLEEPTIME_INFINITE 0xFFFFFFFF
/* ... */
typedef void (* lwip_cyclic_timer_handler)(void);
/* ... */
struct lwip_cyclic_timer {
u32_t interval_ms;
lwip_cyclic_timer_handler handler;
#if LWIP_DEBUG_TIMERNAMES
const char* handler_name;
#endif
...};
/* ... */
extern const struct lwip_cyclic_timer lwip_cyclic_timers[];
extern const int lwip_num_cyclic_timers;
#if LWIP_TIMERS
/* ... */
typedef void (* sys_timeout_handler)(void *arg);
struct sys_timeo {
struct sys_timeo *next;
u32_t time;
sys_timeout_handler h;
void *arg;
#if LWIP_DEBUG_TIMERNAMES
const char* handler_name;
#endif
...};
void sys_timeouts_init(void);
#if LWIP_DEBUG_TIMERNAMES
void sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char* handler_name);
#define sys_timeout(msecs, handler, arg) sys_timeout_debug(msecs, handler, arg, #handler)
/* ... */#else
void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg);
#endif
void sys_untimeout(sys_timeout_handler handler, void *arg);
void sys_restart_timeouts(void);
void sys_check_timeouts(void);
u32_t sys_timeouts_sleeptime(void);
#if LWIP_TESTMODE
struct sys_timeo** sys_timeouts_get_next_timeout(void);
void lwip_cyclic_timer(void *arg);/* ... */
#endif
/* ... */
#endif
#ifdef __cplusplus
}extern "C" { ... }
#endif
/* ... */
#endif