Re: Nested suspends; messages vs. states

Nigel Cunningham
2005-03-23T20:36:18Z

[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]

Hi.

On Thu, 2005-03-24 at 06:02, David Brownell wrote:
> On Tuesday 22 March 2005 5:17 pm, Patrick Mochel wrote:
> >
> > We just need a
> > simple mechanism for parents to monitor the power state of their children.
> > Can't be that hard to come up with something clean.
>
> Minimally they can walk the list of their children at appropriate moments.
> I think folk have also raised the notion of having a "child state changed"
> call to the parent; it's not clear to me that needs to involve the PM core.

Yes. The children should notify the parent, not the parent poll the
children. Polling is ugly :>

On top of this, the evaluation of the state of the children should be
atomic. Thus, their notifications of idleness might simply atomically
increment/decrement a counter of the number of children busy, for
example.

Regards.

Nigel
--
Nigel Cunningham
Software Engineer, Canberra, Australia
http://www.cyclades.com
Bus: +61 (2) 6291 9554; Hme: +61 (2) 6292 8028; Mob: +61 (417) 100 574

Maintainer of Suspend2 Kernel Patches http://suspend2.net