Back to index

numactl  2.0.8~rc4
getnodemask.c File Reference
#include <sched.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <numa.h>

Go to the source code of this file.


int main (int argc, char *argv[])

Function Documentation

int main ( int  argc,
char *  argv[] 

Definition at line 8 of file getnodemask.c.

       nodemask_t nodemask;
       int rc, i;

       rc = numa_available();
       printf("numa_available returns %d\n", rc);
       if (rc < 0) exit(1);


       nodemask = numa_get_run_node_mask();
       for (i = 0; i < 4; i++) {
              printf("numa_get_run_node_mask nodemask_isset returns=0x%lx\n", nodemask_isset(&nodemask, i));

       rc = numa_run_on_node_mask(&nodemask);
       printf("rc=%d from numa_run_on_node_mask\n", rc);

       return (0);

Here is the call graph for this function: