Fredrik Lindberg fli+freebsd-current at shapeshifter.se
Tue Dec 6 05:18:24 PST 2005

Dag-Erling Smørgrav wrote:
> 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.

Ignoring the fact that it does work with -O3 (gcc 3.4.4), could you
please explain why it has the potential of failing with high

Fredrik Lindberg

More information about the freebsd-current mailing list