Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
Developer Support
QNX Documentation Library
QNX Developer Support

QNX Developer Support

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

[Previous] [Contents] [Index] [Next]

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


[Previous] [Contents] [Index] [Next]