00001 00010 // =================================================================== 00011 // Avoid multiple inclusion. 00012 #if !defined (_TASK_HH) 00013 #define _TASK_HH 00014 // =================================================================== 00015 00016 00017 00018 // =================================================================== 00019 // INCLUDES 00020 00021 #include "types-and-constants.hh" 00022 // =================================================================== 00023 00024 00025 00026 // =================================================================== 00027 // FORWARD DECLARATION 00028 00029 class Process; 00030 // =================================================================== 00031 00032 00033 00034 // =================================================================== 00035 // CLASS DEFINITION 00036 00046 class Task { 00047 00048 public: // CONSTRUCTOR & DESTRUCTOR (if any) 00049 00055 Task (); 00056 00063 void mark_quanta_start (const timestamp_t system_cycle_time, 00064 const timestamp_t system_instruction_time, 00065 const timestamp_t system_reference_time); 00066 00073 void mark_time (const timestamp_t system_cycle_time, 00074 const timestamp_t system_instruction_time, 00075 const timestamp_t system_reference_time); 00076 00077 public: // DATA MEMBERS 00078 00080 task_ID_t task_ID; 00081 00083 Process* process; 00084 00086 Task* parent_task; 00087 00089 timestamp_t virtual_cycle_time; 00090 00093 timestamp_t virtual_instruction_time; 00094 00097 timestamp_t virtual_reference_time; 00098 00100 timestamp_t last_system_cycle_time; 00101 00103 timestamp_t last_system_instruction_time; 00104 00106 timestamp_t last_system_reference_time; 00107 00108 }; // class Task 00109 // =================================================================== 00110 00111 00112 00113 // =================================================================== 00114 #endif // _TASK_HH 00115 // ===================================================================