Date: Tue, 14 Mar 2017 14:17:53 -0500 From: Eric van Gyzen <vangyzen@FreeBSD.org> To: Sebastian Huber <sebastian.huber@embedded-brains.de>, FreeBSD <freebsd-hackers@freebsd.org> Subject: Re: Absolute timeouts and clock adjustments Message-ID: <7f0f0316-3ff1-8264-2602-bae1d3404aab@FreeBSD.org> In-Reply-To: <58AD5802.30908@embedded-brains.de> References: <58AD5802.30908@embedded-brains.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On 02/22/2017 03:21, Sebastian Huber wrote: > Hello, > > I try to figure out how the timeout mechanisms work in current FreeBSD. > My interpretation (which could be completely wrong) of POSIX is > something like this should happen: > > now 2017-02-22 > sem_timedwait(s, 2023-12-13) > external entity adjusts time to 2050-01-01 > timeout of sem_timedwait() occurs due to the time adjustment > > Inside the kernel all absolute timeouts seem to use the uptime. [...] > The abs_timeout_gethz() returns the interval length in ticks of > [abstime->cur, abstime->end]. Since the msleep() uses the uptime, does > this mean that timeouts trigger not immediately due to time adjustments > in FreeBSD? I just fixed this in 12-CURRENT. I'll merge it back to 11-STABLE in a few weeks. Eric
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7f0f0316-3ff1-8264-2602-bae1d3404aab>