[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Making powerd=YES default
On 26.07.2011 09:05, Marc Balmer wrote:
> Am 26.07.11 00:44, schrieb Paul Goyette:
>> Since powerd already deals with things other than power (at the very
>> least, it can receive and process temp-sensor alarms, intrusion
>> indicators, etc.) so it probably should not exit. If you exit, then
>> there's no way for user-land to process events from those other sensor
> Could these other event sources be identified somehow, so that powerd
> (or eventd...) only exists if there is really nothing it can do?
Hmmm, depends: you can discriminate between events (and even their
content depending on the returned property list), but I am not sure if
you can enumerate them; IMHO, you cannot expect powerd(8) to react to
any kind of event unless you have some trigger already coded in kernel
for that (sysmon).
Currently, pswitch events are stateless: anyone can post one without
having the need to register it first; there's sysmon_pswitch_register()
(and unregister()), but ATM they are a NOP, and just return 0.
I can change the semantic of these operations and force them to
reference a power backend. In that case, that will force all sysmon
- first register a power backend
- then register different sort of events (like pswitch).
Last time I had a look, I collided with the pmf_generic_event_t from
pmf(9), as they somehow duplicate this logic. When I asked which one I
should go for, there wasn't any clear direction given. Now I'd like to
finalize my save/restore work, and this is one of the last steps before
Main Index |
Thread Index |