Go to the documentation of this file.
36 ERROR(
"process ID " << proc->
getID() <<
" not in Ready state");
48 ERROR(
"process ID " << proc->
getID() <<
" is in Ready state");
65 FATAL(
"process ID " << proc->
getID() <<
" is not in the schedule");
Size count() const
Get number of processes on the schedule.
State getState() const
Retrieves the current state.
Represents a process which may run on the host.
ProcessID getID() const
Retrieve our ID number.
Scheduler()
Constructor function.
Queue< Process *, MAX_PROCS > m_queue
Contains processes ready to run.
#define FATAL(msg)
Output a critical message and terminate program immediatly.
#define DEBUG(msg)
Output a debug message to standard output.
#define NULL
NULL means zero.
Process * select()
Select the next process to run.
unsigned int Size
Any sane size indicator cannot go negative.
Result enqueue(Process *proc, bool ignoreState)
Add a Process to the run schedule.
virtual Size count() const
Returns the number of items in the Queue.
#define ERROR(msg)
Output an error message.
T & pop()
Remove item from the tail of the Queue.
bool push(const T &item)
Add item to the head of the Queue.
Result dequeue(Process *proc, bool ignoreState)
Remove a Process from the run schedule.