Re: Advice on handling sleep with IOKit driver+daemon setup
Re: Advice on handling sleep with IOKit driver+daemon setup
- Subject: Re: Advice on handling sleep with IOKit driver+daemon setup
- From: Soren Spies <email@hidden>
- Date: Wed, 16 Jul 2008 12:37:57 -0700
On Jul 4, 2008, at 9:03, Tim Schooley wrote:
1.1) In the kext, simply block IO to the devices. This seems the
quickest and most elegant way, since a) it won't remove the device
from
the system, b) it won't run into "Volume Busy" errors that could occur
using an unmount instead, c) Once unlocked, user-space applications
that
may have had files open on the device can continue on their merry way.
BUT! Does the OS flush devices before sleeping? When "WillSleep" is
called, has all flushing finished?
Beware of deadlocks between in trying to get unlocked. If your daemon
needs to pop up UI to re-authenticate the device but the daemon is
talking to a service which happens to be trying to use the volume
being served by your kext ... the block I/Os will prevent your dialog
from coming up which will prevent the I/O completing ... and
everything will eventually end it a spinning beachball of death.
--
Soren Spies
CoreOS::IOTeam
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden