]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/kpc.h
xnu-4570.1.46.tar.gz
[apple/xnu.git] / osfmk / kern / kpc.h
index 7c79c69536b4d66e2cf84b6c68c5a24ecdf466f8..aa2db20a11d5422b8443e6842959cfdfd8273b7f 100644 (file)
@@ -213,6 +213,7 @@ extern boolean_t kpc_register_pm_handler(void (*handler)(boolean_t));
  *
  * @param handler
  * Notification callback to use when PMCs are acquired/released by a task.
+ * Power management must acknowledge the change using kpc_pm_acknowledge.
  *
  * @param pmc_mask
  * Bitmask of the configurable PMCs used by the Power Manager. The number of bits
@@ -237,6 +238,16 @@ extern boolean_t kpc_reserve_pm_counters(uint64_t pmc_mask, kpc_pm_handler_t han
  */
 extern void kpc_release_pm_counters(void);
 
+/*
+ * Acknowledge the callback that PMCs are available to power management.
+ *
+ * @param available_to_pm Whether the counters were made available to power
+ * management in the callback.  Pass in whatever was passed into the handler
+ * function.  After this point, power management is able to use POWER_CLASS
+ * counters.
+ */
+extern void kpc_pm_acknowledge(boolean_t available_to_pm);
+
 /*
  * Is the PMU used by both the power manager and userspace?
  *