Changeset 8677 in vbox
- Timestamp:
- May 7, 2008 6:13:32 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30610
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmcritsect.h
r8155 r8677 74 74 75 75 /** 76 * Leaves a critical section entered with PDMCritSectEnter().76 * Enters a PDM critical section. 77 77 * 78 78 * @returns VINF_SUCCESS if entered successfully. … … 85 85 */ 86 86 PDMDECL(int) PDMCritSectEnter(PPDMCRITSECT pCritSect, int rcBusy); 87 88 /** 89 * Enters a PDM critical section. 90 * 91 * @returns VINF_SUCCESS if entered successfully. 92 * @returns rcBusy when encountering a busy critical section in GC/R0. 93 * @returns VERR_SEM_DESTROYED if the critical section is dead. 94 * 95 * @param pCritSect The PDM critical section to enter. 96 * @param fCallHost Whether this is a VMMGCCallHost() or VMMR0CallHost() request. 97 */ 98 PDMR3DECL(int) PDMR3CritSectEnterEx(PPDMCRITSECT pCritSect, bool fCallHost); 87 99 88 100 /** -
trunk/src/VBox/VMM/PDM.cpp
r8155 r8677 1182 1182 1183 1183 /** 1184 * Ser ivce a VMMCALLHOST_PDM_LOCK call.1184 * Service a VMMCALLHOST_PDM_LOCK call. 1185 1185 * 1186 1186 * @returns VBox status code. … … 1189 1189 PDMR3DECL(int) PDMR3LockCall(PVM pVM) 1190 1190 { 1191 return pdmLockEx(pVM, VERR_INTERNAL_ERROR); 1192 } 1193 1191 #ifdef VBOX_WITH_PDM_LOCK 1192 return PDMR3CritSectEnterEx(&pVM->pdm.s.CritSect, true /* fHostCall */); 1193 #else 1194 return VINF_SUCCESS; 1195 #endif 1196 } 1197 -
trunk/src/VBox/VMM/PGM.cpp
r8624 r8677 2313 2313 PDMR3DECL(int) PGMR3LockCall(PVM pVM) 2314 2314 { 2315 return pgmLock(pVM); 2315 int rc = PDMR3CritSectEnterEx(&pVM->pgm.s.CritSect, true /* fHostCall */); 2316 AssertRC(rc); 2317 return rc; 2316 2318 } 2317 2319 -
trunk/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp
r8155 r8677 36 36 #ifdef IN_RING3 37 37 # include <iprt/semaphore.h> 38 #endif 39 40 41 /** 42 * Leaves a critical section entered with PDMCritSectEnter().38 #endif 39 40 41 /** 42 * Enters a PDM critical section. 43 43 * 44 44 * @returns VINF_SUCCESS if entered successfully. … … 96 96 #endif 97 97 } 98 99 100 #ifdef IN_RING3 101 /** 102 * Enters a PDM critical section. 103 * 104 * @returns VINF_SUCCESS if entered successfully. 105 * @returns rcBusy when encountering a busy critical section in GC/R0. 106 * @returns VERR_SEM_DESTROYED if the critical section is dead. 107 * 108 * @param pCritSect The PDM critical section to enter. 109 * @param fCallHost Whether this is a VMMGCCallHost() or VMMR0CallHost() request. 110 */ 111 PDMR3DECL(int) PDMR3CritSectEnterEx(PPDMCRITSECT pCritSect, bool fCallHost) 112 { 113 int rc = PDMCritSectEnter(pCritSect, VERR_INTERNAL_ERROR); 114 if ( rc == VINF_SUCCESS 115 && fCallHost 116 && pCritSect->s.Core.Strict.ThreadOwner != NIL_RTTHREAD) 117 { 118 RTThreadWriteLockDec(pCritSect->s.Core.Strict.ThreadOwner); 119 ASMAtomicUoWriteSize(&pCritSect->s.Core.Strict.ThreadOwner, NIL_RTTHREAD); 120 } 121 return rc; 122 } 123 #endif /* IN_RING3 */ 98 124 99 125
Note:
See TracChangeset
for help on using the changeset viewer.