VirtualBox

Ignore:
Timestamp:
Aug 11, 2008 11:34:44 AM (16 years ago)
Author:
vboxsync
Message:

iprt/mp-solaris: Filled in more missing bits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/solaris/mp-solaris.cpp

    r11328 r11329  
    191191
    192192
     193RTDECL(int) RTMpCpuIdToSetIndex(RTCPUID idCpu)
     194{
     195    return idCpu < RTCPUSET_MAX_CPUS ? idCpu : -1;
     196}
     197
     198
     199RTDECL(RTCPUID) RTMpCpuIdFromSetIndex(int iCpu)
     200{
     201    return (unsigned)iCpu < RTCPUSET_MAX_CPUS ? iCpu : NIL_RTCPUID;
     202}
     203
     204
     205RTDECL(RTCPUID) RTMpGetMaxCpuId(void)
     206{
     207    return RTMpGetCount() - 1;
     208}
     209
     210
     211RTDECL(bool) RTMpIsCpuPossible(RTCPUID idCpu)
     212{
     213    return idCpu != NIL_RTCPUID
     214        && idCpu < (RTCPUID)RTMpGetCount();
     215}
     216
     217
     218RTDECL(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
    193226RTDECL(RTCPUID) RTMpGetCount(void)
    194227{
     
    203236
    204237
    205 RTDECL(bool) RTMpIsCpuOnline(RTCPUID idCpu)
    206 {
    207     int iStatus = p_online(idCpu, P_STATUS);
    208     return iStatus == P_ONLINE
    209         || iStatus == P_NOINTR;
     238RTDECL(PRTCPUSET) RTMpGetSet(PRTCPUSET pSet)
     239{
     240    RTCpuSetEmpty(pSet);
     241    int cCpus = RTMpGetCount()
     242    while (cCpus-- > 0)
     243        RTCpuSetAdd(pSet, idCpu);
     244    return pSet;
    210245}
    211246
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette