mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: sched: add yield support
Add yield support for schedule, which can give up pcpu proactively. Tracked-On: #4178 Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> Signed-off-by: Yu Wang <yu1.wang@intel.com> Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -240,6 +240,11 @@ void kick_thread(const struct thread_object *obj)
|
||||
release_schedule_lock(pcpu_id, rflag);
|
||||
}
|
||||
|
||||
void yield_current(void)
|
||||
{
|
||||
make_reschedule_request(get_pcpu_id(), DEL_MODE_IPI);
|
||||
}
|
||||
|
||||
void run_thread(struct thread_object *obj)
|
||||
{
|
||||
uint64_t rflag;
|
||||
|
Reference in New Issue
Block a user