Changeset 22439 in vbox
- Timestamp:
- Aug 25, 2009 2:42:08 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 51435
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/vbi/mpnotification-r0drv-solaris.c
r22366 r22439 44 44 * Global Variables * 45 45 *******************************************************************************/ 46 /** CPU watch callback handle. */ 46 47 static vbi_cpu_watch_t *g_hVbiCpuWatch = NULL; 48 /** Set of online cpus that is maintained by the MP callback. 49 * This avoids locking issues quering the set from the kernel as well as 50 * eliminating any uncertainty regarding the online status during the 51 * callback. */ 52 RTCPUSET g_rtMpSolarisCpuSet; 47 53 48 RTCPUSET g_rtMpSolarisCpuSet;49 54 50 55 static void rtMpNotificationSolarisCallback(void *pvUser, int iCpu, int online) … … 74 79 75 80 /* 76 * Cache the list of online CPUs. 81 * Register the callback building the online cpu set as we 82 * do so (current_too = 1). 77 83 */ 78 84 RTCpuSetEmpty(&g_rtMpSolarisCpuSet); 79 80 g_hVbiCpuWatch = vbi_watch_cpus(rtMpNotificationSolarisCallback, NULL, 1 /* watch current CPU too */); 81 82 RTCPUID idCpu = RTMpGetMaxCpuId(); 83 do 84 { 85 /** @todo vbi_cpu_online() should boundary check "idCpu" rather than hang the system. */ 86 if ( RTMpIsCpuPossible(idCpu) 87 && vbi_cpu_online(idCpu)) 88 { 89 RTCpuSetAdd(&g_rtMpSolarisCpuSet, idCpu); 90 } 91 } while (idCpu-- > 0); 85 g_hVbiCpuWatch = vbi_watch_cpus(rtMpNotificationSolarisCallback, NULL, 1 /*current_too*/); 92 86 93 87 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.