Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/n/nd_node_cmp.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/n/nd_node_cmp.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/n/nd_node_cmp.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/n/nd_node_cmp.html on line 8

ND_NODE_CMP()

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.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

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

See also:

netmgr_ndtostr(), netmgr_remote_nd(), netmgr_strtond()

Qnet Networking chapter of the Programmer's Guide

Qnet Networking chapter of the System Architecture guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/n/nd_node_cmp.html on line 149

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/n/nd_node_cmp.html on line 149