Informs the kernel of the processor power levels within a given power domain for energy-aware scheduling.


#include <zircon/syscalls-next.h>

zx_status_t zx_system_set_processor_power_level_domain(
    zx_handle_t resource,
    uint64_t options,
    const zx_cpu_set_t* cpus,
    const zx_processor_power_level_t* power_levels,
    size_t num_power_levels,
    const zx_processor_power_level_transition_t* transitions,
    size_t num_transitions);


Enables energy-aware scheduling for a given processor power domain.

Power levels are implicitly enumerated as the indices of power_levels.

There are no ordering restrictions on transformations and the power levels they encode correspond to those defined by power_levels. An absent transformation between levels is assumed to indicate that there is no energy cost borne by perfoming it.


resource must be of ZX_RSRC_KIND_SYSTEM kind and ZX_RSRC_SYSTEM_CPU_BASE base.

Return value

ZX_OK is returned if and only if the processor power level domain was successfully registered.


ZX_ERR_ACCESS_DENIED if resource is not a valid handle.

ZX_ERR_WRONG_TYPE if resource is not a valid resource handle of SYSTEM kind and CPU base.

ZX_ERR_OUT_OF_RANGE if num_power_levels exceeds ZX_MAX_POWER_LEVELS or num_transitions exceeds ZX_MAX_POWER_LEVEL_TRANSITIONS.