laforge at gnumonks.org
Sun Mar 7 00:41:08 UTC 2010
we now have a 'struct timer_list' API, its use is similar to that of
the linux kernel (and openbsc).
The caller (e.g. your driver/app) allocates a 'struct timer_list', sets
the 'cb' function pointer to a callback function, and then schedules the
timer with 'schedule_timer(&my_struct_tm, 600) for expiration in e.g. 600ms
Once the timer expires, it will call the callback. There's also an
'unsigned long' argument that you can pass along.
Calling the timer expiration routines happens by calling update_timers() from
the while (1) loop in the main program. This will of course change once
we have a scheduler and tasks.
- Harald Welte <laforge at gnumonks.org> http://laforge.gnumonks.org/
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
More information about the baseband-devel