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)



Title: Re: willTerminate() vs message (kIOMessageServiceIsTerminated)
Rhoads,

I have an IOUSBDriver not an IOUSBInterface driver.

Here is the routine source:

bool SMSIWirelessUSB::willTerminate( IOService * provider, IOOptionBits options )
{
    XTRACE(this, 0, 0, "willTerminate()");

   fTerminate = true;        // We're being terminated (unplugged)
    
    // Close the interface(s)
    commReleaseInterface( );

    // Close the device
    if (fpDevice)
    {
        fpDevice->close(this);
        fpDevice = NULL;
    }

    return super::willTerminate( provider, options );
}

The red lines are the same code I have in the in the
kIOMessageServiceIsTerminated message.

Alec


on 10/18/05 4:49 PM, Rhoads Hollowell at email@hidden wrote:

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
>
 _______________________________________________
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: Rhoads Hollowell <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.