From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uli Luckas Subject: Re: [PATCH 01/13] PM: Add wake lock api. Date: Wed, 4 Mar 2009 14:41:46 +0100 Message-ID: <200903041441.47146.u.luckas@road.de> References: <1233802226-23386-1-git-send-email-arve@android.com> <200903021453.19482.u.luckas@road.de> <20090303140215.GD5060@elf.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090303140215.GD5060@elf.ucw.cz> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Pavel Machek Cc: "swetland@google.com" , linux-pm@lists.linux-foundation.org, "ncunningham@crca.org.au" List-Id: linux-pm@vger.kernel.org > > > > On the otherhand if you consider ioctl nasty, maybe write() is an > > > > option? > > > > > > You want sleepvetos to be automatically unlocked/freed on close and > > > process exit/kill, so neither write nor ioctl is the right interface. > > > > An application opens a device node and then writes 1s to take the lock > > and 0s to release it. > > For example doing binary 0/1 writes from shell is hard... > Pavel If you have a strategy to hold an fd open from a shell, we can always agree on writing '0's and '1's to that fd. Uli -- ------- ROAD ...the handyPC Company - - - ) ) ) Uli Luckas Head of Software Development ROAD GmbH Bennigsenstr. 14 | 12159 Berlin | Germany fon: +49 (30) 230069 - 62 | fax: +49 (30) 230069 - 69 url: www.road.de Amtsgericht Charlottenburg: HRB 96688 B Managing director: Hans-Peter Constien