VirtualBox

Changeset 19471 in vbox


Ignore:
Timestamp:
May 7, 2009 9:07:28 AM (16 years ago)
Author:
vboxsync
Message:

Added PGMIsLocked & PDMCritSectIsLocked

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

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

    r19439 r19471  
    304304}
    305305
     306/**
     307 * Checks if somebody currently owns the critical section.
     308 * Note: This doesn't prove that no deadlocks will occur later on; it's just a debugging tool
     309 *
     310 * @returns true if locked.
     311 * @returns false if not locked.
     312 * @param   pCritSect   The critical section.
     313 */
     314VMMDECL(bool) PDMCritSectIsLocked(PCPDMCRITSECT pCritSect)
     315{
     316    return pCritSect->s.Core.NativeThreadOwner != NIL_RTNATIVETHREAD;
     317}
    306318
    307319/**
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r19329 r19471  
    20202020
    20212021/**
     2022 * Check if the PGM lock is currently taken.
     2023 *
     2024 * @returns bool locked/not locked
     2025 * @param   pVM         The VM to operate on.
     2026 */
     2027VMMDECL(bool) PGMIsLocked(PVM pVM)
     2028{
     2029    return PDMCritSectIsLocked(&pVM->pgm.s.CritSect);
     2030}
     2031
     2032/**
    20222033 * Acquire the PGM lock.
    20232034 *
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