Re: non-racy examples, please (was Re: [PATCH 01/13] PM: Add wake lock api.)

Arve Hjønnevåg
2009-02-11T03:12:36Z

On Tue, Feb 10, 2009 at 3:15 AM, Pavel Machek <pavel@ucw.cz> wrote:

>> I think a high priority sleep (like someone suggested) make more sense
>> than a forced sleep for this situation. The wakelock code could deal
>> with this as another wakelock type, and ignore normal wakelocks when a
>> high priority sleep is requested. We cannot necessarily ignore all
>> wakelocks since some may be used to manage the battery and charger.
>
> Now.. that's a differnce from PC. But...if you shutdown -h now, what
> happens to battery and charger?

If shutdown -h performs a poweroff and not just halt, the system will
power off if no charger is connected, or it will reboot and stay
bootloader (with the screen off) if the charger is connected. If you
halt and stop processing events, the other core will panic and reboot
the system.

--
Arve Hjønnevåg