diff options
author | Marvin Borner | 2021-02-14 17:07:29 +0100 |
---|---|---|
committer | Marvin Borner | 2021-02-14 17:07:29 +0100 |
commit | 1287f9dfe987f0456e4fb0741385d5f0278ef53b (patch) | |
tree | 64d3da484a4d186a725779f20d339432d51f441a /kernel/features/syscall.c | |
parent | bc4e62f629a392e1a4cf204665e91c57f4e619b2 (diff) |
Message waiting and more!
Diffstat (limited to 'kernel/features/syscall.c')
-rw-r--r-- | kernel/features/syscall.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/features/syscall.c b/kernel/features/syscall.c index 80c3e9e..9f05471 100644 --- a/kernel/features/syscall.c +++ b/kernel/features/syscall.c @@ -40,8 +40,10 @@ void syscall_handler(struct regs *r) if (vfs_ready((char *)r->ebx)) { r->eax = (u32)vfs_read((char *)r->ebx, (void *)r->ecx, r->edx, r->esi); } else { - proc_wait_for(vfs_find_dev((char *)r->ebx)->id, PROC_WAIT_DEV, vfs_read); - proc_yield(r); + if (vfs_wait((char *)r->ebx, vfs_read) < 0) + r->eax = -1; + else + proc_yield(r); } break; } |