VirtualBox

Changeset 48765 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Sep 30, 2013 8:51:08 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
89402
Message:

Main/Qt/VBoxManage: introduced IHost::ProcessorOnlineCoreCount and use it to determine the maximum allowed number of CPU virtual cores the user may assign to a guest

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r48715 r48765  
    84198419    </attribute>
    84208420
     8421    <attribute name="processorOnlineCoreCount" type="unsigned long" readonly="yes">
     8422      <desc>Number of physical processor cores online in the host system.</desc>
     8423    </attribute>
     8424
    84218425    <method name="getProcessorSpeed">
    84228426      <desc>Query the (approximate) maximum speed of a specified host CPU in
  • trunk/src/VBox/Main/include/HostImpl.h

    r48607 r48765  
    6868    STDMETHOD(COMGETTER(ProcessorOnlineCount))(ULONG *count);
    6969    STDMETHOD(COMGETTER(ProcessorCoreCount))(ULONG *count);
     70    STDMETHOD(COMGETTER(ProcessorOnlineCoreCount))(ULONG *count);
    7071    STDMETHOD(GetProcessorSpeed)(ULONG cpuId, ULONG *speed);
    7172    STDMETHOD(GetProcessorDescription)(ULONG cpuId, BSTR *description);
  • trunk/src/VBox/Main/src-server/HostImpl.cpp

    r48607 r48765  
    956956    // no locking required
    957957
    958     return E_NOTIMPL;
     958    *aCount = RTMpGetPresentCoreCount();
     959    return S_OK;
     960}
     961
     962/**
     963 * Returns the number of installed physical processor cores.
     964 *
     965 * @returns COM status code
     966 * @param   count address of result variable
     967 */
     968STDMETHODIMP Host::COMGETTER(ProcessorOnlineCoreCount)(ULONG *aCount)
     969{
     970    CheckComArgOutPointerValid(aCount);
     971    // no locking required
     972
     973    *aCount = RTMpGetOnlineCoreCount();
     974    return S_OK;
    959975}
    960976
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