diff options
author | Marvin Borner | 2020-08-25 21:14:47 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-25 21:14:47 +0200 |
commit | d2017fca3efefdb4d514f2b356855a0fda1fccfd (patch) | |
tree | ebfddbbb5c6c30ae309085a6d3457b9146cd8e6c /kernel/features/proc.c | |
parent | 0724b54018c379850e672ad6571e05b3f848150d (diff) |
Some optimizations or sth
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() |