nanosleep issue

7 views
Skip to first unread message

Rene Zatvo

unread,
Jan 6, 2010, 2:47:10 PM1/6/10
to minix3
Hi,
is that correct to clear the second argument in nanosleep
implementation? In case you use the same pointer
for both arguments you will clear the first one too.

code:
/* keep track of start time if needed */
if (rmtp)
{
rmtp->tv_sec = 0; //
HERE
rmtp->tv_nsec = 0; // and
HERE
if (gettimeofday(&timestart, NULL) < 0)
return -1;
}

--
Rene

Erik van der Kouwe

unread,
Jan 6, 2010, 4:10:37 PM1/6/10
to minix3
Hi,

Thanks for your suggestion. I checked the standard and I think that it
is indeed allowed to pass in two pointers to the same structure. This
will be addressed.

With kind regards,
Erik

Erik van der Kouwe

unread,
Jan 7, 2010, 2:25:53 PM1/7/10
to minix3
Hi,

Fixed in r5860.

Thanks again,
Erik

On 6 jan, 20:47, Rene Zatvo <rene.za...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages