OpenTCP implementation of a timer pool used by all applications.
Definition in file timers.c.
Go to the source code of this file.
Functions | |
void | timer_pool_init (void) |
Initialize timer pool. | |
UINT8 | get_timer (void) |
Obtain a timer from timer pool. | |
void | free_timer (UINT8 nbr) |
Release timer back to free timer pool. | |
void | init_timer (UINT8 nbr, UINT32 tout) |
Initialize timer to a given time-out value. | |
UINT32 | check_timer (UINT8 nbr) |
Return the value of a given timer. | |
void | decrement_timers (void) |
Decrement all timers' values by one. | |
Variables | |
struct { | |
} | timer_pool [NUMTIMERS] |
Timer pool used to keep information about available timers. |
|
Definition at line 105 of file timers.c. References NUMTIMERS, timer_pool, and TRUE. |
|
Definition at line 131 of file timers.c. References FALSE, NUMTIMERS, RESET_SYSTEM, timer_pool, and TRUE. Referenced by arp_init(), bootpc_init(), dhcpc_init(), dns_init(), pop3c_init(), smtpc_init(), tcp_init(), and tftps_init(). |
|
Definition at line 169 of file timers.c. References NUMTIMERS, timer_pool, and TRUE. |
|
TIMERTIC defines how quickly the timers' values are decremented so is it to initialize timers to correct timeouts. Definition at line 194 of file timers.c. References NUMTIMERS, OS_EnterCritical, OS_ExitCritical, timer_pool, and TRUE. Referenced by arp_init(), arp_manage(), bootpc_run(), dhcpc_init(), dhcpc_run(), dns_retransmit(), get_host_by_name(), tcp_init(), tcp_newstate(), and tcp_poll(). |
|
Definition at line 233 of file timers.c. References timer_pool. Referenced by arp_manage(), bootpc_run(), dhcpc_run(), dns_run(), and tcp_poll(). |
|
Definition at line 248 of file timers.c. References FALSE, NUMTIMERS, and timer_pool. |
|
This timer pool is extensively used by most of the modules of the OpenTCP project. All timers that are used are allocated from this pool. Maximum number of timers that can be used at any given time is defined by the NUMTIMERS define. Referenced by check_timer(), decrement_timers(), free_timer(), get_timer(), init_timer(), and timer_pool_init(). |