This is the mail archive of the mailing list for the glibc project.

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

Re: Showstopper for 2.1.3

On 13 Feb 2000, Ulrich Drepper wrote:

> Date: 13 Feb 2000 00:08:46 -0800
> From: Ulrich Drepper <>
> Reply-To: Ulrich Drepper <>
> To: libc-alpha Mailinglist <>
> Cc:
> Subject: Re: Showstopper for 2.1.3
> Andreas Jaeger <> 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.

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