AppleOpenSource/xnu-6153.101.6/iokit/Kernel/IOPMrootDomain.cpp
/* PMAssertionsTracker::handleSetAssertionLevel
 * Runs in PM workloop. Do not call directly.
 */
:handleSetAssertionLevel
Runs in PM workloop. Do not call directly.
: handleSetAssertionLevel Runs in PM workloop . Do not call directly .
IOReturn
PMAssertionsTracker::handleSetAssertionLevel(
	IOPMDriverAssertionID    _id,
	IOPMDriverAssertionLevel _level)
{
	PMAssertStruct      *assertStruct = detailsForID(_id, NULL);
	ASSERT_GATED();
	if (!assertStruct) {
		return kIOReturnNotFound;
	}
	IOLockLock(assertionsArrayLock);
	pmEventTimeStamp(&assertStruct->modifiedTime);
	assertStruct->level = _level;
	IOLockUnlock(assertionsArrayLock);
	tabulate();
	return kIOReturnSuccess;
}
IOReturn PMAssertionsTracker :: handleSetAssertionLevel ( IOPMDriverAssertionID _id , IOPMDriverAssertionLevel _level ) { PMAssertStruct * assertStruct = detailsForID ( _id , NULL ) ; ASSERT_GATED ( ) ; if ( ! assertStruct ) { return kIOReturnNotFound ; } IOLockLock ( assertionsArrayLock ) ; pmEventTimeStamp ( & assertStruct -> modifiedTime ) ; assertStruct -> level = _level ; IOLockUnlock ( assertionsArrayLock ) ; tabulate ( ) ; return kIOReturnSuccess ; }
PMAssertionsTracker::handleSetAssertionLevel
 Runs in PM workloop.
PMAssertionsTracker :: handleSetAssertionLevel Runs in PM workloop .