Changeset 37467 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Jun 15, 2011 1:08:45 PM (13 years ago)
- Location:
- trunk/src/VBox/VMM/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IOMInline.h
r37452 r37467 35 35 DECLINLINE(CTX_SUFF(PIOMIOPORTRANGE)) iomIOPortGetRange(PVM pVM, RTIOPORT Port) 36 36 { 37 Assert(PDMCritSectIsOwner(&pVM->iom.s. EmtLock) || !PDMCritSectIsInitialized(&pVM->iom.s.EmtLock));37 Assert(PDMCritSectIsOwner(&pVM->iom.s.CritSect)); 38 38 return (CTX_SUFF(PIOMIOPORTRANGE))RTAvlroIOPortRangeGet(&pVM->iom.s.CTX_SUFF(pTrees)->CTX_SUFF(IOPortTree), Port); 39 39 } … … 51 51 DECLINLINE(PIOMIOPORTRANGER3) iomIOPortGetRangeR3(PVM pVM, RTIOPORT Port) 52 52 { 53 Assert(PDMCritSectIsOwner(&pVM->iom.s. EmtLock) || !PDMCritSectIsInitialized(&pVM->iom.s.EmtLock));53 Assert(PDMCritSectIsOwner(&pVM->iom.s.CritSect)); 54 54 return (PIOMIOPORTRANGER3)RTAvlroIOPortRangeGet(&pVM->iom.s.CTX_SUFF(pTrees)->IOPortTreeR3, Port); 55 55 } … … 67 67 DECLINLINE(PIOMMMIORANGE) iomMmioGetRange(PVM pVM, RTGCPHYS GCPhys) 68 68 { 69 Assert(PDMCritSectIsOwner(&pVM->iom.s. EmtLock));69 Assert(PDMCritSectIsOwner(&pVM->iom.s.CritSect)); 70 70 PIOMMMIORANGE pRange = pVM->iom.s.CTX_SUFF(pMMIORangeLast); 71 71 if ( !pRange … … 101 101 DECLINLINE(PIOMMMIORANGE) iomMmioGetRangeWithRef(PVM pVM, RTGCPHYS GCPhys) 102 102 { 103 int rc = PDMCritSectEnter(&pVM->iom.s. EmtLock, VINF_SUCCESS);103 int rc = PDMCritSectEnter(&pVM->iom.s.CritSect, VINF_SUCCESS); 104 104 AssertRCReturn(rc, NULL); 105 105 … … 112 112 iomMmioRetainRange(pRange); 113 113 114 PDMCritSectLeave(&pVM->iom.s. EmtLock);114 PDMCritSectLeave(&pVM->iom.s.CritSect); 115 115 return pRange; 116 116 } … … 169 169 DECLINLINE(PIOMMMIOSTATS) iomMmioGetStats(PVM pVM, RTGCPHYS GCPhys, PIOMMMIORANGE pRange) 170 170 { 171 PDMCritSectEnter(&pVM->iom.s. EmtLock, VINF_SUCCESS);171 PDMCritSectEnter(&pVM->iom.s.CritSect, VINF_SUCCESS); 172 172 173 173 /* For large ranges, we'll put everything on the first byte. */ … … 186 186 } 187 187 188 PDMCritSectLeave(&pVM->iom.s. EmtLock);188 PDMCritSectLeave(&pVM->iom.s.CritSect); 189 189 return pStats; 190 190 } -
trunk/src/VBox/VMM/include/IOMInternal.h
r37452 r37467 323 323 324 324 /** Lock serializing EMT access to IOM. */ 325 PDMCRITSECT EmtLock;325 PDMCRITSECT CritSect; 326 326 327 327 /** @name Caching of I/O Port and MMIO ranges and statistics. … … 433 433 434 434 /* IOM locking helpers. */ 435 int iomLock(PVM pVM); 436 int iomTryLock(PVM pVM); 437 void iomUnlock(PVM pVM); 435 #define IOM_LOCK(a_pVM) PDMCritSectEnter(&(a_pVM)->iom.s.CritSect, VERR_SEM_BUSY) 436 #define IOM_UNLOCK(a_pVM) do { PDMCritSectLeave(&(a_pVM)->iom.s.CritSect); } while (0) 437 438 438 439 439 /* Disassembly helpers used in IOMAll.cpp & IOMAllMMIO.cpp */
Note:
See TracChangeset
for help on using the changeset viewer.