affinity.c File Reference
#include "common.h"
#include "bu/parallel.h"
#include "bu/log.h"
Include dependency graph for affinity.c:

Go to the source code of this file.


#define _GNU_SOURCE   /* must come before common.h */


int parallel_set_affinity (int cpu)

Macro Definition Documentation

#define _GNU_SOURCE   /* must come before common.h */

Definition at line 22 of file affinity.c.

Function Documentation

int parallel_set_affinity ( int  cpu)

Set affinity mask of current thread to the CPU set it is currently running on. If it is not running on any CPUs in the set, it is migrated to CPU 0 by default.

Return: 0 on Suceess -1 on Failure

Definition at line 56 of file affinity.c.

References bu_avail_cpus(), and FALSE.

Here is the call graph for this function: