From 881be872675e4cff153c27c641980451c4a3f479 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 14 Jul 2024 19:40:31 +0200 Subject: kernel: make the adhoc VfsQueue queues use ReqQueue instead I'm still not sure if I should use sys/queue.h for this. But yeah, this is more consistent, and it will also let me switch over to O(1) insertions later on. --- src/kernel/proc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/kernel/proc.c') diff --git a/src/kernel/proc.c b/src/kernel/proc.c index 9a9a84f..61c1dad 100644 --- a/src/kernel/proc.c +++ b/src/kernel/proc.c @@ -86,8 +86,9 @@ Proc *proc_fork(Proc *parent, int flags) { if ((flags & FORK_NEWFS) == 0 && parent->controlled) { child->controlled = parent->controlled; - assert(child->controlled->provhcnt); - child->controlled->provhcnt++; + assert(child->controlled->is_user); + assert(child->controlled->user.provhcnt); + child->controlled->user.provhcnt++; } child->mount = parent->mount; @@ -211,8 +212,7 @@ static bool unref(uint64_t *refcount) { void proc_kill(Proc *p, int ret) { if (proc_alive(p)) { if (p->controlled) { - // TODO vfs_backend_user_handlerdown - assert(p->controlled->provhcnt > 0); + assert(p->controlled->is_user); if (p->controlled->user.handler == p) { assert(p->state == PS_WAITS4REQUEST); p->controlled->user.handler = NULL; -- cgit v1.2.3