This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Confirm completion of a power mode change to the power manager
#include <sys/pm.h> int pmd_confirm(pmd_attr_t *pmd, int status);
libpm
The pmd_confirm() confirms the completion of a power mode change to the power manager and updates the internal fields of the pmd_attr_t to reflect the status. If status is EOK, the power mode change was successful and the following are set to indicate the completion of the power mode change:
pmd->cur_mode is set to pmd->new_mode
pmd->cur_flags is set to pmd->new_flags
If status is not EOK, the power mode change was unsuccessful and the following are set to indicate the power mode change did not occur:
pmd->new_mode is set to pmd->cur_mode
pmd->new_flags is set to pmd->cur_flags
The pmd_confirm() must be called with the pmd_attr_t exclusive lock held to serialize power mode changes. |
For more information, see the device driver chapter.
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
pmd_attr_setpower(), pmd_lock_exclusive()