[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: Absolute timeouts and clock adjustments
From:       Eric van Gyzen <vangyzen () FreeBSD ! org>
Date:       2017-03-14 19:17:53
Message-ID: 7f0f0316-3ff1-8264-2602-bae1d3404aab () FreeBSD ! org
[Download RAW message or body]

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
_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic