68 static void sleep(
size_t milliseconds);
95 ThisThread(
const ThisThread &);
96 ThisThread & operator = (
const ThisThread &);
#define ONIXS_ICEBOE_NAMESPACE_BEGIN
#define ONIXS_ICEBOE_NAMESPACE_END
#define ONIXS_ICEBOE_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. The thread is rescheduled after this call.
static void spinWait(size_t microseconds)
Executes a single instruction during the given number of microseconds.
static void affinity(CpuIndex cpuIndex)
Sets the processor affinity mask for the current thread. The thread is rescheduled after this call.
static void policy(int policy)
Sets the scheduling policy for the current thread.
static void sleep(size_t 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.