Date: Sun, 17 Feb 2002 21:40:21 +0100 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: Bruce Evans <bde@zeta.org.au>, freebsd-current@FreeBSD.ORG Subject: Re: Success! Sorta! (was Re: 'microuptime() went backwards ...' using ACPI timer. Shouldn't that be impossible? ) Message-ID: <6315.1013978421@critter.freebsd.dk> In-Reply-To: Your message of "Sun, 17 Feb 2002 12:38:01 PST." <200202172038.g1HKc1891121@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <200202172038.g1HKc1891121@apollo.backplane.com>, Matthew Dillon wri
tes:
> However, I think to be complete we need to make it even less elegant.
> The TC module is only flip-flopping between two time counters, which
> means that it can flip-flop twice and the test will not work. We need
> a generation count on the timecounter as well:
>
> do {
> tc = timecounter;
> gen = tc->tc_generation;
> *bt = tc->tc_offset;
> bintime_addx(bt, tc->tc_scale * tco_delta(tc));
> } while (tc != timecounter || tc->tc_generation != gen);
No, more like:
do {
tc = timecounter;
gen = tc->gen;
...
} while (gen != tc->gen);
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6315.1013978421>
