Tasks now are a doubly-linked list
This commit is contained in:
parent
c18c7cff2f
commit
5a5fee4d74
4
.gdbinit
4
.gdbinit
@ -2,8 +2,8 @@ set pagination off
|
||||
target remote localhost:1234
|
||||
symbol-file kernel/kernel.elf
|
||||
add-symbol-file vfs/vfs
|
||||
b kernel/cpu/i386/tasking.c:129
|
||||
b kernel/cpu/i386/tasking.c:140
|
||||
b kernel/cpu/i386/tasking.c:132
|
||||
b kernel/cpu/i386/tasking.c:143
|
||||
commands 1 2
|
||||
silent
|
||||
disable breakpoints
|
||||
|
@ -97,7 +97,10 @@ Task* tasking_createTaskCr3KmodeParam(void* eip,void* cr3,char kmode,char param1
|
||||
}
|
||||
if (tailTask) {
|
||||
tailTask->next=task;
|
||||
task->prev=tailTask;
|
||||
tailTask=task;
|
||||
} else {
|
||||
task->prev=NULL;
|
||||
}
|
||||
if (task->pid!=0) {
|
||||
serial_printf("Created task with PID %d.\n",task->pid);
|
||||
|
@ -12,6 +12,7 @@ typedef struct Task {
|
||||
char priv;
|
||||
int errno;
|
||||
uint32_t pid;
|
||||
struct Task* prev;
|
||||
struct Task* next;
|
||||
} Task;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user