This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Called to get a list of all properties associated with a node
#include <sys/pmm.h> void * create(pmm_node_t *node, void *parent, const char *name, unsigned flags);
libc
This function is called when a new node is created:
The create() function is called from the following operations:
In this case, since there is no parent node, the parent will be NULL.
In this case, flags will be set to PMM_NODE_CLIENT.
The return value from this function is the policy specific data to be associated with the node. This value is passed to all other policy functions in order to allow the policy to operate on its policy specific data.
The policy would typically use this function to allocate a policy specific data structure.
It should store the node value in this structure as it needs to be supplied to the API functions. |
The default action (if the policy does not override this function) is to use node itself as the policy data. This ensures that whenever any of the other policy functions are called, they will be provided with the node pointer to allow them to perform operations on the node.
Safety: | |
---|---|
Cancellation point | Unknown |
Interrupt handler | Unknown |
Signal handler | Unknown |
Thread | Unknown |