[Previous] [Contents] [Next]

ND_NODE_CMP()

Compare two node descriptor IDs

Synopsis:

#include <sys/netmgr.h>

#define ND_NODE_CMP(a,b) ...

Library:

libc

Description:

The ND_NODE_CMP() macro compares two node descriptors.

Any function that passes a node descriptor can use either the value 0 or the constant ND_LOCAL_NODE to refer to the local node.

Returns:

< 0
The node descriptor nd1 is less than nd2.
0
The descriptors refer to the same machine.
> 0
The node descriptor nd1 is greater than nd2.

Examples:

#include <sys/neutrino.h>

uint32_t nd1, nd2;

if ( ND_NODE_CMP(nd1, nd2) == 0 ) {
  /* Same node */
  ...
} else {
  /* Different nodes */
  ...
}

Classification:

QNX 6

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

[Previous] [Contents] [Next]