Class that abstracts the resource control that can be applied to threads.
More...
#include <thread_resource_control.h>
Class that abstracts the resource control that can be applied to threads.
The resource controls include set of CPU IDS which determine the CPUS the thread is allowed to run and the thread priority.
◆ Thread_resource_control()
resourcegroups::Thread_resource_control::Thread_resource_control |
( |
| ) |
|
|
inline |
◆ apply_control() [1/2]
bool resourcegroups::Thread_resource_control::apply_control |
( |
| ) |
|
Apply the thread resource controls to the thread on which this function is called.
- Returns
- false if control application is successful else true
◆ apply_control() [2/2]
bool resourcegroups::Thread_resource_control::apply_control |
( |
my_thread_os_id_t |
thread_os_id | ) |
|
Apply the thread resource controls to thread identified by the thread os id.
- Parameters
-
thread_os_id | Thread OS ID. |
- Returns
- false if control application is successful else true
◆ priority()
int resourcegroups::Thread_resource_control::priority |
( |
| ) |
const |
|
inline |
Get priority associated with Thread resource control object.
- Returns
- an int value indicating the thread priority.
◆ set_priority()
void resourcegroups::Thread_resource_control::set_priority |
( |
int |
priority | ) |
|
|
inline |
Set priority associated with Thread resource control object.
◆ set_vcpu_vector()
void resourcegroups::Thread_resource_control::set_vcpu_vector |
( |
const std::vector< Range > & |
vcpu_vector | ) |
|
|
inline |
Set the CPU ID range vector.
◆ validate()
bool resourcegroups::Thread_resource_control::validate |
( |
const Type & |
resource_group_type | ) |
const |
Validate the CPU ID Ranges and thread priority value associate with the thread resource control object.
- Returns
- false if validation is successful else true.
◆ vcpu_vector()
const std::vector< Range > & resourcegroups::Thread_resource_control::vcpu_vector |
( |
| ) |
const |
|
inline |
Get const pointer of vector of CPU ID range.
- Returns
- pointer to vector of CPU ID range.
◆ m_priority
int resourcegroups::Thread_resource_control::m_priority |
|
private |
◆ m_vcpu_vector
std::vector<Range> resourcegroups::Thread_resource_control::m_vcpu_vector |
|
private |
The documentation for this class was generated from the following files: