This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Create a new node
#include <sys/pmm.h> void * pmm_node_create(pmm_node_t *parent, const char *name, mode_t mode);
libc
This call is used to create a new node in the power manager namespace:
If this is NULL, the new node is created at the root of namespace.
The name must be a single component (i.e cannot contain any '/').
If PM_NODE_NEXUS is specified, the new node is a directory, otherwise, it is a leaf node.
The access permissions follow the standard permissions defined in < sys/stat.h>.
If successful, this call returns a pointer to the policy specific data associated with the node:
It is assumed that this policy specific data contains a pointer to the newly created pmm_node_t to allow subsequent manipulation of the node.
If this function fails, it returns NULL, and errno is set to one of the following error codes:
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |