Re: PSA: Clock drift and pkgin

Johnny Billquist <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
On 2023-12-24 09:26, Michael van Elst wrote:
> [email protected] (Simon Burge) writes:
> 
>> qemu uses ppoll() which is implemented with pollts() to do emulated
>> timers, so that doesn't help here.  I don't know what simh uses, nor
>> any of the other emulators.
> 
> simh uses pthread_cond_timedwait().
> 
> This actually waits using TIMER_ABSTIME for a deadline, but which is
> converted to a timeout with ts2timo() and passed to sleepq_block()
> as a number of ticks to wait for.

Oh? So we are actually not POSIX compliant on that one? Interesting.
(POSIX explicitly says that the timeout should be for an absolute time, 
which means that if you for example update the clock, moving it 
backwards, the timeout should still only happen when that time arrives, 
and not after some precomputed number of ticks.)

   Johnny

-- 
Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: [email protected]             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.