]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/IOKit/IOServicePM.h
xnu-344.49.tar.gz
[apple/xnu.git] / iokit / IOKit / IOServicePM.h
index 7f958c7c92e7916a3d5b8c94a4c4673eb3f2f37a..29a6039b8dca0bfa8b6469f50a2527e0c07b8c5c 100644 (file)
@@ -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).
 */