diff options
author | dzwdz | 2022-08-28 13:33:09 +0200 |
---|---|---|
committer | dzwdz | 2022-08-28 13:33:09 +0200 |
commit | a8e0cd702f97ffc74dd29f4b873e8813b7e9f27c (patch) | |
tree | 197f8a0563f6dc070809073ecfd572cec4a63abb /src/kernel/arch/amd64/driver/serial.c | |
parent | f0bda71fe2a4df4201c6195be1fe46cf895c134d (diff) |
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
Diffstat (limited to 'src/kernel/arch/amd64/driver/serial.c')
-rw-r--r-- | src/kernel/arch/amd64/driver/serial.c | 6 |
1 files changed, 2 insertions, 4 deletions
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 <kernel/mem/virt.h> #include <kernel/ring.h> #include <kernel/panic.h> +#include <kernel/proc.h> #include <stdint.h> 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); } } |