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: willTerminate() vs message (kIOMessageServiceIsTerminated)



Do you call willTerminate() in your superclass?

Rhoads Hollowell
USB Software Team
Apple Computer, Inc.

On Oct 18, 2005, at 3:17 PM, Alec Carlson wrote:

Dan,

Yes, the provider is closed. The same code gets run in both routines. If I have willTerminate() enabled, then I comment out the kIOMessageServiceIsTerminated message. If I have kIOMessageServiceIsTerminated enabled then I comment out the willTerminate() routine. In the kIOMessageServiceIsTerminated case, my stop() routine gets called by the ioKit. In the willTerminate() case, it doesn’t get called.

Alec

on 10/18/05 3:39 PM, Daniel Sumorok at email@hidden wrote:

Do you close the provider in your willTerminate()
method?

  -Dan

--- Alec Carlson <email@hidden> wrote:

> I have both willTerminate() and message() functions in my USB driver. I was
> under the impression that willTerminate() and didTerminate() were the new
> (correct) way to trap device termination. The "old" way was to look for
> kIOMessageServiceIsTerminated messages passed to the message() routine. I was
> told that the kIOMessageServiceIsTerminated message was deprecated.
>
> If I handle the termination event in willTerminate() then my stop () routine
> never gets called. If I #ifdef out the willTerminate() routine and move the
> cleanup code into message(kIOMessageServiceIsTerminated) - the exact same
> cleanup takes place but in this case my stop() routine does get called. My
> stop() routine does some additional cleanup which is required to allow the
> driver to be unloaded.
>
> Any idea why willTerminate() is preventing stop() from being called ?
>
> Alec Carlson
>
--------------------------------------------------------------------- --
> Time is Short, and the Water Rises
>
--------------------------------------------------------------------- --
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden
References: 
 >Re: willTerminate() vs message (kIOMessageServiceIsTerminated) (From: Alec Carlson <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.