mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-10 05:09:01 +00:00
scheduler: refine runqueue related functions
add struct sched_object, and use it as input param instead of vcpu for below functions: - add_to_cpu_runqueue renamed from add_vcpu_to_runqueue - remove_from_cpu_runqueue renamed from remove_vcpu_from_runqueue - get_next_sched_obj added to get next sched object Tracked-On: #1842 Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <edide.dong@intel.com>
This commit is contained in:
@@ -10,6 +10,10 @@
|
||||
#define NEED_RESCHEDULE (1U)
|
||||
#define NEED_OFFLINE (2U)
|
||||
|
||||
struct sched_object {
|
||||
struct list_head run_list;
|
||||
};
|
||||
|
||||
struct sched_context {
|
||||
spinlock_t runqueue_lock;
|
||||
struct list_head runqueue;
|
||||
@@ -26,8 +30,8 @@ void set_pcpu_used(uint16_t pcpu_id);
|
||||
uint16_t allocate_pcpu(void);
|
||||
void free_pcpu(uint16_t pcpu_id);
|
||||
|
||||
void add_vcpu_to_runqueue(struct acrn_vcpu *vcpu);
|
||||
void remove_vcpu_from_runqueue(struct acrn_vcpu *vcpu);
|
||||
void add_to_cpu_runqueue(struct sched_object *obj, uint16_t pcpu_id);
|
||||
void remove_from_cpu_runqueue(struct sched_object *obj, uint16_t pcpu_id);
|
||||
|
||||
void default_idle(void);
|
||||
|
||||
|
Reference in New Issue
Block a user