Function realtime_tools::set_current_thread_affinity
Defined in File realtime_helpers.hpp
Function Documentation
-
std::pair<bool, std::string> realtime_tools::set_current_thread_affinity(int core)
Configure the current thread affinity - Tell the scheduler to prefer a certain core for the current thread.
Note
The threads created by the calling thread will inherit the affinity.
- Parameters:
core – [in] the cpu number of the core. If a negative number is passed, the affinity is reset to the default.
- Returns:
a pair of a boolean indicating whether the operation succeeded or not and a message describing the result of the operation