VirtualBox

Changeset 19652 in vbox for trunk


Ignore:
Timestamp:
May 13, 2009 11:50:14 AM (16 years ago)
Author:
vboxsync
Message:

Added GVMMR0SchedPokeEx & GVMMR0SchedWakeUpEx

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/gvmm.h

    r19454 r19652  
    146146GVMMR0DECL(int)     GVMMR0SchedHalt(PVM pVM, VMCPUID idCpu, uint64_t u64ExpireGipTime);
    147147GVMMR0DECL(int)     GVMMR0SchedWakeUp(PVM pVM, VMCPUID idCpu);
     148GVMMR0DECL(int)     GVMMR0SchedWakeUpEx(PVM pVM, VMCPUID idCpu, bool fTakeUsedLock);
    148149GVMMR0DECL(int)     GVMMR0SchedPoke(PVM pVM, VMCPUID idCpu);
     150GVMMR0DECL(int)     GVMMR0SchedPokeEx(PVM pVM, VMCPUID idCpu, bool fTakeUsedLock);
    149151GVMMR0DECL(int)     GVMMR0SchedWakeUpAndPokeCpus(PVM pVM, PCVMCPUSET pSleepSet, PCVMCPUSET pPokeSet);
    150152GVMMR0DECL(int)     GVMMR0SchedPoll(PVM pVM, VMCPUID idCpu, bool fYield);
  • trunk/src/VBox/VMM/VMMR0/GVMMR0.cpp

    r19454 r19652  
    16181618 * @param   pVM                 Pointer to the shared VM structure.
    16191619 * @param   idCpu               The Virtual CPU ID of the EMT to wake up.
     1620 * @param   fTakeUsedLock       Take the used lock or not
    16201621 * @thread  Any but EMT.
    16211622 */
    1622 GVMMR0DECL(int) GVMMR0SchedWakeUp(PVM pVM, VMCPUID idCpu)
     1623GVMMR0DECL(int) GVMMR0SchedWakeUpEx(PVM pVM, VMCPUID idCpu, bool fTakeUsedLock)
    16231624{
    16241625    /*
     
    16271628    PGVM pGVM;
    16281629    PGVMM pGVMM;
    1629     int rc = gvmmR0ByVM(pVM, &pGVM, &pGVMM, true /* fTakeUsedLock */);
     1630    int rc = gvmmR0ByVM(pVM, &pGVM, &pGVMM, fTakeUsedLock);
    16301631    if (RT_SUCCESS(rc))
    16311632    {
     
    16551656}
    16561657
     1658/**
     1659 * Wakes up the halted EMT thread so it can service a pending request.
     1660 *
     1661 * @returns VBox status code.
     1662 * @retval  VINF_SUCCESS if successfully woken up.
     1663 * @retval  VINF_GVM_NOT_BLOCKED if the EMT wasn't blocked.
     1664 *
     1665 * @param   pVM                 Pointer to the shared VM structure.
     1666 * @param   idCpu               The Virtual CPU ID of the EMT to wake up.
     1667 * @thread  Any but EMT.
     1668 */
     1669GVMMR0DECL(int) GVMMR0SchedWakeUp(PVM pVM, VMCPUID idCpu)
     1670{
     1671    return GVMMR0SchedWakeUpEx(pVM, idCpu, true /* fTakeUsedLock */);
     1672}
    16571673
    16581674/**
     
    16831699}
    16841700
    1685 
    16861701/**
    16871702 * Pokes an EMT if it's still busy running guest code.
     
    16931708 * @param   pVM                 Pointer to the shared VM structure.
    16941709 * @param   idCpu               The ID of the virtual CPU to poke.
    1695  */
    1696 GVMMR0DECL(int) GVMMR0SchedPoke(PVM pVM, VMCPUID idCpu)
     1710 * @param   fTakeUsedLock       Take the used lock or not
     1711 */
     1712GVMMR0DECL(int) GVMMR0SchedPokeEx(PVM pVM, VMCPUID idCpu, bool fTakeUsedLock)
    16971713{
    16981714    /*
     
    17011717    PGVM pGVM;
    17021718    PGVMM pGVMM;
    1703     int rc = gvmmR0ByVM(pVM, &pGVM, &pGVMM, true /* fTakeUsedLock */);
     1719    int rc = gvmmR0ByVM(pVM, &pGVM, &pGVMM, fTakeUsedLock);
    17041720    if (RT_SUCCESS(rc))
    17051721    {
     
    17151731    LogFlow(("GVMMR0SchedWakeUpAndPokeCpus: returns %Rrc\n", rc));
    17161732    return rc;
    1717 
     1733}
     1734
     1735
     1736/**
     1737 * Pokes an EMT if it's still busy running guest code.
     1738 *
     1739 * @returns VBox status code.
     1740 * @retval  VINF_SUCCESS if poked successfully.
     1741 * @retval  VINF_GVM_NOT_BUSY_IN_GC if the EMT wasn't busy in GC.
     1742 *
     1743 * @param   pVM                 Pointer to the shared VM structure.
     1744 * @param   idCpu               The ID of the virtual CPU to poke.
     1745 */
     1746GVMMR0DECL(int) GVMMR0SchedPoke(PVM pVM, VMCPUID idCpu)
     1747{
     1748    return GVMMR0SchedPokeEx(pVM, idCpu, true /* fTakeUsedLock */);
    17181749}
    17191750
  • trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp

    r19651 r19652  
    445445        {
    446446        case VMCPUSTATE_STARTED_EXEC:
    447             GVMMR0SchedPoke(pVM, pVCpu->idCpu);
     447            GVMMR0SchedPokeEx(pVM, pVCpu->idCpu, false /* don't take the used lock */);
    448448            break;
    449449
    450450        case VMCPUSTATE_STARTED_HALTED:
    451             GVMMR0SchedWakeUp(pVM, pVCpu->idCpu);
     451            GVMMR0SchedWakeUpEx(pVM, pVCpu->idCpu, false /* don't take the used lock */);
    452452            break;
    453453        }
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