Enumerations | |
enum | topo_cpubind_policy_t { TOPO_CPUBIND_PROCESS = (1<<0), TOPO_CPUBIND_THREAD = (1<<1), TOPO_CPUBIND_STRICT = (1<<2) } |
Process/Thread binding policy. More... | |
Functions | |
int | topo_set_cpubind (topo_topology_t topology, const topo_cpuset_t *set, int policy) |
Bind current process or thread on cpus given in cpuset set . | |
int | topo_set_proc_cpubind (topo_topology_t topology, topo_pid_t pid, const topo_cpuset_t *set, int policy) |
Bind a process pid on cpus given in cpuset set . | |
int | topo_set_thread_cpubind (topo_topology_t topology, topo_thread_t tid, const topo_cpuset_t *set, int policy) |
Bind a thread tid on cpus given in cpuset set . |
topo_set_cpubind(topology, set, 0),
as it just binds the current program, assuming it is monothread, or
topo_set_cpubind(topology, set, TOPO_CPUBIND_THREAD),
which binds the current thread of the current program (which may be multithreaded).
Process/Thread binding policy.
These flags can be used to refine the binding policy.
The default (0) is to bind the current process, assumed to be mono-thread, in a non-strict way. This is the most portable way to bind as all OSes usually provide it.
int topo_set_cpubind | ( | topo_topology_t | topology, | |
const topo_cpuset_t * | set, | |||
int | policy | |||
) |
Bind current process or thread on cpus given in cpuset set
.
int topo_set_proc_cpubind | ( | topo_topology_t | topology, | |
topo_pid_t | pid, | |||
const topo_cpuset_t * | set, | |||
int | policy | |||
) |
Bind a process pid
on cpus given in cpuset set
.
TOPO_CPUBIND_THREAD can not be used in policy
.
int topo_set_thread_cpubind | ( | topo_topology_t | topology, | |
topo_thread_t | tid, | |||
const topo_cpuset_t * | set, | |||
int | policy | |||
) |
Bind a thread tid
on cpus given in cpuset set
.
TOPO_CPUBIND_PROCESS can not be used in policy
.