Subject: Re: lib/28700: Re: lib/28700: pthread_cond_timedwait() hang with "zero" absolute time
To: None <tech-kern@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 12/20/2004 22:50:37
In article <20041220213706.GC1008@snowdrop.l8s.co.uk>,
David Laight <david@l8s.co.uk> wrote:
>On Mon, Dec 20, 2004 at 08:45:16AM -0500, Christos Zoulas wrote:
>> On Dec 20, 4:58am, abuse@spamalicious.com ("Charles M. Hannum") wrote:
>> -- Subject: Re: lib/28700: Re: lib/28700: pthread_cond_timedwait() hang with
>>
>> | This sort of problem has been discussed before, and your patch is
>*not* okay.
>> |
>> | The problem is that there are many places that use
>TIMESPEC_TO_TIMEVAL(), and
>> | for some of them it is simply wrong (and might even cause minor
>malfunctions)
>> | to round up. There needs to be both "round up" and "round down" behavior,
>> | used appropriately.
>>
>> So the best thing would be to change the whole kernel to use timespec
>> internally everywhere. I will work on that.
>
>Or a 64bit microsecond counter?
You need nanoseconds for timespec and that is the source of the
whole problem...
christos