[Previous] [Contents] [Next]

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

unlink() callback

Called to check if a node is unlinked from the namespace

Synopsis:

#include <sys/pmm.h>

int unlink(void *data, int nlink, unsigned flags);

Library:

libc

Description:

This function is called to check whether the policy will allow a node to be unlinked from the namespace:

data
Policy specific data returned by the create() function when the node was created.
nlink
Link count for the namespace:
flags
0, or a combination of the following:
PMM_NODE_CLIENT
Node was created by a client request.

If this flag is not set, it is created by the power manager.

PMM_NODE_DETACH
Driver responsible for the node's power mode has just detached.

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:

If the policy will allow the unlink, it should return EOK:

Otherwise, it should return EBUSY, and the unlink operation will fail.

The default action (if the unlink() function is not overriden) is to allow:

Returns:

Classification:

QNX Neutrino

Safety:
Cancellation point Unknown
Interrupt handler Unknown
Signal handler Unknown
Thread Unknown

See also:


[Previous] [Contents] [Next]