Re: [PATCH 06/11] PM: Add user-space wake lock api.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 30, 2009 at 4:43 AM, Uli Luckas <u.luckas@xxxxxxx> wrote:
> On Wednesday, 14. January 2009, Arve Hjønnevåg wrote:
>> This adds /sys/power/wake_lock and /sys/power/wake_unlock.
>> Writing a string to wake_lock creates a wake lock the
>> first time is sees a string and locks it. Optionally, the
>> string can be followed by a timeout.
>> To unlock the wake lock, write the same string to wake_unlock.
> What happens if a process takes a lock and then dies?

The lock will be held until the process restarts and unlocks it. We
only use this interface directly from processes that are started (and
restarted) from init. Applications use the user space api which talks
to our system process. If an application dies the system process is
notified and (userspace) wakelocks are deleted.

> Instead of using sysfs, how about using a device for this purpose which the
> caller has to keep open as long as they want to hold the lock.

If you want to use wakelocks directly from applications, that makes
sense, but I'm not sure we also want to remove this interface.

-- 
Arve Hjønnevåg
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux