diff options
author | dzwdz | 2022-05-01 20:09:52 +0200 |
---|---|---|
committer | dzwdz | 2022-05-01 20:09:52 +0200 |
commit | d996f88bfda890df5d2b76e7c06cae329e04ab00 (patch) | |
tree | eebe7b88bc48960a78648001adf38b5c66ffcfe3 /src/kernel/handle.h | |
parent | 7c62817193517f298bc566f3803c00d53a9a2b94 (diff) |
kernel/proc: make handles separate refcounted objects
Diffstat (limited to 'src/kernel/handle.h')
-rw-r--r-- | src/kernel/handle.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/kernel/handle.h b/src/kernel/handle.h index 774e633..86c1dbe 100644 --- a/src/kernel/handle.h +++ b/src/kernel/handle.h @@ -6,7 +6,7 @@ #define HANDLE_MAX 16 enum handle_type { - HANDLE_EMPTY = 0, // by design - handle structs start out NULLed out + HANDLE_INVALID = 0, HANDLE_FILE, HANDLE_FS_FRONT, @@ -23,4 +23,9 @@ struct handle { struct vfs_backend *backend; } fs; }; + + size_t refcount; }; + +struct handle *handle_init(enum handle_type); +void handle_close(struct handle *); |