17 #include <pia/common/common_definitions.h> 18 #include <pia/common/common_ListNode.h> 19 #include <pia/common/common_Time.h> 35 class Job :
public RootObject
78 virtual void Reset(
bool isCheck =
true);
88 void Ready(
bool isBackground =
false);
98 void Resume(
bool isBackground =
false);
117 State GetState()
const;
124 bool IsRunning()
const;
131 bool IsForeground()
const;
137 bool IsBackground()
const;
146 u32 GetExecutedCount()
const 148 return m_ExecutedCount;
157 const Time& GetExecutionTime()
const 159 return m_ExecutionTime;
170 void Execute(
bool isBackground);
178 static s32 GetListNodeOffset()
180 return offsetof(Job, m_ListNode);
190 EXECUTE_STATE_CONTINUE,
215 : m_ExecuteState(executeState), m_WaitTime(0)
226 : m_ExecuteState(executeState), m_WaitTime(waitTime)
250 INNER_STATE_FG_WAITING,
251 INNER_STATE_FG_READY,
252 INNER_STATE_FG_RUNNING,
253 INNER_STATE_BG_WAITING,
254 INNER_STATE_BG_READY,
255 INNER_STATE_BG_RUNNING,
257 INNER_STATE_COMPLETE,
267 static const char* GetInnerStateString(InnerState innerState);
271 volatile InnerState m_InnerState;
277 Time m_ExecutionTime;
Indicates execution has completed.
Definition: common_Job.h:192
Indicates execution is not complete. The job will run in the background next.
Definition: common_Job.h:198
Indicates execution is not complete, but will resume after a set period of time.
Definition: common_Job.h:195
ExecuteResult(ExecuteState executeState)
Instantiates the object.
Definition: common_Job.h:214
ExecuteState
Indicates the type of execution result.
Definition: common_Job.h:188
Class that represents time.
Definition: common_Time.h:39
Represents the result of calling the Execute function.
Definition: common_Job.h:205
ExecuteResult(ExecuteState executeState, u16 waitTime)
Instantiates the object.
Definition: common_Job.h:225
Indicates execution was suspended.
Definition: common_Job.h:194
Indicates execution is not complete. Resume execution with the next call to Scheduler::Dispatch. Jobs in this state cannot be used in the background.
Definition: common_Job.h:196
Indicates execution is not complete. Continue execution.
Definition: common_Job.h:191
Indicates execution is not complete. Next, execute in the main thread using the Dispatch function...
Definition: common_Job.h:197
Indicates execution has been canceled. (Currently no different from COMPLETE.)
Definition: common_Job.h:193