On Fri, 21 Oct 2011 13:10:10 -0700 (PDT) david@lang.hm wrote: > On Fri, 21 Oct 2011, NeilBrown wrote: > > > Hi, > > > > I wasn't going to do this... but then I did. I think that sometimes coding is > > a bit like chocolate. > > > > At: > > git://neil.brown.name/lsusd > > or > > http://neil.brown.name/git/lsusd > > > > you can find a bunch of proof-of-concept sample code that implements a > > "Linux SUSpend Daemon" with client support library and test programs. > > > > I haven't actually tested it as root and had it actually suspend and resume > > and definitely haven't had it even close to a race condition, but the > > various bits seem to work with each other properly when I run them under > > strace and watch. > > > > It didn't turn out quite the way I imagined, but then cold harsh reality has > > a way of destroying our dreams, doesn't it :-) > > > > > > Below is the README file. Comment welcome as always. > > I'm happy for patches too, but I'm equally happy for someone to re-write it > > completely and make something really useful and maintainable. > > have you put any thought into the idea of extending this slightly to > handle the userspace wakelock interface to potentially allow this to run > android userspace on a stock kernel? > > I realize that there are other things that would be needed as well, but > the wakelock interface is a biggie. > > David Lang I have certainly thought of someone else doing it :-) I only have a high-level understanding of Android interfaces and don't really want to go any deeper than that. Thanks, NeilBrown