VirtualBox

Changeset 51940 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Jul 8, 2014 5:45:51 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94833
Message:

GMMR0: Switched from fast mutex to critical section for the giant GMMR0 lock to avoid running into unnecessary trouble with the windows driver verifier. Required making the critical section code compile and link in the ring-0 environment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/critsect.h

    r45151 r51940  
    108108 * might or might not require entering a critical section before access. */
    109109#define RTCRITSECT_FLAGS_NOP            UINT32_C(0x00000008)
     110/** Indicates that this is a ring-0 critical section. */
     111#define RTCRITSECT_FLAGS_RING0          UINT32_C(0x00000010)
    110112/** @} */
    111113
    112114
    113 #ifdef IN_RING3
     115#if defined(IN_RING3) || defined(IN_RING0)
    114116
    115117/**
     
    209211RTDECL(int) RTCritSectTryEnterDebug(PRTCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL);
    210212
     213#ifdef IN_RING3 /* Crazy APIs: ring-3 only. */
     214
    211215/**
    212216 * Enter multiple critical sections.
     
    248252RTDECL(int) RTCritSectEnterMultipleDebug(size_t cCritSects, PRTCRITSECT *papCritSects, RTUINTPTR uId, RT_SRC_POS_DECL);
    249253
     254#endif /* IN_RING3 */
     255
    250256/**
    251257 * Leave a critical section.
     
    285291}
    286292
    287 #endif /* IN_RING3 */
     293#endif /* IN_RING3 || IN_RING0 */
    288294
    289295/**
     
    455461/** @} */
    456462
    457 #ifdef IN_RING3
     463#if defined(IN_RING3) || defined(IN_RING0)
    458464
    459465/**
     
    701707RTDECL(uint32_t) RTCritSectRwGetReadCount(PRTCRITSECTRW pThis);
    702708
    703 #endif /* IN_RING3 */
     709#endif /* IN_RING3 || IN_RING0 */
    704710
    705711/**
Note: See TracChangeset for help on using the changeset viewer.

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