Move scheduler threads to a linked list implementation.
Removes the internal next ptr from the Thread class. We avoid doing a memory operation when scheduling on yield because we simply cycle the item to the back of the list.
This commit is contained in:
parent
a06c9dced4
commit
71196dc90f
3 changed files with 109 additions and 31 deletions
|
|
@ -35,9 +35,6 @@ class Thread {
|
|||
void SetState(State state) { state_ = state; }
|
||||
void Exit();
|
||||
|
||||
// FIXME: Probably make this private.
|
||||
Thread* next_thread_;
|
||||
|
||||
private:
|
||||
// Special constructor for the root thread only.
|
||||
Thread(Process* proc) : process_(proc), id_(0) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue