diff options
author | Marvin Borner | 2020-11-20 15:58:32 +0100 |
---|---|---|
committer | Marvin Borner | 2020-11-20 15:58:32 +0100 |
commit | 5708ab26c0de8fc1be3e96a0f3f092da0938169e (patch) | |
tree | de63e635b99923a17120030317b69d57ea676d6f /kernel/features/proc.c | |
parent | 56e33a757dee8b6c34cc1721e58d84be5f353e23 (diff) |
Fixed some network race conditions
Diffstat (limited to 'kernel/features/proc.c')
-rw-r--r-- | kernel/features/proc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/features/proc.c b/kernel/features/proc.c index ffe0af0..f4e6124 100644 --- a/kernel/features/proc.c +++ b/kernel/features/proc.c @@ -67,12 +67,14 @@ void scheduler(struct regs *regs) void scheduler_enable(void) { + timer_install(); irq_install_handler(0, scheduler); } void scheduler_disable(void) { - irq_install_handler(0, scheduler); + irq_uninstall_handler(0); + timer_install(); } void proc_print(void) @@ -82,7 +84,8 @@ void proc_print(void) printf("\nPROCESSES\n"); struct proc *proc = NULL; while (node && (proc = node->data)) { - printf("Process %d: %s\n", proc->pid, proc->name); + printf("Process %d: %s [%s]\n", proc->pid, proc->name, + proc->state == PROC_RUNNING ? "RUNNING" : "SLEEPING"); node = node->next; } printf("\n"); |