8 pthread_t
self = pthread_self();
15 os_check_error(r,
"reconfigure_this_thread() - setting scheduling");
19 r = pthread_setaffinity_np(
20 self,
sizeof(cpu_set_t),
21 const_cast<cpu_set_t*>(config.
affinity().native_handle()));
27 if (config.
name() !=
"") {
28 r = pthread_setname_np(
self, config.
name().c_str());
int native_priority() const
jb::config_attribute< thread_config, jb::cpu_set > affinity
jb::config_attribute< thread_config, bool > ignore_setup_errors
Hold the configuration to initialize threads.
int native_scheduling_policy() const
void reconfigure_this_thread(thread_config const &config)
Change the current thread parameters based on the configuration.
void os_check_error(int result, char const *msg)
Check the value of result and raise an exception if it is -1.
jb::config_attribute< thread_config, std::string > name