Changeset 11328 in vbox
- Timestamp:
- Aug 11, 2008 11:26:11 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 34448
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/solaris/mp-solaris.cpp
r11324 r11328 37 37 #include <errno.h> 38 38 #include <kstat.h> 39 #include <sys/processor.h> 39 40 40 41 #include <iprt/mp.h> … … 202 203 203 204 205 RTDECL(bool) RTMpIsCpuOnline(RTCPUID idCpu) 206 { 207 int iStatus = p_online(idCpu, P_STATUS); 208 return iStatus == P_ONLINE 209 || iStatus == P_NOINTR; 210 } 211 212 204 213 RTDECL(RTCPUID) RTMpGetOnlineCount(void) 205 214 { … … 213 222 RTDECL(PRTCPUSET) RTMpGetOnlineSet(PRTCPUSET pSet) 214 223 { 215 /** @todo fix this! */216 224 RTCpuSetEmpty(pSet); 217 RTCPUID cMax = RTMpGetOnlineCount(); 218 while (cMax-- > 0) 219 RTCpuSetAdd(pSet, cMax); 225 int cCpus = RTMpGetCount(); 226 for (RTCPUID idCpu = 0; idCpu < cCpus; idCpu++) 227 if (RTMpIsCpuOnline(idCpu)) 228 RTCpuSetAdd(pSet, cMax); 220 229 return pSet; 221 230 }
Note:
See TracChangeset
for help on using the changeset viewer.