ppsm_set_policy()

int ppsm_set_policy( void *handle,
                     int policy );

This function sets the power-management policy (by default after you call ppsm_init(), it's PPSM_POLICY_NONE). The arguments are:

handle
The handle returned by ppsm_init().
policy
The policy you want to set; one of:
  • PPSM_POLICY_NONE — always run at the highest available performance state
  • PPSM_POLICY_ADAPTIVE — choose the performance state, based on the CPU demand
  • PPSM_POLICY_CONSTANT — always run at the lowest performance state

The ppsm_set_policy() function returns -1 on error.