scheduler: pid refcount

This commit is contained in:
Matheus
2024-04-28 18:45:43 -03:00
parent 8deb3a1144
commit e0c2cd9a2a
4 changed files with 38 additions and 2 deletions
+2
View File
@@ -57,6 +57,8 @@ syscallret_t syscall_fork(context_t *ctx) {
ret.ret = nproc->pid;
sched_queue(nthread);
// proc starts with 1 refcount, release it here as to only have the thread reference
PROC_RELEASE(nproc);
cleanup:
return ret;