Prefer 'vcpu_should_yield()' over checking 'curthread->td_flags' directly.
MFC after: 1 week
This commit is contained in:
parent
77afcadd51
commit
7c0b0b9ad3
@ -1917,7 +1917,7 @@ svm_vmrun(void *arg, int vcpu, register_t rip, pmap_t pmap,
|
||||
}
|
||||
|
||||
/* We are asked to give the cpu by scheduler. */
|
||||
if (curthread->td_flags & (TDF_ASTPENDING | TDF_NEEDRESCHED)) {
|
||||
if (vcpu_should_yield(vm, vcpu)) {
|
||||
enable_gintr();
|
||||
vm_exit_astpending(vm, vcpu, state->rip);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user