* @APPLE_LICENSE_HEADER_END@
*/
#include <libkern/c++/OSObject.h>
+#include <IOKit/IOLocks.h>
#include <IOKit/IOReturn.h>
class IOPMinformee;
OSDeclareDefaultStructors(IOPMinformeeList)
private:
-IOPMinformee * firstItem; // pointer to first informee in the list
-unsigned long length; // how many informees are in the list
-
+ IOPMinformee *firstItem; // pointer to first informee in the list
+ unsigned long length; // how many informees are in the list
public:
-void initialize ( void );
-
-IOReturn addToList ( IOPMinformee * newInformee );
-
-IOPMinformee * firstInList ( void );
-
-IOPMinformee * nextInList ( IOPMinformee * currentItem );
-
-unsigned long numberOfItems ( void );
+ void initialize ( void );
+ void free ( void );
-IOPMinformee * findItem ( IOService * driverOrChild );
+ unsigned long numberOfItems ( void );
-IOReturn removeFromList ( IOService * theItem );
+ IOReturn addToList ( IOPMinformee * newInformee );
+ IOReturn removeFromList ( IOService * theItem );
+
+ IOPMinformee * firstInList ( void );
+ IOPMinformee * nextInList ( IOPMinformee * currentItem );
+
+ IOPMinformee * findItem ( IOService * driverOrChild );
-void free ( void );
+ // This lock must be held while modifying list or length
+ static IORecursiveLock * getSharedRecursiveLock( void );
};