This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Trigger change of power mode on a node
#include <sys/pmm.h> int pmm_mode_change(pmm_node_t *node, pm_power_mode_t mode, unsigned flags);
libc
This call is used to change the power mode of a node:
If there is a policy specific mode_request() function, it calls to check whether the mode change can be allowed.
If the requested change is allowed, the driver responsible for managing the node's power mode is notified, and this call returns EOK.
The power mode change is asynchronous. pmm_mode_wait() is used to wait for the driver to confirm when then mode change is complete. |
If an error occurs, it returns -1 and errno is set one of the following:
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |