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! --- libs/libc/inc/sys.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libs/libc/inc') diff --git a/libs/libc/inc/sys.h b/libs/libc/inc/sys.h index ee82946..749888a 100644 --- a/libs/libc/inc/sys.h +++ b/libs/libc/inc/sys.h @@ -81,10 +81,12 @@ res read(const char *path, void *buf, u32 offset, u32 count) NONNULL; res write(const char *path, const void *buf, u32 offset, u32 count) NONNULL; res stat(const char *path, struct stat *buf) NONNULL; res exec(const char *path, ...) ATTR((nonnull(1))) SENTINEL; -res io_poll(u32 *devs); -res io_read(enum io_type io, void *buf, u32 offset, u32 count); -res io_write(enum io_type io, void *buf, u32 offset, u32 count); + +res io_poll(u32 *devs) NONNULL; +res io_read(enum io_type io, void *buf, u32 offset, u32 count) NONNULL; +res io_write(enum io_type io, void *buf, u32 offset, u32 count) NONNULL; res io_control(enum io_type io, ...); + res yield(void); res boot(u32 cmd); -- cgit v1.2.3