[Olsr-dev] OLSR Basic Multicast Forwarding (BMF) pluginv1.6.1available

Erik Tromp (spam-protected)
Wed Jul 30 15:31:54 CEST 2008


> Yes, it does...
> Imagine the case that olsrd has too much to do, so it never 
> sleeps because the handling of routing/packages takes more 
> time than the polling time.
> 
> This way the if() would always skip the while loop.
> 
> In my modification the lock is at least released for a moment 
> (maybe we should put a "yield" into it ?) if this happens.

Ok, I agree.


> yes, select can do this. You just wait for two sockets at 
> once AND set a timeout value.

I remember being here before.... I cannot find the mail back in the archive,
but, indeed it would be a nice new feature to replace the quite useless
'nanosleep' for a duration of 'Pollrate' seconds (default 50 msec) by a
'select' that waits for at most that time but returns earlier as soon as a
packet arrives (that is: synchronously, not 'realtime' :-)

Just looking into the man page of select(2):

"The select function may update the timeout parameter to indicate how much
time was left."

What worries me here is the word "may". It would be quite useful to know the
time left. But that is a worry for the implementor.

Erik





More information about the Olsr-dev mailing list