From f2b4acb2fe6a366288b19843e0d2678b8590bdf4 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 25 Apr 2021 13:43:14 +0200 Subject: Chu chuu, using the bus for everything now! Well, I know: bus != train. But I like trains. So I don't care. Go away! --- kernel/inc/io.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'kernel/inc/io.h') diff --git a/kernel/inc/io.h b/kernel/inc/io.h index e0b817b..ed7920e 100644 --- a/kernel/inc/io.h +++ b/kernel/inc/io.h @@ -1,7 +1,7 @@ // MIT License, Copyright (c) 2021 Marvin Borner -#ifndef DEV_H -#define DEV_H +#ifndef IO_H +#define IO_H #include #include @@ -11,7 +11,7 @@ struct io_dev { res (*read)(void *buf, u32 offset, u32 count) NONNULL; - res (*write)(void *buf, u32 offset, u32 count) NONNULL; + res (*write)(const void *buf, u32 offset, u32 count) NONNULL; res (*control)(u32 request, void *arg1, void *arg2, void *arg3); res (*ready)(void); }; @@ -21,12 +21,13 @@ 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_write(enum io_type io, const void *buf, u32 offset, u32 count); res io_read(enum io_type io, void *buf, u32 offset, u32 count); res io_poll(u32 *devs); res io_ready(enum io_type io); void io_block(enum io_type io, struct proc *proc) NONNULL; void io_unblock(enum io_type io); +void io_unblock_pid(u32 pid); #endif -- cgit v1.2.3