Main Page | Modules | Class List | File List | Class Members | File Members | Related Pages

Time and Timer Implementation
[Linux DDE Common]

This module emulates one-shot kernel timers inside the Linux kernel. More...

Linux Timer Handling

This is from kernel/timer.c

void add_timer (struct timer_list *timer)
 Add One-Shot Timer.

int mod_timer (struct timer_list *timer, unsigned long expires)
 Modify One-Shot Timer.

int del_timer (struct timer_list *timer)
 Delete One-Shot Timer.

int __timer_sleep (l4_timeout_t to)
 Timer Sleep Implementation.


Functions

int l4dde_time_init ()
 Initialize Timer Thread.


Detailed Description

This module emulates one-shot kernel timers inside the Linux kernel.

One-shot timers in Linux are executed as a bottom half (TIMER_BH). Therefore only other BHs are prohibited while a timer function is executed.

Requirements: (additionally to Global Requirements)


Function Documentation

int __timer_sleep l4_timeout_t  to  )  [inline, static]
 

Timer Sleep Implementation.

Parameters:
to IPC timeout
Returns:
1 on timed out IPC (0 = message received and indicates __restart)
Has to be called holding the timerlist lock.

Definition at line 269 of file time.c.

References timer_tid, and timerlist_lock.

Referenced by dde_timer_thread().

void add_timer struct timer_list timer  ) 
 

Add One-Shot Timer.

Parameters:
timer timer reference to be added

Definition at line 174 of file time.c.

References __internal_add_timer(), and timerlist_lock.

Referenced by FASTCALL().

int del_timer struct timer_list timer  ) 
 

Delete One-Shot Timer.

Parameters:
timer timer reference to be removed
Returns:
0 if timer is pending; 1 if deletion completed

Definition at line 214 of file time.c.

References __internal_detach_timer(), and timerlist_lock.

int l4dde_time_init  ) 
 

Initialize Timer Thread.

Returns:
0 on success; negative error code otherwise
One timer thread is created on initialization.

Definition at line 417 of file time.c.

References _initialized, and dde_timer_thread().

int mod_timer struct timer_list timer,
unsigned long  expires
 

Modify One-Shot Timer.

Parameters:
timer timer reference to be modified
expires new expiration time
Returns:
0 if timer is pending; 1 if modification was okay

Definition at line 195 of file time.c.

References __internal_add_timer(), __internal_detach_timer(), and timerlist_lock.


Linux DDE, written by Christian Helmuth  © 2003 Technische Universitaet Dresden