X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8f6c56a50524aa785f7e596d52dddfb331e18961..4a3eedf9ecc9bbe3f3a5c6ce5e53ad199d639d32:/iokit/IOKit/pwr_mgt/IOPMinformeeList.h diff --git a/iokit/IOKit/pwr_mgt/IOPMinformeeList.h b/iokit/IOKit/pwr_mgt/IOPMinformeeList.h index 3ce993dcd..8efd4a654 100644 --- a/iokit/IOKit/pwr_mgt/IOPMinformeeList.h +++ b/iokit/IOKit/pwr_mgt/IOPMinformeeList.h @@ -26,6 +26,7 @@ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ #include +#include #include class IOPMinformee; @@ -34,27 +35,33 @@ class IOService; class IOPMinformeeList : public OSObject { OSDeclareDefaultStructors(IOPMinformeeList) + friend class IOPMinformee; private: -IOPMinformee * firstItem; // pointer to first informee in the list -unsigned long length; // how many informees are in the list - + // pointer to first informee in the list + IOPMinformee *firstItem; + // how many informees are in the list + unsigned long length; 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 ); + IOPMinformee *appendNewInformee( IOService * newObject ); + + // OBSOLETE + // do not use addToList(); Use appendNewInformee() instead + 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 ); };