[Previous] [Contents] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

pmd_confirm()

Confirm completion of a power mode change to the power manager

Synopsis:

#include <sys/pm.h>

int pmd_confirm(pmd_attr_t *pmd, int status); 

Arguments:

pmd
Pointer to the pmd_attr_t structure for the device.
status
The status of the power mode change request.

Library:

libpm

Description:

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


Note: The pmd_confirm() must be called with the pmd_attr_t exclusive lock held to serialize power mode changes.

Examples:

For more information, see the device driver chapter.

Classification:

Neutrino

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pmd_attr_setpower(), pmd_lock_exclusive()


[Previous] [Contents] [Next]