Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advice on handling sleep with IOKit driver+daemon setup




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:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >Advice on handling sleep with IOKit driver+daemon setup (From: Tim Schooley <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.