summaryrefslogtreecommitdiff
path: root/src/kernel/handle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/handle.h')
-rw-r--r--src/kernel/handle.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/kernel/handle.h b/src/kernel/handle.h
index 19d5953..21b4364 100644
--- a/src/kernel/handle.h
+++ b/src/kernel/handle.h
@@ -1,8 +1,5 @@
#pragma once
-
-enum handle_type; // forward declaration for proc.h
-
-#include <camellia/types.h>
+#include <kernel/types.h>
#include <kernel/vfs/mount.h>
#include <kernel/vfs/request.h>
#include <stddef.h>
@@ -15,19 +12,19 @@ enum handle_type {
HANDLE_FS_REQ,
};
-struct handle {
+struct Handle {
enum handle_type type;
- struct vfs_backend *backend; // HANDLE_FILE | HANDLE_FS_FRONT
+ VfsBackend *backend; // HANDLE_FILE | HANDLE_FS_FRONT
void __user *file_id; // only applicable to HANDLE_FILE
bool readable, writeable; /* HANDLE_FILE | HANDLE_PIPE */
- struct vfs_request *req; /* HANDLE_FS_REQ */
+ VfsReq *req; /* HANDLE_FS_REQ */
struct {
- struct process *queued;
- struct handle *sister; // the other end, not included in refcount
+ Proc *queued;
+ Handle *sister; // the other end, not included in refcount
} pipe;
size_t refcount;
};
-struct handle *handle_init(enum handle_type);
-void handle_close(struct handle *);
+Handle *handle_init(enum handle_type);
+void handle_close(Handle *);