This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Contain function pointers
typedef struct { void * (*create)(pmm_node_t *node, void *parent, const char *name, unsigned flags); void (*destroy)(void *data); int (*unlink)(void *data, int nlink, unsigned flags); void (*attach)(void *data, resmgr_context_t *ctp, int count); void (*detach)(void *data, resmgr_context_t *ctp, int count, unsigned flags); void (*mode_init)(void *data, resmgr_context_t *ctp, const pm_power_attr_t *attr, const pm_power_mode_t *modes); int (*mode_request)(void *data, pm_power_mode_t mode, unsigned flags, const pm_power_attr_t *attr); void (*mode_confirm)(void *data, pm_power_mode_t mode, const pm_power_attr_t *attr); int (*property_add)(void *data, pm_property_attr_t *prop, void *val); int (*property_set)(void *data, pm_property_attr_t *prop, void *val); } pmm_policy_funcs_t;
The structure contains function pointers for each of the policy actions.
All these policy functions are called with the node locked to prevent concurrent access to the node itself.