From 7485f7e441ca892876d9401380aa77610eb85f76 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 16 Apr 2021 23:22:02 +0200 Subject: New elegant I/O blocking solution This is done using an internal scheduler syscall (127). Very nice! --- kernel/inc/io.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'kernel/inc/io.h') diff --git a/kernel/inc/io.h b/kernel/inc/io.h index 3291bfc..e0b817b 100644 --- a/kernel/inc/io.h +++ b/kernel/inc/io.h @@ -19,12 +19,14 @@ struct io_dev { void io_install(struct boot_info *boot); void io_add(enum io_type io, struct io_dev *dev) NONNULL; +// No NONNULL on syscalls res io_control(enum io_type io, u32 request, void *arg1, void *arg2, void *arg3); res io_write(enum io_type io, void *buf, u32 offset, u32 count); res io_read(enum io_type io, void *buf, u32 offset, u32 count); -res io_poll(u32 *devs) NONNULL; +res io_poll(u32 *devs); +res io_ready(enum io_type io); -void io_block(enum io_type io, struct proc *proc, struct regs *r) NONNULL; +void io_block(enum io_type io, struct proc *proc) NONNULL; void io_unblock(enum io_type io); #endif -- cgit v1.2.3