Changeset 37062 in vbox for trunk/src/VBox/Runtime/r0drv/solaris
- Timestamp:
- May 13, 2011 10:18:29 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 71699
- Location:
- trunk/src/VBox/Runtime/r0drv/solaris/vbi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/vbi/mp-r0drv-solaris.c
r36232 r37062 174 174 PRTMPARGS pArgs = (PRTMPARGS)(uArg); 175 175 176 /* 177 * Solaris CPU cross calls execute on offline CPUs too. Check our CPU cache 178 * set and ignore if it's offline. 179 */ 180 if (!RTMpIsCpuOnline(RTMpCpuId())) 181 return 0; 182 176 183 pArgs->pfnWorker(RTMpCpuId(), pArgs->pvUser1, pArgs->pvUser2); 177 184 … … 279 286 return VERR_CPU_NOT_FOUND; 280 287 288 if (RT_UNLIKELY(!RTMpIsCpuOnline(idCpu))) 289 return RTMpIsCpuPresent(idCpu) ? VERR_CPU_OFFLINE : VERR_CPU_NOT_FOUND; 290 281 291 Args.pfnWorker = pfnWorker; 282 292 Args.pvUser1 = pvUser1; -
trunk/src/VBox/Runtime/r0drv/solaris/vbi/mpnotification-r0drv-solaris.c
r36555 r37062 34 34 #include <iprt/mp.h> 35 35 #include <iprt/cpuset.h> 36 #include <iprt/string.h> 36 37 #include "r0drv/mp-r0drv.h" 37 38 … … 49 50 50 51 51 static void rtMpNotificationSolaris Callback(void *pvUser, int iCpu, int online)52 static void rtMpNotificationSolarisOnCurrentCpu(void *pvArgs, void *uIgnored1, void *uIgnored2) 52 53 { 53 NOREF(pvUser); 54 NOREF(uIgnored1); 55 NOREF(uIgnored2); 54 56 55 /* ASSUMES iCpu == RTCPUID */ 57 PRTMPARGS pArgs = (PRTMPARGS)(pvArgs); 58 AssertRelease(pArgs && pArgs->idCpu == RTMpCpuId()); 59 Assert(pArgs->pvUser2); 60 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); 61 62 int online = *(int *)pArgs->pvUser2; 56 63 if (online) 57 64 { 58 RTCpuSetAdd(&g_rtMpSolarisCpuSet, iCpu);59 rtMpNotificationDoCallbacks(RTMPEVENT_ONLINE, iCpu);65 RTCpuSetAdd(&g_rtMpSolarisCpuSet, pArgs->idCpu); 66 rtMpNotificationDoCallbacks(RTMPEVENT_ONLINE, pArgs->idCpu); 60 67 } 61 68 else 62 69 { 63 RTCpuSetDel(&g_rtMpSolarisCpuSet, iCpu);64 rtMpNotificationDoCallbacks(RTMPEVENT_OFFLINE, iCpu);70 RTCpuSetDel(&g_rtMpSolarisCpuSet, pArgs->idCpu); 71 rtMpNotificationDoCallbacks(RTMPEVENT_OFFLINE, pArgs->idCpu); 65 72 } 73 } 74 75 76 static void rtMpNotificationSolarisCallback(void *pvUser, int iCpu, int online) 77 { 78 vbi_preempt_disable(); 79 80 RTMPARGS Args; 81 RT_ZERO(Args); 82 Args.pvUser1 = pvUser; 83 Args.pvUser2 = &online; 84 Args.idCpu = iCpu; 85 86 /* 87 * If we're not on the target CPU, schedule (synchronous) the event notification callback 88 * to run on the target CPU i.e. the one pertaining to the MP event. 89 */ 90 bool fRunningOnTargetCpu = iCpu == RTMpCpuId(); /* ASSUMES iCpu == RTCPUID */ 91 if (fRunningOnTargetCpu) 92 rtMpNotificationSolarisOnCurrentCpu(&Args, NULL /* pvIgnored1 */, NULL /* pvIgnored2 */); 93 else 94 vbi_execute_on_one(rtMpNotificationSolarisOnCurrentCpu, &Args, iCpu); 95 96 vbi_preempt_enable(); 66 97 } 67 98
Note:
See TracChangeset
for help on using the changeset viewer.