fix: add: threads to process
This commit is contained in:
@ -28,9 +28,14 @@ struct tcb *create_thread(struct pcb *process, void (*routine)(void))
|
||||
new_tcb->state = NEW;
|
||||
|
||||
struct tcb *it = process->thread_list;
|
||||
while (it)
|
||||
it = it->next;
|
||||
it = new_tcb;
|
||||
if (it) {
|
||||
while (it)
|
||||
it = it->next;
|
||||
it = new_tcb;
|
||||
}
|
||||
else {
|
||||
process->thread_list = new_tcb;
|
||||
}
|
||||
|
||||
return new_tcb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user