From a8e0cd702f97ffc74dd29f4b873e8813b7e9f27c Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 28 Aug 2022 13:33:09 +0200 Subject: kernel/vfs: minor vfs_request / vfs_root_register rework * changed vfs_root_register's name because the _mount didn't add anything * removed the old pointless vfs_backend_tryaccept calls from drivers * because of that, i could remove the vfs_backend globals * replaced the horrible BACKEND_KERN macro * all vfs_backends are now stored on the heap --- src/kernel/arch/amd64/driver/serial.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/kernel/arch/amd64/driver/serial.c') diff --git a/src/kernel/arch/amd64/driver/serial.c b/src/kernel/arch/amd64/driver/serial.c index cf21b61..9ddb355 100644 --- a/src/kernel/arch/amd64/driver/serial.c +++ b/src/kernel/arch/amd64/driver/serial.c @@ -4,6 +4,7 @@ #include #include #include +#include #include static volatile uint8_t backlog_buf[64]; @@ -12,10 +13,8 @@ static volatile ring_t backlog = {(void*)backlog_buf, sizeof backlog_buf, 0, 0}; static const int COM1 = 0x3f8; static void accept(struct vfs_request *req); - static struct vfs_request *blocked_on = NULL; -static struct vfs_backend backend = BACKEND_KERN(accept); -void serial_init(void) { vfs_mount_root_register("/com1", &backend); } +void serial_init(void) { vfs_root_register("/com1", accept); } static void serial_selftest(void) { @@ -47,7 +46,6 @@ void serial_irq(void) { if (blocked_on) { accept(blocked_on); blocked_on = blocked_on->postqueue_next; - vfs_backend_tryaccept(&backend); } } -- cgit v1.2.3