X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/1c79356b52d46aa6b508fb032f5ae709b1f2897b..4a2492630c73add3c3aa8a805ba4ff343d4a58ea:/iokit/IOKit/IOServicePM.h?ds=inline diff --git a/iokit/IOKit/IOServicePM.h b/iokit/IOKit/IOServicePM.h index 7f958c7c9..29a6039b8 100644 --- a/iokit/IOKit/IOServicePM.h +++ b/iokit/IOKit/IOServicePM.h @@ -3,19 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -118,6 +121,9 @@ class IOPMpriv : public OSObject /*! @field flags_lock used to control access to response flags array */ IOLock * flags_lock; + /*! @field queue_lock used to control access to change note queue */ + IOLock * queue_lock; + /*! @field initial_change true forces first state to be broadcast even if it isn't a change */ bool initial_change; @@ -148,6 +154,9 @@ class IOPMpriv : public OSObject /*! @field device_active true: there has been device activity since last idle timer expiration */ bool device_active; + /*! @field device_active_timestamp time in ticks of last activity */ + AbsoluteTime device_active_timestamp; + /*! @field driverDesire This is the power state desired by our controlling driver. It is initialized to myCurrentState and is changed when the controlling driver calls changePowerStateTo. A change in driverDesire may cause a change in ourDesiredPowerState. @@ -200,8 +209,7 @@ except while a power change is in progress. /*! @field askingFor -Used by activityTickle so it doesn't try to raise the device to a lower state than -what it may have previously requested. +Not used. */ unsigned long askingFor; @@ -290,6 +298,17 @@ class IOPMprot : public OSObject //management /*! @field doNotPowerDown keeps track of any negative responses from notified apps and clients */ bool doNotPowerDown; + /*! @field childLock used to serialize scanning the children */ + IOLock * childLock; + + /*! @field parentLock used to serialize scanning the parents */ + IOLock * parentLock; + + /*! @field outofbandparameter used to communicate desired function to tellClientsWithResponse(). + This is used because it avoids changing the signatures of the affected + virtual methods. */ + int outofbandparameter; + /*! @function serialize Serialize protected instance variables for debug output (IORegistryDumper). */