newthread: fix tid and runningthreadcount

This commit is contained in:
Matheus
2024-04-14 19:11:39 -03:00
parent 06629f3088
commit f8621bacc2
+5
View File
@@ -55,6 +55,11 @@ syscallret_t syscall_newthread(context_t *, void *entry, void *stack) {
proc->threads[i]->vmmctx = _cpu()->thread->vmmctx;
ret.errno = 0;
ret.ret = proc->threads[i]->tid;
__atomic_fetch_add(&proc->runningthreadcount, 1, __ATOMIC_SEQ_CST);
sched_queue(proc->threads[i]);
cleanup: