This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Called to check if a node is unlinked from the namespace
#include <sys/pmm.h> int unlink(void *data, int nlink, unsigned flags);
libc
This function is called to check whether the policy will allow a node to be unlinked from the namespace:
If this flag is not set, it is created by the power manager.
If this flag is not set, the unlink is being performed by an explicit unlink request (via the resmgr interface or by pmm_node_unlink())
The unlink() function is called from the following:
In this case, flags is PMM_NODE_DETACH set, and may also have PMM_NODE_CLIENT set if the node was created by a client request
If the policy will allow the unlink, it should return EOK:
Any nodes that have no client references will automatically be deleted, and the destroy() function called to clean up policy specific data for the node.
Otherwise, it should return EBUSY, and the unlink operation will fail.
The default action (if the unlink() function is not overriden) is to allow:
Safety: | |
---|---|
Cancellation point | Unknown |
Interrupt handler | Unknown |
Signal handler | Unknown |
Thread | Unknown |