diff options
author | Marvin Borner | 2020-08-22 21:58:07 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-22 21:58:07 +0200 |
commit | 32f63ffc96f7f7ec6c504b8f50292316f026dd21 (patch) | |
tree | ead182bca5c38ddde00ecd706ae3fc3ca6981142 /kernel/features/proc.c | |
parent | 8bb7b5cceaaf96a5dd6321d35aae28748896d87b (diff) |
Fixed events
Diffstat (limited to 'kernel/features/proc.c')
-rw-r--r-- | kernel/features/proc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/features/proc.c b/kernel/features/proc.c index 4d4a9f3..d1a2780 100644 --- a/kernel/features/proc.c +++ b/kernel/features/proc.c @@ -72,6 +72,7 @@ void scheduler(struct regs *regs) quantum = PROC_QUANTUM; proc->state = PROC_IN_EVENT; list_remove(proc->events, proc->events->head); + regs->useresp += 4; ((u32 *)regs->useresp)[1] = (u32)proc_event->data; // Huh } @@ -93,10 +94,7 @@ void proc_print() struct proc *proc_current() { - if (current) - return current->data; - else - return NULL; + return current ? current->data : NULL; } void proc_send(struct proc *src, struct proc *dest, enum message_type type, void *data) |