This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Support function for handling power manager requests to change power mode
#include <sys/pm.h> void pmd_handler(pmd_attr_t *pmd);
libpm
The pmd_handler() function is a support function that the driver calls to perform a power mode change requested by the power manager.
The driver receives these requests via the sigevent supplied to pmd_attach(). If the driver has multiple devices, it must ensure that the this sigevent contains sufficient information to allow the driver's event handler to determine which device is being requested.
The pmd_handler() essentially performs the following steps:
The setpower() function is expected to call pmd_confirm() when the mode change is completed.
For more information, see the device driver chapter.
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
pmd_attr_t, pmd_attach(), pmd_attr_setpower(), pmd_confirm(), pmd_lock_exclusive(), pmd_unlock_exclusive()