This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] nanosleep()


On Wed, Sep 03, 2003 at 11:26:51PM -0400, Pierre A. Humblet wrote:
>This patch to nanosleep, sleep and usleep 
>a) makes them Posix conformant: the system clock (gettimeofday) must 
>   advance by at least d during Xsleep(d) 
>  (e.g. exim relies on this to create unique ids).

And it doesn't, do that now, because...?

>b) improves the resolution of the result by using the multimedia 
>   timer. 

And it does that how...?

>c) calls timeBeginPeriod in forked processes.

This one at least doesn't deserve a discussion.  Or does it?  Is
timeBeginPeriod necessary in a forked process?

Large patches with lots of reorganization and minimal explanation about
why are quite time consuming to review.  This is why on most patches
list the usual rule is one patch per concept.  I meant to mention this
after your massive signal patch.

For instance, c) above is a concept.  It could probably have been a
separate patch.

So, I would appreciate it if you could break this down into separate
concepts and explain the concepts as you go along.  Call me selfish, but
it reduces my workload to have you explain what you are doing in bite
size chunks so that I don't have to spend a lot of time trying to
separate out your patch into separate issues myself.

cgf

>2003-09-03  Pierre Humblet <pierre.humblet@ieee.org>
>
>	* hires.h (_DELAY_MAX): Define.
>	(hires_ms::minperiod): Declare static.
>	(hires_ms::resolution): New.
>	(hires_ms::dmsecs): New.
>	(hires_ms::~hires_ms): Delete.
> 	(gtod): Declare. 
>	* time.c (hires_ms::prime): Always calculate minperiod and 
>	set it to 1 in case of failure.
>	(hires_ms::resolution): Define.
>	(hires_ms::~hires_ms): Delete.
>	(hires_ms::usecs): Check minperiod to prime.
>	(gtod) Define.
>	* signal.cc (nanosleep): Round delay up to resolution.
>	Fix test for negative remainder. Use timeGetTime through gtod.
>	(sleep): Round up return value.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]