[Olsr-dev] Development tips on timers

ZioPRoTo (Saverio Proto) (spam-protected)
Thu Jun 11 17:56:07 CEST 2009


I'm working on the implementation of the OLSR OBAMP plugin.

(Yes, finally I decided to implement OBAMP as a OLSR plugin, and not
as a protocol independent stuff. There are several motivations for
this choice, but this is a different topic)

I want to avoid libpthread because I know that they are very bad when
using olsrd with ulibc.

So, instead of having different threads with while(1) loops ... what
should I do ?

Should I use the struct timer_entry (from scheduler.h) and create a
callback to each of my functions, to call them every second for
example ?

For example to generate an OBAMP hello message every 5 second can I
use a timer_entry like it is done for the MID messages ??

Any good documentation to go to see other than scheduler.h ?

thank you :)


More information about the Olsr-dev mailing list