DDEKit_timer

Timer subsystem. More...

Functions

int ddekit_add_timer (void(*fn)(void *), void *args, unsigned long timeout)
 Add a timer event.
int ddekit_del_timer (int timer)
 Delete timer with the corresponding timer id.
int ddekit_timer_pending (int timer)
 Check whether a timer is pending.
void ddekit_init_timers (void)
 Initialization function, startup timer thread.

Detailed Description

Timer subsystem.

DDEKit provides a generic timer implementation that enables users to execute a function with some arguments after a certain period of time. DDEKit therefore starts a timer thread that executes these functions and keeps track of the currently running timers.


Function Documentation

int ddekit_add_timer ( void(*)(void *)  fn,
void *  args,
unsigned long  timeout 
)

Add a timer event.

After the absolute timeout has expired, function fn is called with args as arguments.

Returns:
>=0 valid timer ID

< 0 error

Definition at line 81 of file ddekit/src/timer.c.

int ddekit_del_timer ( int  timer  ) 

Delete timer with the corresponding timer id.

Definition at line 133 of file ddekit/src/timer.c.

void ddekit_init_timers ( void   ) 

Initialization function, startup timer thread.

Definition at line 321 of file ddekit/src/timer.c.

int ddekit_timer_pending ( int  timer  ) 

Check whether a timer is pending.

Linux needs this.

Check whether a timer is pending.

Parameters:
timer Timer ID to check for.
Returns:
0 if not pending 1 if timer is pending

Definition at line 193 of file ddekit/src/timer.c.


Generated on Wed Apr 11 06:39:16 2012 for DDE - The L4 Device Driver Environment by  doxygen 1.5.6