[PATCH] clock_nanosleep(2)

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Jul 21 10:39:00 GMT 2011

On Jul 19 20:54, Yaakov (Cygwin/X) wrote:
> This patchset implements the POSIX clock_nanosleep(2) function:
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_nanosleep.html
> http://www.kernel.org/doc/man-pages/online/pages/man2/clock_nanosleep.2.html
> In summary, clock_nanosleep(2) replaces nanosleep(2) as the primary
> sleeping function, with all others rewritten in terms of the former.  It
> also restores maximum precision to hires_ms::resolution(), saving the
> <5000 100ns check for the one place where resolution is rounded off.
> Patches for newlib, winsup/cygwin, and winsup/doc attached.  I would
> appreciate a careful look at this one.

Given our current discussion to change cancelable_wait, does it make
sense to review this patch?  AFAICs the clock_nanosleep function will
have to be changes quite a bit, right?

Something else occured to me, but I think we should do this in an extra
step, if at all.  IMO the family of sleep functions should be moved out
of signal.cc into times.cc.  It just seems to belong there.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

More information about the Cygwin-patches mailing list