aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/features/proc.c')
-rw-r--r--kernel/features/proc.c7
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");