A computer program product comprising a non-transitory computer usable medium having a computer readable program code embodied therein, said computer readable program code adapted to be executed to implement a method for managing sleep states of a portable computing device, said method comprising:
- maintaining a plurality of sets of resource states in memory for each of a plurality of processors, each of the plurality of sets of resource states comprising:
- a sleep set of resource state,
- an active set of resource states, and
- an additional set of resource states,
- each of the sleep set, active set and additional set including combinations of resource states that are associated with values in trigger sets assigned to each of the plurality of processors of the portable computing device,
- wherein a first sleep set of resource states defines states of resources of a first processor of the plurality of processors of the portable computing device when the first processor is in a sleep state, wherein a first active set of resource states defines states of resources of the first processor of the portable computing device when the first processor is active, and wherein a first additional set of resource states defines states of resources of the first processor when an interrupt is received by the first processor;
- updating the first sleep set, the first active set, and the first additional set based on prior usage of the portable computing device;
- issuing a request for the first processor to enter a sleep state;
- reviewing a first trigger set assigned to the first processor to determine if a shut down signal associated with the sleep state request for the first processor matches one or more values listed in the first trigger set;
- and
- if a trigger set value matches the shut down signal, then switching states of one or more resources in accordance with a combination of resource states associated with the trigger set value in the first sleep set.