Changeset 19262 in vbox for trunk/src/VBox
- Timestamp:
- Apr 29, 2009 1:00:14 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp
r19260 r19262 228 228 } 229 229 230 /** 231 * Checks the specified VCPU is the owner of the critical section. 232 * 233 * @returns true if owner. 234 * @returns false if not owner. 235 * @param pCritSect The critical section. 236 * @param idCpu VCPU id 237 */ 238 VMMDECL(bool) PDMCritSectIsOwnerEx(PCPDMCRITSECT pCritSect, VMCPUID idCpu) 239 { 240 #ifdef IN_RING3 241 NOREF(idCpu); 242 return RTCritSectIsOwner(&pCritSect->s.Core); 243 #else 244 PVM pVM = pCritSect->s.CTX_SUFF(pVM); 245 Assert(pVM); 246 Assert(idCpu < pVM->cCPUs); 247 return pCritSect->s.Core.NativeThreadOwner == pVM->aCpus[idCpu].hNativeThread; 248 #endif 249 } 250 230 251 231 252 /** -
trunk/src/VBox/VMM/VMMR0/PGMR0.cpp
r18992 r19262 59 59 * 60 60 * @param pVM The VM handle. 61 * @param pVCpu The VMCPU handle. 61 62 * 62 63 * @remarks Must be called from within the PGM critical section. The caller 63 64 * must clear the new pages. 64 65 */ 65 VMMR0DECL(int) PGMR0PhysAllocateHandyPages(PVM pVM )66 VMMR0DECL(int) PGMR0PhysAllocateHandyPages(PVM pVM, PVMCPU pVCpu) 66 67 { 67 Assert(PDMCritSectIsOwner (&pVM->pgm.s.CritSect));68 Assert(PDMCritSectIsOwnerEx(&pVM->pgm.s.CritSect, pVCpu->idCpu)); 68 69 69 70 /* -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r19257 r19262 720 720 return VERR_INVALID_POINTER; 721 721 } 722 723 if (RT_UNLIKELY(idCpu >= pVM->cCPUs)) 724 { 725 SUPR0Printf("vmmR0EntryExWorker: Invalid idCpu (%d vs cCPUs=%d\n", idCpu, pVM->cCPUs); 726 return VERR_INVALID_PARAMETER; 727 } 722 728 } 723 729 … … 831 837 */ 832 838 case VMMR0_DO_PGM_ALLOCATE_HANDY_PAGES: 833 return PGMR0PhysAllocateHandyPages(pVM );839 return PGMR0PhysAllocateHandyPages(pVM, &pVM->aCpus[idCpu]); 834 840 835 841 /*
Note:
See TracChangeset
for help on using the changeset viewer.