VirtualBox

Changeset 25368 in vbox for trunk/src/VBox/Runtime/include


Ignore:
Timestamp:
Dec 14, 2009 4:31:40 PM (15 years ago)
Author:
vboxsync
Message:

RTCritSect,PDMCritSect,iprt/lockvalidator.h: Reworked the deadlocking detection for critical sections and preparing for lock order validation. This change generalizes the RTCRITSECT::Strict data and moves it out of the RTCRITSECT, leaving a pointer behind. This saves a bit of space in release builds.

Location:
trunk/src/VBox/Runtime/include/internal
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/include/internal/magics.h

    r25059 r25368  
    6767/** The magic value for RTLOCALIPCSERVER::u32Magic. (Katsuhiro Otomo) */
    6868#define RTLOCALIPCSESSION_MAGIC     0x19530414
     69/** The magic value for RTLOCKVALIDATORREC::u32Magic. (Vladimir Vladimirovich Nabokov) */
     70#define RTLOCKVALIDATORREC_MAGIC    0x18990422
     71/** The dead magic value for RTLOCKVALIDATORREC::u32Magic. */
     72#define RTLOCKVALIDATORREC_MAGIC_DEAD 0x19770702
    6973/** Magic number for RTMEMCACHEINT::u32Magic. (Joseph Weizenbaum) */
    7074#define RTMEMCACHE_MAGIC            0x19230108
  • trunk/src/VBox/Runtime/include/internal/thread.h

    r23124 r25368  
    9393    union RTTHREADINTBLOCKID
    9494    {
     95        PRTLOCKVALIDATORREC pRec;
    9596        uint64_t            u64;
    96         PRTCRITSECT         pCritSect;
    97         RTSEMEVENT          Event;
    98         RTSEMEVENTMULTI     EventMulti;
    99         RTSEMMUTEX          Mutex;
    10097    } Block;
    10198    /** Where we're blocking. */
     99    const char volatile    *pszBlockFunction;
     100    /** Where we're blocking. */
    102101    const char volatile    *pszBlockFile;
    103102    /** Where we're blocking. */
    104     unsigned volatile       uBlockLine;
    105     /** Where we're blocking. */
    106     RTUINTPTR volatile      uBlockId;
     103    uint32_t volatile       uBlockLine;
     104    /** Where we're blocking. */
     105    RTHCUINTPTR volatile    uBlockId;
    107106    /** Number of registered write locks, mutexes and critsects that this thread owns. */
    108107    int32_t volatile        cWriteLocks;
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