Date: Tue, 06 Dec 2005 11:41:35 +0100 From: Fredrik Lindberg <fli+freebsd-current@shapeshifter.se> To: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= <des@des.no> Cc: Travis Mikalson <bofh@terranova.net>, current@freebsd.org Subject: Re: powerd [was: make.conf options you cannot use for building CURRENT] Message-ID: <43956ADF.4050504@shapeshifter.se> In-Reply-To: <861x0qmuen.fsf@xps.des.no> References: <43938F61.1050202@terranova.net> <4393F60E.2040106@shapeshifter.se> <86mzjflc97.fsf@xps.des.no> <439495B1.5060305@shapeshifter.se> <861x0qmuen.fsf@xps.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smørgrav wrote: > Fredrik Lindberg <fli+freebsd-current@shapeshifter.se> writes: > >>Dag-Erling Smørgrav wrote: >> >>>There is no reason to use threads in powerd. Simply merge the >>>devd_read() loop into your main loop, using select() with a timeout >>>instead of usleep(). >> >>Wouldn't that turn in into a polling style again? > > > No. > > >>The reason to use >>devd was to obtain a more interrupt driven model instead of the >>sysctl-polling method originally used. Both metods are supported and >>the devd method is only used if the devd.pipe is avaiable. > > > If the devd loop is an *alternative* to the polling loop, there's even > less reason to use threads. > > DES 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. Anyone know what happened to the powerd SoC project? I never spent more time on powerd because I assumed it would be more or less rewritten. I wouldn't mind hacking on powerd but I don't want to step on somebodys toes or duplicate work. Fredrik Lindberg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43956ADF.4050504>