VirtualBox

Changeset 90533 in vbox for trunk/src


Ignore:
Timestamp:
Aug 5, 2021 8:55:28 PM (4 years ago)
Author:
vboxsync
Message:

VMM/VMMGetCpu: Assert that we return the right one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/VMMAll.cpp

    r82968 r90533  
    249249    VMCPUID const cCpus = pVM->cCpus;
    250250    if (pVM->cCpus == 1)
    251         return VMCC_GET_CPU_0(pVM);
     251    {
     252        PVMCPUCC pVCpu = VMCC_GET_CPU_0(pVM);
     253        Assert(pVCpu->hNativeThreadR0 == RTThreadNativeSelf());
     254        return pVCpu;
     255    }
    252256
    253257    /*
     
    267271            PVMCPUCC pVCpu = VMCC_GET_CPU(pVM, idCpu);
    268272            if (pVCpu->idHostCpu == idHostCpu)
     273            {
     274                Assert(pVCpu->hNativeThreadR0 == RTThreadNativeSelf());
    269275                return pVCpu;
     276            }
    270277        }
    271278    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette