This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Initialise and start the power manager interface
#include <sys/pmm.h> int pmm_init(dispatch_t *dpp);
libc
This function call is used to initialise the library and its internal data. These are the operations the power manager performs first.
If dpp is NULL, pmm_init() allocates its own dispatch.
This performs the following:
This results in the policy specific create() function being called. If the policy needs to override any of the default policy functions, it must call pmm_policy_funcs() and set up the policy specific functions before calling pmm_init(). |
This allows the product specific initialisation code to launch drivers or other power manager clients if necessary. Any subsequent client pm_attach() or pmd_attach() messages locates the power manager, but is blocked until it has called pmm_start() to begin receiving and processing client messages.
If succesful, this call returns 0.
If an error occurs, it returns -1 and errno is set one of the following:
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |