[Previous]
[Contents]
[Next]

getnid()

get the node ID

Synopsis:

#include <sys/types.h>
#include <unistd.h>
nid_t getnid( void );

Description:

The getnid() function allows the calling process to find out which node it's executing on.

Returns:

The node ID of the calling process.

Examples:

/*
 * print out this node's ID
 */
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>

void main()
  {
    printf( "I am node %lu\n", getnid() );
  }

Classification:

QNX

Safety:
Interrupt handler No
Signal handler Yes
Thread Yes

[Previous]
[Contents]
[Next]