[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_detach()

Detach a driver from the power manager

Synopsis:

#include <sys/pm.h>

int pmd_detach(pmd_attr_t *pmd);

Arguments:

pmd
Pointer to the device's pmd_attr_t structure.

Library:

libpm

Description:

The pmd_detach() detaches the device from the power manager and invalidates the handle in pmd-> hdl.

The pmd_detach() allows a driver that manages multiple devices to cleanly power down and detach specific devices from the system power management policy.

Driver connections to the power manager are automatically detached during abnormal termination (in which case the device may be left in an unknown state that cannot be recovered from).

Returns:

0
Success.
-1
An error occurred (errno is set).

Note: This function, currently, always succeeds.

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_t, pmd_attach()


[Previous] [Contents] [Next]