Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Dec 2005 12:23:27 +0100
From:      des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To:        Fredrik Lindberg <fli+freebsd-current@shapeshifter.se>
Cc:        Travis Mikalson <bofh@terranova.net>, current@freebsd.org, njl@freebsd.org
Subject:   Re: powerd
Message-ID:  <86slt6lb9s.fsf@xps.des.no>
In-Reply-To: <43956ADF.4050504@shapeshifter.se> (Fredrik Lindberg's message of "Tue, 06 Dec 2005 11:41:35 %2B0100")
References:  <43938F61.1050202@terranova.net> <4393F60E.2040106@shapeshifter.se> <86mzjflc97.fsf@xps.des.no> <439495B1.5060305@shapeshifter.se> <861x0qmuen.fsf@xps.des.no> <43956ADF.4050504@shapeshifter.se>

next in thread | previous in thread | raw e-mail | index | archive | help
Fredrik Lindberg <fli+freebsd-current@shapeshifter.se> writes:
> Dag-Erling Sm=F8rgrav wrote:
> > If the devd loop is an *alternative* to the polling loop, there's
> > even less reason to use threads.
> Yes it's an alternative, reading a variable versus doing a sysctl call
> each interation. It seemed like I good idea, when I first wrote this
> (almost a year ago), to have a thread providing a cached value of the
> AC state. But maybe I was trying to be too smart or something.

Yes.  Not only is it a bad design idea, but the implementation is
wrong, and likely to fail badly when compiled at high optimization
levels.  Please revert powerd.c to revision 1.13.

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86slt6lb9s.fsf>