Changeset 37426 in vbox for trunk/src/VBox/VMM/include/IOMInline.h
- Timestamp:
- Jun 12, 2011 7:35:28 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IOMInline.h
r37425 r37426 35 35 DECLINLINE(CTX_SUFF(PIOMIOPORTRANGE)) iomIOPortGetRange(PVM pVM, RTIOPORT Port) 36 36 { 37 #ifdef IN_RING3 38 if (PDMCritSectIsInitialized(&pVM->iom.s.EmtLock)) 39 #endif 40 Assert(PDMCritSectIsOwner(&pVM->iom.s.EmtLock)); 37 Assert(PDMCritSectIsOwner(&pVM->iom.s.EmtLock) || !PDMCritSectIsInitialized(&pVM->iom.s.EmtLock)); 41 38 return (CTX_SUFF(PIOMIOPORTRANGE))RTAvlroIOPortRangeGet(&pVM->iom.s.CTX_SUFF(pTrees)->CTX_SUFF(IOPortTree), Port); 42 39 } … … 54 51 DECLINLINE(PIOMIOPORTRANGER3) iomIOPortGetRangeR3(PVM pVM, RTIOPORT Port) 55 52 { 56 #ifdef IN_RING3 57 if (PDMCritSectIsInitialized(&pVM->iom.s.EmtLock)) /** @todo Move the call into the assertion since the compiler cannot optimize it away in non-strict builds. */ 58 #endif 59 Assert(PDMCritSectIsOwner(&pVM->iom.s.EmtLock)); 53 Assert(PDMCritSectIsOwner(&pVM->iom.s.EmtLock) || !PDMCritSectIsInitialized(&pVM->iom.s.EmtLock)); 60 54 return (PIOMIOPORTRANGER3)RTAvlroIOPortRangeGet(&pVM->iom.s.CTX_SUFF(pTrees)->IOPortTreeR3, Port); 61 55 } … … 73 67 DECLINLINE(PIOMMMIORANGE) iomMMIOGetRange(PVM pVM, RTGCPHYS GCPhys) 74 68 { 75 #ifdef IN_RING3 76 if (PDMCritSectIsInitialized(&pVM->iom.s.EmtLock)) 77 #endif 78 Assert(PDMCritSectIsOwner(&pVM->iom.s.EmtLock)); 69 Assert(PDMCritSectIsOwner(&pVM->iom.s.EmtLock) || !PDMCritSectIsInitialized(&pVM->iom.s.EmtLock)); 79 70 PIOMMMIORANGE pRange = pVM->iom.s.CTX_SUFF(pMMIORangeLast); 80 71 if ( !pRange … … 125 116 { 126 117 Assert(PDMCritSectIsOwner(&pVM->iom.s.EmtLock)); 118 127 119 /* For large ranges, we'll put everything on the first byte. */ 128 120 if (pRange->cb > PAGE_SIZE)
Note:
See TracChangeset
for help on using the changeset viewer.