70 static void sleep(
unsigned int milliseconds);
73 static void spinWait(
unsigned int microseconds);
97 ThisThread(
const ThisThread &);
98 ThisThread & operator = (
const ThisThread &);
#define ONIXS_ILINK3_EXPORTED
static void priority(int priority)
Sets the priority for the current thread.
static void affinity(const CpuIndexes &cpuIndexes)
Sets the processor affinity mask for the current thread.
static void affinity(CpuIndex cpuIndex)
Sets the processor affinity mask for the current thread.
static void spinWait(unsigned int microseconds)
Executes a single instruction during the given number of microseconds.
static void policy(int policy)
Sets the scheduling policy for the current thread.
static void sleep(unsigned int milliseconds)
Suspends the execution of the current thread for the given amount of time.
static unsigned int processorNumber()
CpuIndexes & cpuIndexes()
Collection of CPU indices.
~ThreadAffinity()
Destructs the instance.
const CpuIndexes & cpuIndexes() const
Read-only access to index collection.
std::string toString()
Serializes thread affinity to the string presentation.
ThreadAffinity(const std::string &str)
Constructs thread affinity from the string presentation.
size_t CpuIndex
Logical processors that a thread is allowed to run on (first logical CPU has index 0).
std::set< CpuIndex > CpuIndexes
pthread_t ThreadId
Type alias for thread identifier.