diff options
Diffstat (limited to 'kernel/features/proc.c')
-rw-r--r-- | kernel/features/proc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/features/proc.c b/kernel/features/proc.c index 5b4da1f..021a3d6 100644 --- a/kernel/features/proc.c +++ b/kernel/features/proc.c @@ -114,9 +114,8 @@ struct proc *proc_from_pid(u32 pid) { struct node *iterator = proc_list->head; do { - if (((struct proc *)iterator->data)->pid == pid) { + if (((struct proc *)iterator->data)->pid == pid) return iterator->data; - } } while ((iterator = iterator->next) != NULL); return NULL; } @@ -139,10 +138,10 @@ void proc_exit(struct proc *proc, int status) hlt(); } -// TODO: More instant yield -void proc_yield() +void proc_yield(struct regs *r) { quantum = 0; + scheduler(r); } struct proc *proc_make() |