[Previous] [Contents] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

pmm_node_create()

Create a new node

Synopsis:

#include <sys/pmm.h>

void * pmm_node_create(pmm_node_t *parent, const char *name, 
                                               mode_t mode);

Library:

libc

Description:

This call is used to create a new node in the power manager namespace:

parent
Pointer to the node which contains the new node.

If this is NULL, the new node is created at the root of namespace.

name
Name of the new node within the parent node.

The name must be a single component (i.e cannot contain any '/').

mode
Type and access permission of the new node.

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:

If this function fails, it returns NULL, and errno is set to one of the following error codes:

Returns:

EINVAL
Type encoded in mode is non-zero and not PM_NODE_NEXUS.
ENOMEM
Insufficient memory to allocate the necessary data structures.
EEXIST
parent already contains a node with name.

Classification:

QNX Neutrino

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler No
Thread Yes

See also:


[Previous] [Contents] [Next]