mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
Prefer 'vcpu_should_yield()' over checking 'curthread->td_flags' directly.
MFC after: 1 week
This commit is contained in:
parent
77afcadd51
commit
7c0b0b9ad3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281612
|
@ -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…
Reference in a new issue