pm: policy: Add cpu information in the API

On multicore environments the policy may need to know which CPU is
idle.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2021-10-22 10:59:51 -07:00 committed by Anas Nashif
commit dd152c2b89
7 changed files with 19 additions and 8 deletions

View file

@ -22,11 +22,12 @@ extern "C" {
* idle and returns the most appropriate state based on the number of
* ticks to the next event.
*
* @param cpu CPU index.
* @param ticks The number of ticks to the next scheduled event.
*
* @return The power state the system should use.
* @return The power state the system should use for the given cpu.
*/
struct pm_state_info pm_policy_next_state(int32_t ticks);
struct pm_state_info pm_policy_next_state(uint8_t cpu, int32_t ticks);
/** @endcond */