kal_timer Struct Reference

Implementation of kal_timer based on hrtimer.h. More...

#include <kal_timer_hrtimer.h>

Data Fields

struct hrtimer hrtimer
kal_timer_cb timer_cb
kal_arg_t timer_cb_data
char handler_running

Detailed Description

Implementation of kal_timer based on hrtimer.h.

This type may be logically thought of as a subclass of hrtimer, so that (dynamic) casting from kal_timer * to/from hrtimer * is safe.

Note:
The field handler_running is useful whenever trying to cancel a timer from within its own handler (hrtimer_cancel() hangs the kernel on such a case, contrary to timer_del()). Such variable is set and unset within hrtimer_cb(), without any application-specific spinlock held. However, the only situation in which it is useful is when the application-supplied timer handler tries to delete the same timer, and it works for such a case. On the other hand, when cancelling a timer from non-interrupt context, the timer handler runs atomically w.r.t. the kernel code, thus the latter cannot find handler_running at 1 and erroneously skip the cancel of the timer.

Definition at line 43 of file kal_timer_hrtimer.h.


Field Documentation

Definition at line 47 of file kal_timer_hrtimer.h.

Definition at line 44 of file kal_timer_hrtimer.h.

Definition at line 45 of file kal_timer_hrtimer.h.

Definition at line 46 of file kal_timer_hrtimer.h.


The documentation for this struct was generated from the following file:
Generated on Mon Aug 2 22:39:17 2010 for qosres by  doxygen 1.6.3