Re: powerd

From: Dag-Erling Smørgrav <des_at_des.no>
Date: Tue, 06 Dec 2005 12:23:27 +0100
Fredrik Lindberg <fli+freebsd-current_at_shapeshifter.se> writes:
> Dag-Erling Smørgrav 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
-- 
Dag-Erling Smørgrav - des_at_des.no
Received on Tue Dec 06 2005 - 10:23:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:48 UTC