summaryrefslogtreecommitdiff
path: root/src/kernel/proc.h
diff options
context:
space:
mode:
authordzwdz2022-08-19 18:30:35 +0200
committerdzwdz2022-08-19 18:30:35 +0200
commit6bea8cd391125734339dfb83db498a8651c9f7f7 (patch)
tree1eb30cda98318ff4fc63652425ef725903619766 /src/kernel/proc.h
parent7a4bc281958c639cd52ff4f192933aa161ba81a4 (diff)
syscall/fork: allow sharing handles between threads
Diffstat (limited to 'src/kernel/proc.h')
-rw-r--r--src/kernel/proc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/kernel/proc.h b/src/kernel/proc.h
index 4b256bd..f445eab 100644
--- a/src/kernel/proc.h
+++ b/src/kernel/proc.h
@@ -48,7 +48,9 @@ struct process {
};
struct vfs_mount *mount;
- struct handle *_handles[HANDLE_MAX];
+ struct handle **_handles; /* points to struct handle *[HANDLE_MAX] */
+ uint64_t *handles_refcount; /* works just like pages_refcount */
+
uint32_t id; /* only for debugging, don't expose to userland */
bool noreap;