- Timestamp:
- May 12, 2009 8:50:33 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp
r19593 r19596 277 277 return RTCritSectIsOwner(&pCritSect->s.Core); 278 278 #else 279 PVM pVM = pCritSect->s.CTX_SUFF(pVM); 280 Assert(pVM); Assert(VMMGetCpu(pVM)); 281 return pCritSect->s.Core.NativeThreadOwner == VMMGetCpu(pVM)->hNativeThread; 279 PVM pVM = pCritSect->s.CTX_SUFF(pVM); 280 PVMCPU pVCpu = VMMGetCpu(pVM); 281 Assert(pVM); Assert(pVCpu); 282 if (pCritSect->s.Core.NativeThreadOwner != pVCpu->hNativeThread) 283 return false; 284 285 /* Make sure the critical section is not scheduled to be unlocked. */ 286 if (!VMCPU_FF_ISSET(pVCpu, VMCPU_FF_PDM_CRITSECT)) 287 return true; 288 289 for (unsigned i = 0; i < pVCpu->pdm.s.cQueuedCritSectLeaves; i++) 290 { 291 if (pVCpu->pdm.s.apQueuedCritSectsLeaves[i] == MMHyperCCToR3(pVM, (void *)pCritSect)) 292 return false; /* scheduled for release; pretend it's not owned by us. */ 293 } 294 return true; 282 295 #endif 283 296 }
Note:
See TracChangeset
for help on using the changeset viewer.