bproc_currnode

Name

bproc_currnode -- Get the current node number

Synopsis

#include <sys/bproc.h>

int bproc_currnode (void);

Return Value

Returns the node number of the machine on which this process is currently running. The value BPROC_NODE_MASTER, -1, indicates that the process is running on the master.

Bugs

This function will return -1 if there is an error in processing, or if you are on the master node. If there is the possibility of ambiguity, the errno variable should be initialized to zero before the call and checked for errors after the call.

Errors

ENOSYS

The BProc system is not available.

EIO

The BProc system is loaded, but is not configured or active.

ENOMEM

Insufficient kernel memory was available to return a value.