VirtualBox

Changeset 11272 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 8, 2008 5:03:34 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
34356
Message:

RTMpGetCount/solaris: Prefer _SC_NPROCESSORS_MAX over _SC_NPROCESSORS_CONF.

File:
1 edited

Legend:

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

    r11256 r11272  
    189189}
    190190
     191
    191192RTDECL(RTCPUID) RTMpGetCount(void)
    192193{
     
    194195     * Solaris has sysconf.
    195196     */
    196     return sysconf(_SC_NPROCESSORS_CONF);
    197 }
     197    int cCpus = sysconf(_SC_NPROCESSORS_MAX)
     198    if (cCpus < 0)
     199        cCpus = sysconf(_SC_NPROCESSORS_CONF);
     200    return cCpus;
     201}
     202
    198203
    199204RTDECL(RTCPUID) RTMpGetOnlineCount(void)
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