Changeset 12105 in vbox for trunk/src/VBox/Runtime/r3/solaris
- Timestamp:
- Sep 4, 2008 7:46:14 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 36046
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/solaris/mp-solaris.cpp
r11719 r12105 224 224 225 225 226 RTDECL(bool) RTMpIsCpuPresent(RTCPUID idCpu) 227 { 228 return p_online() != -1; 229 } 230 231 226 232 RTDECL(RTCPUID) RTMpGetCount(void) 227 233 { … … 265 271 } 266 272 273 274 RTDECL(PRTCPUSET) RTMpGetPresentSet(PRTCPUSET pSet) 275 { 276 #ifdef RT_STRICT 277 long cCpusPresent = 0; 278 #endif 279 RTCpuSetEmpty(pSet); 280 RTCPUID cCpus = RTMpGetCount(); 281 for (RTCPUID idCpu = 0; idCpu < cCpus; idCpu++) 282 if (RTMpIsCpuPresent(idCpu)) 283 { 284 RTCpuSetAdd(pSet, idCpu); 285 #ifdef RT_STRICT 286 cCpusPresent++; 287 #endif 288 } 289 Assert(cCpusPresent == RTMpGetPresentCount()); 290 return pSet; 291 } 292 293 294 RTDECL(RTCPUID) RTMpGetPresentCount(void) 295 { 296 /* 297 * Solaris has sysconf. 298 */ 299 return sysconf(_SC_NPROCESSORS_CONF); 300 } 301
Note:
See TracChangeset
for help on using the changeset viewer.