[olsr-dev] Re: olsr bmf question
Wed Dec 27 23:07:27 CET 2006
> The timeout parameter is passed to the select() call as a pointer, so
> it COULD return the remaining time there. In fact, IT DOES in linux,
> thus implementation of this scheme in linux is perfectly possible
> (I've done that before), but this is a particularity of linux. In
> fact, posix says the timeout return value of select() is undefined, so
> the problem would be the implementation on other operating systems.
I seem to remember having used this approach in olsrd earlier... Hmmm...
just be that I've planned on doing it that way. Anyways, yes, I think
with a timeout instead of sleeping is a good idea. And as for the return
of the timeval I guess the best thing would be just to grab a timestamp
to and after calling select(after if the FD set was set, and after the
processed which would not be taken into account if just using the returned
timeval) and keep on calling select until the scheduler should kick in.
I do not believe this is something for the next release which will
mainly be a bugfix
release, but I agree it should be addressed pretty soon.
More information about the Olsr-dev