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
|
target remote localhost:1234
|
||||||
symbol-file kernel/kernel.elf
|
symbol-file kernel/kernel.elf
|
||||||
add-symbol-file vfs/vfs
|
add-symbol-file vfs/vfs
|
||||||
b kernel/cpu/i386/tasking.c:129
|
b kernel/cpu/i386/tasking.c:132
|
||||||
b kernel/cpu/i386/tasking.c:140
|
b kernel/cpu/i386/tasking.c:143
|
||||||
commands 1 2
|
commands 1 2
|
||||||
silent
|
silent
|
||||||
disable breakpoints
|
disable breakpoints
|
||||||
|
@ -97,7 +97,10 @@ Task* tasking_createTaskCr3KmodeParam(void* eip,void* cr3,char kmode,char param1
|
|||||||
}
|
}
|
||||||
if (tailTask) {
|
if (tailTask) {
|
||||||
tailTask->next=task;
|
tailTask->next=task;
|
||||||
|
task->prev=tailTask;
|
||||||
tailTask=task;
|
tailTask=task;
|
||||||
|
} else {
|
||||||
|
task->prev=NULL;
|
||||||
}
|
}
|
||||||
if (task->pid!=0) {
|
if (task->pid!=0) {
|
||||||
serial_printf("Created task with PID %d.\n",task->pid);
|
serial_printf("Created task with PID %d.\n",task->pid);
|
||||||
|
@ -12,6 +12,7 @@ typedef struct Task {
|
|||||||
char priv;
|
char priv;
|
||||||
int errno;
|
int errno;
|
||||||
uint32_t pid;
|
uint32_t pid;
|
||||||
|
struct Task* prev;
|
||||||
struct Task* next;
|
struct Task* next;
|
||||||
} Task;
|
} Task;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user