JayBeams  0.1
Another project to have fun coding.
thread_config.hpp
Go to the documentation of this file.
1 #ifndef jb_thread_config_hpp
2 #define jb_thread_config_hpp
3 
4 #include <jb/config_object.hpp>
5 #include <jb/convert_cpu_set.hpp>
6 
7 namespace jb {
8 
9 /**
10  * Hold the configuration to initialize threads.
11  *
12  * After a thread is started we want to be able to consistently
13  * configure its scheduling policy, priority, processor affinity,
14  * etc. This class is used to contain such configurations.
15  */
17 public:
18  /// Constructor.
19  thread_config();
21 
27 
28  // ... you can add convenience functions to make the configuration
29  // class easier to use ...
30  int native_scheduling_policy() const;
31  int native_priority() const;
32 };
33 
34 } // namespace jb
35 
36 #endif // jb_thread_config_hpp
int native_priority() const
Base class for all configuration objects.
thread_config()
Constructor.
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
jb::config_attribute< thread_config, std::string > scheduler
config_object_constructors(thread_config)
jb::config_attribute< thread_config, std::string > name
jb::config_attribute< thread_config, std::string > priority
The top-level namespace for the JayBeams library.
Definition: as_hhmmss.hpp:7