ND_NODE_CMP()

Updated: April 19, 2023

Compare two node descriptors

Synopsis:

#include <sys/netmgr.h>

#define ND_NODE_CMP(a,b) …

Arguments:

a, b
The node descriptors that you want to compare. You can use either the value 0 or ND_LOCAL_NODE to refer to the local node.

Description:

The ND_NODE_CMP() macro compares two node descriptors.

Returns:

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

Examples:

#include <sys/neutrino.h>

uint32_t nd1, nd2;

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

Classification:

QNX Neutrino

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