cpu affinity management for a single process More...
#include <CpuAffinitySet.h>

Public Member Functions | |
| CpuAffinitySet () | |
| void | apply () |
| set CPU affinity for this process More... | |
| void | undo () |
| undo CPU affinity changes for this process More... | |
| bool | applied () |
| whether apply() was called and was not undone More... | |
| void | set (const cpu_set_t &aCpuSet) |
| set CPU affinity mask More... | |
Private Attributes | |
| cpu_set_t | theCpuSet |
| configured CPU affinity for this process More... | |
| cpu_set_t | theOrigCpuSet |
| CPU affinity for this process before apply() More... | |
Detailed Description
Definition at line 15 of file CpuAffinitySet.h.
Constructor & Destructor Documentation
◆ CpuAffinitySet()
| CpuAffinitySet::CpuAffinitySet | ( | ) |
Definition at line 20 of file CpuAffinitySet.cc.
References CPU_ZERO, theCpuSet, and theOrigCpuSet.
Member Function Documentation
◆ applied()
| bool CpuAffinitySet::applied | ( | ) |
Definition at line 72 of file CpuAffinitySet.cc.
References CPU_COUNT, and theOrigCpuSet.
◆ apply()
| void CpuAffinitySet::apply | ( | ) |
Definition at line 27 of file CpuAffinitySet.cc.
References applied(), CPU_AND, CPU_COUNT, CPU_ZERO, DBG_IMPORTANT, debugs, Must, sched_getaffinity(), sched_setaffinity(), theCpuSet, theOrigCpuSet, and xstrerr().
Referenced by CpuAffinityInit().
◆ set()
| void CpuAffinitySet::set | ( | const cpu_set_t & | aCpuSet | ) |
Definition at line 81 of file CpuAffinitySet.cc.
References theCpuSet.
Referenced by CpuAffinityMap::calculateSet().
◆ undo()
| void CpuAffinitySet::undo | ( | ) |
Definition at line 58 of file CpuAffinitySet.cc.
References applied(), CPU_ZERO, DBG_IMPORTANT, debugs, sched_setaffinity(), theOrigCpuSet, and xstrerr().
Referenced by CpuAffinityReconfigure().
Member Data Documentation
◆ theCpuSet
|
private |
Definition at line 33 of file CpuAffinitySet.h.
Referenced by CpuAffinitySet(), apply(), and set().
◆ theOrigCpuSet
|
private |
Definition at line 34 of file CpuAffinitySet.h.
Referenced by CpuAffinitySet(), applied(), apply(), and undo().
The documentation for this class was generated from the following files:
- src/CpuAffinitySet.h
- src/CpuAffinitySet.cc
