#include <CPUAffinity.h>
Definition at line 4 of file CPUAffinity.h.
bool CPUAffinity::bindToCurrentCpu |
( |
| ) |
|
|
static |
Definition at line 78 of file CPUAffinity.cc.
Referenced by TimerService::TimerService().
85 sched_getaffinity(0,
sizeof(cpu_set_t), & cpu_set);
86 if (CPU_COUNT(& cpu_set) == 1)
91 int current = sched_getcpu();
93 CPU_SET(current, & cpu_set);
94 sched_setaffinity(0,
sizeof(cpu_set_t), & cpu_set);
95 sched_getaffinity(0,
sizeof(cpu_set_t), & cpu_set);
97 if (CPU_COUNT(& cpu_set) == 1)
int CPUAffinity::currentCpu |
( |
| ) |
|
|
static |
bool CPUAffinity::isCpuBound |
( |
| ) |
|
|
static |
Definition at line 60 of file CPUAffinity.cc.
67 sched_getaffinity(0,
sizeof(cpu_set_t), & cpu_set);
68 if (CPU_COUNT(& cpu_set) == 1)