| ![[Previous]](../prev.gif) | ![[Contents]](../contents.gif) | ![[Next]](../next.gif) | 
|  | This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. | 
Change device power mode
#include <sys/pm.h>
int pmd_setmode(pmd_attr_t *pmd, 
                pm_power_mode_t mode, 
                unsigned flags);
libpm
The pmd_setmode() function is used to synchronously change the power mode within device driver code.
The pmd_attr_t must be locked using pmd_lock_shared() before calling pmd_setmode().
The pmd_setmode() essentially performs the following steps:
For more information, see the device driver chapter.
| Safety: | |
|---|---|
| Cancellation point | Yes | 
| Interrupt handler | No | 
| Signal handler | Yes | 
| Thread | Yes | 
pmd_attr_setmodes(), pmd_lock_shared(), pmd_lock_upgrade(), pmd_lock_downgrade()
| ![[Previous]](../prev.gif) | ![[Contents]](../contents.gif) | ![[Next]](../next.gif) |