mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Moved scheduler from containers back to being a global.
It makes more sense to have a scheduler (or runqueue pair) per-cpu rather than per-container. This provides more flexible global scheduling policy that is also simpler due to all scheduling details being controlled from a single point.
This commit is contained in:
@@ -47,8 +47,6 @@ struct container {
|
||||
struct id_pool *thread_id_pool; /* Id pools for thread/spaces */
|
||||
struct id_pool *space_id_pool;
|
||||
|
||||
struct scheduler scheduler; /* Scheduling structs */
|
||||
|
||||
struct mutex_queue_head mutex_queue_head; /* Userspace mutex list */
|
||||
|
||||
/*
|
||||
|
||||
@@ -55,6 +55,7 @@ struct scheduler {
|
||||
/* Total priority of all tasks in container */
|
||||
int prio_total;
|
||||
};
|
||||
extern struct scheduler scheduler;
|
||||
|
||||
void sched_init_runqueue(struct runqueue *rq);
|
||||
void sched_init_task(struct ktcb *task, int priority);
|
||||
|
||||
Reference in New Issue
Block a user