aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/syscall.c
diff options
context:
space:
mode:
authorMarvin Borner2021-01-20 23:22:32 +0100
committerMarvin Borner2021-01-20 23:22:32 +0100
commit64ccbef99bdadc816e8c756ca8b5ae9a148a47fd (patch)
treedc53211d20a6b711b5076cbb46119c42f77caae6 /kernel/features/syscall.c
parent1ca3f322c81544ba769a0cd44fbd4bf03a8f875d (diff)
Added proc wait struct with function
Diffstat (limited to 'kernel/features/syscall.c')
-rw-r--r--kernel/features/syscall.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/features/syscall.c b/kernel/features/syscall.c
index 59965a5..d980317 100644
--- a/kernel/features/syscall.c
+++ b/kernel/features/syscall.c
@@ -42,8 +42,9 @@ void syscall_handler(struct regs *r)
} else {
struct proc *p = proc_current();
p->state = PROC_SLEEPING;
- p->waits_for = vfs_find_dev((char *)r->ebx)->id;
- scheduler(r);
+ p->wait.id = vfs_find_dev((char *)r->ebx)->id;
+ p->wait.func = vfs_read;
+ proc_yield(r);
sti();
while (1)
hlt();