PATCH: Microsecond sleep time

Stipe Tolj st at tolj.org
Wed Jul 2 16:18:09 CEST 2008


Werner Coetzee schrieb:
> Hi
> 
> Can anyone explain why gwthread is using the poll function to sleep (using milliseconds as timeout), and not maybe the select function (using microseconds as timeout)?
> 
> We have the requirement to be able to sleep for less than a millisecond, which the current gwthread_sleep can't provide.
> 
> Below is a patch to do just that, using the select function.
> I have tested it, so if anyone has any comments, please let me hear them.
> 
> The diff is from our own SVN repository, but as far as I know, it is up-to-date with the cvs.

Hi Werner,

I'm +0 for applying the patch to CVS, since it's an additive feature and doesn't 
hurt any existing core bricks of the gwlib.

The calls should be POSIX.1 compliant and portable hence I guess.

Werner, could you do me a favor and resend the patch in a single file as mail 
attachment please. This ensures we don't get truncated end of line chars etc, 
which is a mess to correct by hand while patching ;)

And thanks a lot for contributing.

Stipe

-------------------------------------------------------------------
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture      Kannel Software Foundation (KSF)
http://www.tolj.org/              http://www.kannel.org/

mailto:st_{at}_tolj.org           mailto:stolj_{at}_kannel.org
-------------------------------------------------------------------



More information about the devel mailing list