timer_list implementation

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/baseband-devel@lists.osmocom.org/.

Harald Welte laforge at gnumonks.org
Sun Mar 7 00:41:08 UTC 2010


hi!

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
from now.

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.

Cheers,
	Harald
-- 
- 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 mailing list