hw4 test
This commit is contained in:
@@ -23,22 +23,25 @@ class Scheduler {
|
||||
~Scheduler(); // De-allocate ready list
|
||||
|
||||
void ReadyToRun(Thread* thread);
|
||||
// Thread can be dispatched.
|
||||
// Thread can be dispatched.
|
||||
Thread* FindNextToRun(); // Dequeue first thread on the ready
|
||||
// list, if any, and return thread.
|
||||
// list, if any, and return thread.
|
||||
void Run(Thread* nextThread, bool finishing);
|
||||
// Cause nextThread to start running
|
||||
// Cause nextThread to start running
|
||||
void CheckToBeDestroyed();// Check if thread that had been
|
||||
// running needs to be deleted
|
||||
// running needs to be deleted
|
||||
void Print(); // Print contents of ready list
|
||||
|
||||
|
||||
// SelfTest for scheduler is implemented in class Thread
|
||||
|
||||
private:
|
||||
List<Thread *> *readyList; // queue of threads that are ready to run,
|
||||
// but not running
|
||||
// Todo ----
|
||||
SortedList<Thread *> *readyList; // queue of threads that are ready to run,
|
||||
// but not running
|
||||
// ---------
|
||||
|
||||
Thread *toBeDestroyed; // finishing thread to be destroyed
|
||||
// by the next thread that runs
|
||||
// by the next thread that runs
|
||||
};
|
||||
|
||||
#endif // SCHEDULER_H
|
||||
|
||||
Reference in New Issue
Block a user