summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/backend.h
diff options
context:
space:
mode:
authordzwdz2021-09-04 19:34:51 +0200
committerdzwdz2021-09-04 19:34:51 +0200
commit613de4db61dd99e7d2049b0a303e167fa711030b (patch)
tree84b577c30aac3ac7f8360fcc7aa78f7d29479538 /src/kernel/vfs/backend.h
parentc4531fa5e1aa16b7ba74de2975eadf06b3052b78 (diff)
new vfs impl pt. 1: implement open()
Diffstat (limited to 'src/kernel/vfs/backend.h')
-rw-r--r--src/kernel/vfs/backend.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/kernel/vfs/backend.h b/src/kernel/vfs/backend.h
new file mode 100644
index 0000000..6a8bee6
--- /dev/null
+++ b/src/kernel/vfs/backend.h
@@ -0,0 +1,23 @@
+#pragma once
+#include <shared/vfs.h>
+
+enum vfs_backend_type {
+ VFS_BACK_ROOT,
+};
+
+// describes something which can acts as an access function
+struct vfs_backend {
+ enum vfs_backend_type type;
+};
+
+// describes an in-progress vfs call
+struct vfs_op_request {
+ struct vfs_op op;
+ struct process *caller;
+ struct vfs_backend *backend;
+};
+
+
+// these can switch processes
+_Noreturn void vfs_backend_dispatch(struct vfs_backend *backend, struct vfs_op op);
+_Noreturn void vfs_backend_finish(struct vfs_op_request *, int ret);