Changeset 9429 in vbox for trunk/src/VBox/Runtime/r0drv/nt
- Timestamp:
- Jun 5, 2008 3:22:37 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 31680
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp
r8840 r9429 95 95 return false; 96 96 97 /** @todo this must be done at init time as it's not safe under all circumstances (braindead OS design). */ 97 98 KAFFINITY Mask = KeQueryActiveProcessors(); 98 99 return !!(Mask & RT_BIT_64(idCpu)); … … 100 101 101 102 102 RTDECL(bool) RTMp DoesCpuExist(RTCPUID idCpu)103 RTDECL(bool) RTMpIsCpuPresent(RTCPUID idCpu) 103 104 { 104 105 /* Cannot easily distinguish between online and offline cpus. */ 106 /** @todo online/present cpu stuff must be corrected for proper W2K8 support. */ 105 107 return RTMpIsCpuOnline(idCpu); 106 108 } … … 109 111 RTDECL(PRTCPUSET) RTMpGetSet(PRTCPUSET pSet) 110 112 { 113 /** @todo online/present cpu stuff must be corrected for proper W2K8 support. */ 111 114 return RTMpGetOnlineSet(pSet); 112 115 } … … 115 118 RTDECL(RTCPUID) RTMpGetCount(void) 116 119 { 120 /** @todo online/present cpu stuff must be corrected for proper W2K8 support. */ 117 121 return RTMpGetOnlineCount(); 118 122 } … … 167 171 #if 0 168 172 /* KeFlushQueuedDpcs must be run at IRQL PASSIVE_LEVEL according to MSDN, but the 169 * driver verifier doesn't complain... 173 * driver verifier doesn't complain... 170 174 */ 171 175 AssertMsg(KeGetCurrentIrql() == PASSIVE_LEVEL, ("%d != %d (PASSIVE_LEVEL)\n", KeGetCurrentIrql(), PASSIVE_LEVEL)); … … 173 177 174 178 KAFFINITY Mask = KeQueryActiveProcessors(); 175 176 if ( enmCpuid == RT_NT_CPUID_SPECIFIC177 && ( idCpu >= 64178 || !(Mask & RT_BIT_64(idCpu))))179 return VERR_CPU_NOT_FOUND; /* can't distinguish between cpu not present or offline */180 179 181 180 /* KeFlushQueuedDpcs is not present in Windows 2000; import it dynamically so we can just fail this call. */ … … 244 243 } 245 244 if (enmCpuid != RT_NT_CPUID_OTHERS) 246 {247 245 pfnWorker(iSelf, pvUser1, pvUser2); 248 }249 246 } 250 247 … … 270 267 RTDECL(int) RTMpOnSpecific(RTCPUID idCpu, PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2) 271 268 { 269 if (RTMpIsCpuOnline(idCpu); 270 return !RTMpIsCpuPossible(idCpu) ? VERR_CPU_NOT_FOUND : VERR_CPU_OFFLINE; 271 272 272 return rtMpCall(pfnWorker, pvUser1, pvUser2, RT_NT_CPUID_SPECIFIC, idCpu); 273 273 }
Note:
See TracChangeset
for help on using the changeset viewer.