virtual bool mammut::task::Task::getCoreUsage |
( |
double & |
coreUsage | ) |
const |
|
pure virtual |
Returns the percentage of time spent by this execution unit on a processing core. The percentage is computed over a period of time spanning from the last call of resetCoreUsage (or from the creation of this object) to the moment of this call.
- Parameters
-
coreUsage | The percentage of time spent by this execution unit on a processing core. |
- Returns
- If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::getPriority |
( |
uint & |
priority | ) |
const |
|
pure virtual |
Gets the current priority of this execution unit.
- Parameters
-
priority | The current priority of this execution unit. The higher is the value, the higher is the priority. It will be in the range [MAMMUT_PROCESS_PRIORITY_MIN, MAMMUT_PROCESS_PRIORITY_MAX] |
- Returns
- If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::getVirtualCoreId |
( |
topology::VirtualCoreId & |
virtualCoreId | ) |
const |
|
pure virtual |
Gets the identifier of the virtual core on which this unit is currently running.
- Parameters
-
virtualCoreId | The identifier of the virtual core on which this unit is currently running. |
- Returns
- If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::move |
( |
const topology::Cpu * |
cpu | ) |
const |
|
pure virtual |
Move this execution unit on a specified CPU. NOTE: If executed on a process, all its threads will be moved too.
- Parameters
-
cpu | The CPU on which this execution unit must be moved. |
- Returns
- If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
Move this execution unit on a specified physical core. NOTE: If executed on a process, all its threads will be moved too.
- Parameters
-
physicalCore | The physical core on which this execution unit must be moved. |
- Returns
- If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
Move this execution unit on a specified virtual core. NOTE: If executed on a process, all its threads will be moved too.
- Parameters
-
virtualCore | The virtual core on which this execution unit must be moved. |
- Returns
- If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::move |
( |
topology::VirtualCoreId |
virtualCoreId | ) |
const |
|
pure virtual |
Move this execution unit on a specified virtual core. NOTE: If executed on a process, all its threads will be moved too.
- Parameters
-
virtualCoreId | The identifier of the virtual core on which this execution unit must be moved. |
- Returns
- If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::move |
( |
const std::vector< const topology::VirtualCore * > |
virtualCores | ) |
const |
|
pure virtual |
Move this execution unit on a set of specified virtual cores.
- Parameters
-
virtualCores | The virtual cores on which this execution unit must be moved. |
- Returns
- If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::move |
( |
const std::vector< topology::VirtualCoreId > |
virtualCoresIds | ) |
const |
|
pure virtual |
Move this execution unit on a set of specified virtual cores.
- Parameters
-
virtualCoresIds | The identifiers of the virtual cores on which this execution unit must be moved. |
- Returns
- If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::resetCoreUsage |
( |
| ) |
|
|
pure virtual |
Resets the counter for core usage percentage computation.
- Returns
- If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::setPriority |
( |
uint |
priority | ) |
const |
|
pure virtual |
Sets the priority of this execution unit. NOTE: If executed on a process, the priority of all its thread will be changed too. NOTE: It may require privileged rights.
- Parameters
-
priority | The priority of this execution unit. The higher is the value, the higher is the priority. It must be in the range [MAMMUT_PROCESS_PRIORITY_MIN, MAMMUT_PROCESS_PRIORITY_MAX] |
- Returns
- If false is returned, the priority value is outside the allowed range or this execution unit is no more active and the call failed. Otherwise, true is returned.
The documentation for this class was generated from the following file:
- /home/daniele/Code/Mammut/mammut/task/task.hpp