]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/IOKit/IOService.h
xnu-4570.1.46.tar.gz
[apple/xnu.git] / iokit / IOKit / IOService.h
index 35e7ec20e664636230523ece558ab22aa6c618c0..b45162f87d2b0f1f061bc7efa3eea35595e111f3 100644 (file)
@@ -131,6 +131,7 @@ extern const OSSymbol *     gIOFirstPublishNotification;
 extern const OSSymbol *     gIOMatchedNotification;
 extern const OSSymbol *     gIOFirstMatchNotification;
 extern const OSSymbol *     gIOTerminatedNotification;
+extern const OSSymbol *     gIOWillTerminateNotification;
 
 extern const OSSymbol *     gIOGeneralInterest;
 extern const OSSymbol *     gIOBusyInterest;
@@ -639,6 +640,11 @@ public:
     
     virtual void unlockForArbitration( void );
 
+#ifdef XNU_KERNEL_PRIVATE
+    static uint32_t isLockedForArbitration(IOService * service);
+#endif /* XNU_KERNEL_PRIVATE */
+
+
 /*! @function terminateClient
     @abstract Passes a termination up the stack.
     @discussion When an IOService object is made inactive the default behavior is to also make any of its clients that have it as their only provider inactive, in this way recursing the termination up the driver stack. This method allows a terminated  IOService object to override this behavior. Note the client may also override this behavior by overriding its @link terminate terminate@/link method.
@@ -727,7 +733,8 @@ public:
 <br>    <code>gIOFirstPublishNotification</code> Delivered when an IOService object is registered, but only once per IOService instance. Some IOService objects may be reregistered when their state is changed.
 <br>    <code>gIOMatchedNotification</code> Delivered when an IOService object has been matched with all client drivers, and they have been probed and started.
 <br>    <code>gIOFirstMatchNotification</code> Delivered when an IOService object has been matched with all client drivers, but only once per IOService instance. Some IOService objects may be reregistered when their state is changed.
-<br>    <code>gIOTerminatedNotification</code> Delivered after an IOService object has been terminated, during its finalize stage.
+<br>    <code>gIOWillTerminateNotification</code> Delivered after an IOService object has been terminated, during its finalize stage. Delivered after any matching on the service has finished.
+<br>    <code>gIOTerminatedNotification</code> Delivered immediately when an IOService object has been terminated, making it inactive.
     @param matching A matching dictionary to restrict notifications to only matching IOService objects. The dictionary will be released when the notification is removed, consuming the passed-in reference.
     @param handler A C function callback to deliver notifications.
     @param target An instance reference for the callback's use.
@@ -750,7 +757,8 @@ public:
 <br>    <code>gIOFirstPublishNotification</code> Delivered when an IOService object is registered, but only once per IOService instance. Some IOService objects may be reregistered when their state is changed.
 <br>    <code>gIOMatchedNotification</code> Delivered when an IOService object has been matched with all client drivers, and they have been probed and started.
 <br>    <code>gIOFirstMatchNotification</code> Delivered when an IOService object has been matched with all client drivers, but only once per IOService instance. Some IOService objects may be reregistered when their state is changed.
-<br>    <code>gIOTerminatedNotification</code> Delivered after an IOService object has been terminated, during its finalize stage.
+<br>    <code>gIOWillTerminateNotification</code> Delivered after an IOService object has been terminated, during its finalize stage. Delivered after any matching on the service has finished.
+<br>    <code>gIOTerminatedNotification</code> Delivered immediately when an IOService object has been terminated, making it inactive.
     @param matching A matching dictionary to restrict notifications to only matching IOService objects. The dictionary is retained while the notification is installed. (Differs from addNotification).
     @param handler A C function callback to deliver notifications.
     @param target An instance reference for the callback's use.
@@ -1371,7 +1379,11 @@ private:
     void deliverNotification( const OSSymbol * type,
                               IOOptionBits orNewState, IOOptionBits andNewState );
 
-    bool invokeNotifer( class _IOServiceNotifier * notify );
+    OSArray * copyNotifiers(const OSSymbol * type,
+                            IOOptionBits orNewState, IOOptionBits andNewState);
+
+    bool invokeNotifiers(OSArray ** willSend);
+    bool invokeNotifier( class _IOServiceNotifier * notify );
 
     APPLE_KEXT_COMPATIBILITY_VIRTUAL
         void unregisterAllInterest( void );
@@ -1828,7 +1840,7 @@ public:
     void reset_watchdog_timer( void );
     void start_watchdog_timer ( void );
     bool stop_watchdog_timer ( void );
-    IOReturn registerInterestForNotifer( IONotifier *notify, const OSSymbol * typeOfInterest,
+    IOReturn registerInterestForNotifier( IONotifier *notify, const OSSymbol * typeOfInterest,
                   IOServiceInterestHandler handler, void * target, void * ref );
 
     static IOWorkLoop * getIOPMWorkloop( void );