From 6bea8cd391125734339dfb83db498a8651c9f7f7 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 19 Aug 2022 18:30:35 +0200 Subject: syscall/fork: allow sharing handles between threads --- src/kernel/proc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/kernel/proc.h') 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; -- cgit v1.2.3