X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/4452a7af2eac33dbad800bcc91f2399d62c18f53..7ee9d059c4eecf68ae4f8b0fb99ae2471eda79af:/iokit/Kernel/IOPMinformeeList.cpp diff --git a/iokit/Kernel/IOPMinformeeList.cpp b/iokit/Kernel/IOPMinformeeList.cpp index 57ac0bb7f..5857bb6b4 100644 --- a/iokit/Kernel/IOPMinformeeList.cpp +++ b/iokit/Kernel/IOPMinformeeList.cpp @@ -68,11 +68,34 @@ IORecursiveLock *IOPMinformeeList::getSharedRecursiveLock( void ) return sharedListLock; } + //********************************************************************************* +// appendNewInformee + // + //********************************************************************************* +IOPMinformee *IOPMinformeeList::appendNewInformee ( IOService * newObject ) +{ + IOPMinformee * newInformee; + + if (!newObject) + return NULL; + + newInformee = IOPMinformee::withObject (newObject); + + if (!newInformee) + return NULL; + + if( IOPMNoErr == addToList (newInformee)) + return newInformee; + else + return NULL; +} + + //********************************************************************************* // addToList -// +// *OBSOLETE* do not call from outside of this file. +// Try appendNewInformee() instead //********************************************************************************* - IOReturn IOPMinformeeList::addToList ( IOPMinformee * newInformee ) { IOPMinformee * nextInformee;