Rtos API example

Embed: (wiki syntax)

« Back to documentation index

lwip_timeouts.c File Reference

lwip_timeouts.c File Reference

Stack-internal timers implementation. More...

Go to the source code of this file.

Functions

static void tcpip_tcp_timer (void *arg)
 Timer callback function that calls tcp_tmr() and reschedules itself.
void tcp_timer_needed (void)
 Called from TCP_REG when registering a new PCB: the reason is to have the TCP timer only running when there are active (or time-wait) PCBs.
static void cyclic_timer (void *arg)
 Timer callback function that calls mld6_tmr() and reschedules itself.
void sys_timeouts_init (void)
 Initialize this module.
void sys_timeout_debug (u32_t msecs, sys_timeout_handler handler, void *arg, const char *handler_name) void sys_timeout(u32_t msecs
 Create a one-shot timer (aka timeout).

Variables

struct lwip_cyclic_timer lwip_cyclic_timers []
 This array contains all stack-internal cyclic timers.
static struct sys_timeo * next_timeout
 The one and only timeout list.
static int tcpip_tcp_timer_active
 global variable that shows if the tcp timer is currently scheduled or not

Detailed Description

Stack-internal timers implementation.

This file includes timer callbacks for stack-internal timers as well as functions to set up or stop timers and check for expired timers.

Definition in file lwip_timeouts.c.


Function Documentation

static void cyclic_timer ( void *  arg ) [static]

Timer callback function that calls mld6_tmr() and reschedules itself.

Parameters:
argunused argument

Definition at line 164 of file lwip_timeouts.c.

void sys_timeout_debug ( u32_t  msecs,
sys_timeout_handler  handler,
void *  arg,
const char *  handler_name 
)

Create a one-shot timer (aka timeout).

Timeouts are processed in the following cases:

  • while waiting for a message using sys_timeouts_mbox_fetch()
  • by calling sys_check_timeouts() (NO_SYS==1 only)
Parameters:
msecstime in milliseconds after that the timer should expire
handlercallback function to call when msecs have elapsed
argargument to pass to the callback function
void sys_timeouts_init ( void   )

Initialize this module.

Definition at line 175 of file lwip_timeouts.c.

void tcp_timer_needed ( void   )

Called from TCP_REG when registering a new PCB: the reason is to have the TCP timer only running when there are active (or time-wait) PCBs.

External function (implemented in timers.c), called when TCP detects that a timer is needed (i.e.

Definition at line 147 of file lwip_timeouts.c.

static void tcpip_tcp_timer ( void *  arg ) [static]

Timer callback function that calls tcp_tmr() and reschedules itself.

Parameters:
argunused argument

Definition at line 125 of file lwip_timeouts.c.


Variable Documentation

This array contains all stack-internal cyclic timers.

To get the number of timers, use LWIP_ARRAYSIZE()

Definition at line 71 of file lwip_timeouts.c.

struct sys_timeo* next_timeout [static]

The one and only timeout list.

Definition at line 112 of file lwip_timeouts.c.

int tcpip_tcp_timer_active [static]

global variable that shows if the tcp timer is currently scheduled or not

Definition at line 117 of file lwip_timeouts.c.