Changeset 11329 in vbox for trunk/src/VBox/Runtime/r3/solaris
- Timestamp:
- Aug 11, 2008 11:34:44 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/solaris/mp-solaris.cpp
r11328 r11329 191 191 192 192 193 RTDECL(int) RTMpCpuIdToSetIndex(RTCPUID idCpu) 194 { 195 return idCpu < RTCPUSET_MAX_CPUS ? idCpu : -1; 196 } 197 198 199 RTDECL(RTCPUID) RTMpCpuIdFromSetIndex(int iCpu) 200 { 201 return (unsigned)iCpu < RTCPUSET_MAX_CPUS ? iCpu : NIL_RTCPUID; 202 } 203 204 205 RTDECL(RTCPUID) RTMpGetMaxCpuId(void) 206 { 207 return RTMpGetCount() - 1; 208 } 209 210 211 RTDECL(bool) RTMpIsCpuPossible(RTCPUID idCpu) 212 { 213 return idCpu != NIL_RTCPUID 214 && idCpu < (RTCPUID)RTMpGetCount(); 215 } 216 217 218 RTDECL(bool) RTMpIsCpuOnline(RTCPUID idCpu) 219 { 220 int iStatus = p_online(idCpu, P_STATUS); 221 return iStatus == P_ONLINE 222 || iStatus == P_NOINTR; 223 } 224 225 193 226 RTDECL(RTCPUID) RTMpGetCount(void) 194 227 { … … 203 236 204 237 205 RTDECL(bool) RTMpIsCpuOnline(RTCPUID idCpu) 206 { 207 int iStatus = p_online(idCpu, P_STATUS); 208 return iStatus == P_ONLINE 209 || iStatus == P_NOINTR; 238 RTDECL(PRTCPUSET) RTMpGetSet(PRTCPUSET pSet) 239 { 240 RTCpuSetEmpty(pSet); 241 int cCpus = RTMpGetCount() 242 while (cCpus-- > 0) 243 RTCpuSetAdd(pSet, idCpu); 244 return pSet; 210 245 } 211 246
Note:
See TracChangeset
for help on using the changeset viewer.