summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/request.h
diff options
context:
space:
mode:
authordzwdz2022-05-05 22:12:55 +0200
committerdzwdz2022-05-05 22:12:55 +0200
commit9900cc737988f25db30b5876f066a78e73389205 (patch)
tree1bba6cfbe118855ba3d338aa3d881da3aa15ca9e /src/kernel/vfs/request.h
parent740cacba5befeba212935b00f8ae95008f564293 (diff)
kernel: syscalls now have to explicitly save the return value
thus they can opt out of doing that so the calls which might return immediately but can return later don't have to both regs_savereturn and return to the caller. and because of that, the return values of a lot of VFS things have just got way saner
Diffstat (limited to 'src/kernel/vfs/request.h')
-rw-r--r--src/kernel/vfs/request.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/kernel/vfs/request.h b/src/kernel/vfs/request.h
index b4624fa..9dc6088 100644
--- a/src/kernel/vfs/request.h
+++ b/src/kernel/vfs/request.h
@@ -25,10 +25,7 @@ struct vfs_backend {
} user;
struct {
bool (*ready)(struct vfs_backend *);
-
- // return value might be passed to caller
- // TODO make return void
- int (*accept)(struct vfs_request *);
+ void (*accept)(struct vfs_request *);
} kern;
};
};
@@ -59,13 +56,11 @@ struct vfs_request {
};
/** Assigns the vfs_request to the caller, and dispatches the call */
-int vfsreq_create(struct vfs_request);
-int vfsreq_finish(struct vfs_request *, int ret);
+void vfsreq_create(struct vfs_request);
+void vfsreq_finish(struct vfs_request *, int ret);
-/** Try to accept an enqueued request
- * @return same as _syscall_fs_wait, passed to it. except on calls to kern backend, where it returns the result of the fs op - also gets directly passed to caller. it's a mess */
-// TODO fix the return value mess
-int vfs_backend_tryaccept(struct vfs_backend *);
-int vfs_backend_user_accept(struct vfs_request *req);
+/** Try to accept an enqueued request */
+void vfs_backend_tryaccept(struct vfs_backend *);
+void vfs_backend_user_accept(struct vfs_request *req);
void vfs_backend_refdown(struct vfs_backend *);