fix: add: threads to process
This commit is contained in:
@ -46,13 +46,19 @@ struct pcb *create_process(uint8_t uid)
|
||||
return NULL;
|
||||
}
|
||||
memcpy(new_pcb->heap, current_pcb->heap, 4096);
|
||||
new_pcb->next = current_pcb->next;
|
||||
new_pcb->prev = current_pcb;
|
||||
current_pcb->next = new_pcb;
|
||||
if (current_pcb->prev == current_pcb)
|
||||
current_pcb->prev = new_pcb;
|
||||
|
||||
if (current_pcb) {
|
||||
new_pcb->next = current_pcb->next;
|
||||
new_pcb->prev = current_pcb;
|
||||
current_pcb->next = new_pcb;
|
||||
if (current_pcb->prev == current_pcb)
|
||||
current_pcb->prev = new_pcb;
|
||||
}
|
||||
else {
|
||||
current_pcb = new_pcb;
|
||||
}
|
||||
new_pcb->signals.pending = SIG_IGN;
|
||||
new_pcb->thread_list = NULL;
|
||||
|
||||
return new_pcb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user