summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/backend.h
blob: 6a8bee6dab830e843e7c97972bf1abe2aad1300d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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);