AppleOpenSource/xnu-6153.101.6/iokit/Kernel/IOPMrootDomain.cpp
/* PMAssertionsTracker::handleReleaseAssertion
 * Runs in PM workloop. Do not call directly.
 */
:handleReleaseAssertion
Runs in PM workloop. Do not call directly.
: handleReleaseAssertion Runs in PM workloop . Do not call directly .
IOReturn
PMAssertionsTracker::handleReleaseAssertion(
	IOPMDriverAssertionID _id)
{
	ASSERT_GATED();
	int             index;
	PMAssertStruct  *assertStruct = detailsForID(_id, &index);
	if (!assertStruct) {
		return kIOReturnNotFound;
	}
	IOLockLock(assertionsArrayLock);
	if (assertStruct->ownerString) {
		assertStruct->ownerString->release();
	}
	assertionsArray->removeObject(index);
	IOLockUnlock(assertionsArrayLock);
	tabulate();
	return kIOReturnSuccess;
}
IOReturn PMAssertionsTracker :: handleReleaseAssertion ( IOPMDriverAssertionID _id ) { ASSERT_GATED ( ) ; int index ; PMAssertStruct * assertStruct = detailsForID ( _id , & index ) ; if ( ! assertStruct ) { return kIOReturnNotFound ; } IOLockLock ( assertionsArrayLock ) ; if ( assertStruct -> ownerString ) { assertStruct -> ownerString -> release ( ) ; } assertionsArray -> removeObject ( index ) ; IOLockUnlock ( assertionsArrayLock ) ; tabulate ( ) ; return kIOReturnSuccess ; }
PMAssertionsTracker::handleReleaseAssertion
 Runs in PM workloop.
PMAssertionsTracker :: handleReleaseAssertion Runs in PM workloop .