diff options
author | dzwdz | 2024-07-14 19:40:31 +0200 |
---|---|---|
committer | dzwdz | 2024-07-14 19:40:31 +0200 |
commit | 881be872675e4cff153c27c641980451c4a3f479 (patch) | |
tree | a374913fc7f1fcbd1d380719d695bf5f67b83e56 /src/kernel/proc.c | |
parent | 6fe8073de975ad7722043f9173fec068178e2eac (diff) |
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.
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r-- | src/kernel/proc.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; |