Move Process to storing Threads in a linked list.
This should really be a vector or hashmap of some sort but this is fine for now.
This commit is contained in:
parent
5cab9f843e
commit
9f3ffbf5b4
4 changed files with 19 additions and 34 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "lib/linked_list.h"
|
||||
|
||||
// Forward decl due to cyclic dependency.
|
||||
class Thread;
|
||||
|
||||
|
|
@ -37,10 +39,5 @@ class Process {
|
|||
|
||||
uint64_t next_thread_id_ = 0;
|
||||
|
||||
// FIXME: Make a better data structure for this.
|
||||
struct ThreadEntry {
|
||||
Thread* thread;
|
||||
ThreadEntry* next;
|
||||
};
|
||||
ThreadEntry* thread_list_front_;
|
||||
LinkedList<Thread*> threads_;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue