diff options
author | dzwdz | 2022-04-09 19:03:29 +0200 |
---|---|---|
committer | dzwdz | 2022-04-09 19:03:29 +0200 |
commit | 59ca1c46970fa8df2d0fa4b8163a99ca418bd2cf (patch) | |
tree | b07438ddb940f206a3370bc7524f547661b41c6c /src/kernel/vfs/request.c | |
parent | e17137d8d74e65e3cce7c04263d73a111bae25c0 (diff) |
kernel/vfs: prevent the vfs functions from switching processes
Diffstat (limited to 'src/kernel/vfs/request.c')
-rw-r--r-- | src/kernel/vfs/request.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c index ecd862a..5b65e52 100644 --- a/src/kernel/vfs/request.c +++ b/src/kernel/vfs/request.c @@ -5,7 +5,6 @@ #include <kernel/vfs/request.h> #include <kernel/vfs/root.h> -// dispatches a VFS operation to the correct process int vfs_request_create(struct vfs_request req_) { struct vfs_request *req; int ret; @@ -29,15 +28,14 @@ int vfs_request_create(struct vfs_request req_) { && req->backend->handler->state == PS_WAITS4REQUEST) { vfs_request_accept(req); - process_switch(req->backend->handler); } else { // backend isn't ready yet, join the queue struct process **iter = &req->backend->queue; while (*iter != NULL) iter = &(*iter)->waits4fs.queue_next; *iter = process_current; - process_switch_any(); } + return -1; // isn't passed to the caller process anyways default: panic_invalid_state(); } @@ -77,7 +75,7 @@ int vfs_request_accept(struct vfs_request *req) { handler->state = PS_RUNNING; handler->handled_req = req; regs_savereturn(&handler->regs, 0); - return; + return 0; fail: panic_unimplemented(); // TODO } |