This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: Linux nanosleep investigation.
- To: Kevin Hendricks <khendricks at ivey dot uwo dot ca>
- Subject: Re: Linux nanosleep investigation.
- From: Andrea Arcangeli <andrea at suse dot de>
- Date: Wed, 16 Feb 2000 22:54:18 +0100 (CET)
- cc: Kaz Kylheku <kaz at ashi dot footprints dot net>, Andreas Jaeger <aj at suse dot de>, Ulrich Drepper <drepper at cygnus dot com>, libc-alpha Mailinglist <libc-alpha at sourceware dot cygnus dot com>
[ I just noticed a silly bug in my patch (I am returning the
elapsed time not the remaining time!). sorry, I'll post a new one
ASAP). ]
On Wed, 16 Feb 2000, Kevin Hendricks wrote:
>The real issue here is that if nanosleep is constantly being interrupted
>by numerous signals almost immediately after it gets entered and you add
>that one extra jiffee in rounding up, could the remaining time that is
>returned theoretically be larger than the initial time requested or show
>no elapsed time at all?
I can handle this correctly I think. That was the object of my patch.
>Kaz, given your arguments, we will have to simply keep track of time using
>gettimeofday in pthread_cond_timedwait and that is fine since it is passed an
>absolute timeout anyway, this is not an issue.
You won't need to use gettimeofday, but you'll only need to look at the
second argument of nanosleep. That's the whole point of my patch.
Andrea