This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: Showstopper for 2.1.3
- To: Ulrich Drepper <drepper at cygnus dot com>
- Subject: Re: Showstopper for 2.1.3
- From: Kaz Kylheku <kaz at ashi dot footprints dot net>
- Date: Sun, 13 Feb 2000 16:23:43 -0800 (PST)
- cc: libc-alpha Mailinglist <libc-alpha at sourceware dot cygnus dot com>, khendricks at ivey dot uwo dot ca
On 13 Feb 2000, Ulrich Drepper wrote:
> Date: 13 Feb 2000 00:08:46 -0800
> From: Ulrich Drepper <drepper@redhat.com>
> Reply-To: Ulrich Drepper <drepper@cygnus.com>
> To: libc-alpha Mailinglist <libc-alpha@sourceware.cygnus.com>
> Cc: khendricks@ivey.uwo.ca
> Subject: Re: Showstopper for 2.1.3
>
> Andreas Jaeger <aj@suse.de> writes:
>
> > we received the appended bug report. We should fix this before we
> > release 2.1.3.
>
> I undid the last change leaving the new code in the file.
I foresaw that the tight loop might not completely eliminate the ``time
dilation'' problem when the condition sleep receives many signal
interrupts, and have a ready solution for that.
One simple way to address the is to change the loop from:
while (__libc_nanosleep(&reltime, &reltime) == -1)
; /* nothing */
to one which always recalculates the remaining sleep time:
while (__libc_nanosleep(&reltime, NULL)) {
/* call gettimeofday */
/* compute new sleep reltime */
}
This should eliminate the time dilation, while keeping the loop small. I was
hoping that this wouldn't be necessary.
I'm ashamed to admit that I didn't test the code well enough for the time
dilation problem; that is to say, I didn't send it enough signals per second to
see a difference.
Anyway, I'll get right on it; it shouldn't take long.