sched: add kernel thread creation and SMP-aware thread scheduling

This commit is contained in:
2023-05-04 21:43:18 +01:00
parent bb524c1576
commit 7d321fb7f0
5 changed files with 86 additions and 2 deletions

View File

@@ -27,6 +27,10 @@ struct thread *rq_dequeue(struct runqueue *rq)
struct thread *thr = QUEUE_CONTAINER(struct thread, tr_rqentry, qe);
if (rq->rq_nthreads > 0) {
rq->rq_nthreads--;
}
if (queue_empty(q)) {
rq->rq_readybits &= ~PRIO_MASK(prio);
}