儲存庫 vbox 的更動 13722
- 時間撮記:
- 2008-10-31 下午03:53:18 (16 年 以前)
- 位置:
- trunk/src/VBox/Main
- 檔案:
-
- 修改 6 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r13690 r13722 146 146 hrc = pMachine->COMGETTER(MemorySize)(&cRamMBs); H(); 147 147 148 ULONG cCpus = 1; 148 149 #ifdef VBOX_WITH_SMP_GUESTS 149 /* @todo nike: Testing code, should use actual getter when ready */ 150 uint16_t cCpus = 2; 151 #else 152 uint16_t cCpus = 1; 150 hrc = pMachine->COMGETTER(CPUCount)(&cCpus); H(); 153 151 #endif 154 152 -
trunk/src/VBox/Main/MachineImpl.cpp
r13713 r13722 188 188 /* default values for a newly created machine */ 189 189 mMemorySize = 128; 190 mCPUCount = 1; 190 191 mMemoryBalloonSize = 0; 191 192 mStatisticsUpdateInterval = 0; … … 226 227 mHWVirtExVPIDEnabled != that.mHWVirtExVPIDEnabled || 227 228 mPAEEnabled != that.mPAEEnabled || 229 mCPUCount != that.mCPUCount || 228 230 mClipboardMode != that.mClipboardMode) 229 231 return false; … … 932 934 mHWData.backup(); 933 935 mHWData->mMemorySize = memorySize; 936 937 return S_OK; 938 } 939 940 STDMETHODIMP Machine::COMGETTER(CPUCount) (ULONG *CPUCount) 941 { 942 if (!CPUCount) 943 return E_POINTER; 944 945 AutoCaller autoCaller (this); 946 CheckComRCReturnRC (autoCaller.rc()); 947 948 AutoReadLock alock (this); 949 950 *CPUCount = mHWData->mCPUCount; 951 952 return S_OK; 953 } 954 955 STDMETHODIMP Machine::COMSETTER(CPUCount) (ULONG CPUCount) 956 { 957 /* check RAM limits */ 958 if (CPUCount < SchemaDefs::MinCPUCount || 959 CPUCount > SchemaDefs::MaxCPUCount) 960 return setError (E_INVALIDARG, 961 tr ("Invalid virtual CPU count: %lu (must be in range [%lu, %lu])"), 962 CPUCount, SchemaDefs::MinCPUCount, SchemaDefs::MaxCPUCount); 963 964 AutoCaller autoCaller (this); 965 CheckComRCReturnRC (autoCaller.rc()); 966 967 AutoWriteLock alock (this); 968 969 HRESULT rc = checkStateDependency (MutableStateDep); 970 CheckComRCReturnRC (rc); 971 972 mHWData.backup(); 973 mHWData->mCPUCount = CPUCount; 934 974 935 975 return S_OK; … … 4940 4980 mHWData->mPAEEnabled = PAENode.value <bool> ("enabled"); 4941 4981 } 4982 4983 /* CPUCount(optional, default is 1) */ 4984 Key CPUCountNode = cpuNode.findKey ("CPUCount"); 4985 if (!CPUCountNode.isNull()) 4986 { 4987 mHWData->mCPUCount = CPUCountNode.value <ULONG> ("CPUCount"); 4988 } 4942 4989 } 4943 4990 } … … 6310 6357 PAENode.setValue <bool> ("enabled", true); 6311 6358 } 6359 6360 /* CPU count */ 6361 Key CPUCountNode = cpuNode.createKey ("CPUCount"); 6362 CPUCountNode.setValue <ULONG> ("CPUCount", mHWData->mCPUCount); 6312 6363 } 6313 6364 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r13676 r13722 2536 2536 <interface 2537 2537 name="IMachine" extends="$unknown" 2538 uuid=" ceb17b5b-fd1f-424f-9dd3-2ab04c06eefc"2538 uuid="b5d1baca-da5b-4202-905f-ee53a5f60ae5" 2539 2539 wsmap="managed" 2540 2540 > … … 2718 2718 </note> 2719 2719 </desc> 2720 </attribute> 2721 2722 <attribute name="CPUCount" type="unsigned long"> 2723 <desc>Number of virtual CPUs in the VM.</desc> 2720 2724 </attribute> 2721 2725 -
trunk/src/VBox/Main/include/MachineImpl.h
r13713 r13722 259 259 BOOL mHWVirtExVPIDEnabled; 260 260 BOOL mPAEEnabled; 261 ULONG mCPUCount; 261 262 262 263 DeviceType_T mBootOrder [SchemaDefs::MaxBootPosition]; … … 474 475 STDMETHOD(COMGETTER(MemorySize))(ULONG *memorySize); 475 476 STDMETHOD(COMSETTER(MemorySize))(ULONG memorySize); 477 STDMETHOD(COMGETTER(CPUCount))(ULONG *cpuCount); 478 STDMETHOD(COMSETTER(CPUCount))(ULONG cpuCount); 476 479 STDMETHOD(COMGETTER(MemoryBalloonSize))(ULONG *memoryBalloonSize); 477 480 STDMETHOD(COMSETTER(MemoryBalloonSize))(ULONG memoryBalloonSize); -
trunk/src/VBox/Main/xml/SchemaDefs.xsl
r11982 r13722 157 157 158 158 <xsl:call-template name="defineEnumMember"> 159 <xsl:with-param name="member" select="' MinCPUCount'"/> 160 <xsl:with-param name="select" select=" 161 xsd:complexType[@name='TCPUCount']/xsd:attribute[@name='CPUCount']//xsd:minInclusive/@value 162 "/> 163 </xsl:call-template> 164 <xsl:call-template name="defineEnumMember"> 165 <xsl:with-param name="member" select="' MaxCPUCount'"/> 166 <xsl:with-param name="select" select=" 167 xsd:complexType[@name='TCPUCount']/xsd:attribute[@name='CPUCount']//xsd:maxInclusive/@value 168 "/> 169 </xsl:call-template> 170 171 <xsl:call-template name="defineEnumMember"> 159 172 <xsl:with-param name="member" select="' MaxGuestMonitors'"/> 160 173 <xsl:with-param name="select" select=" -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r13580 r13722 392 392 </xsd:complexType> 393 393 394 <xsd:complexType name="TCPUCount"> 395 <xsd:attribute name="CPUCount"> 396 <xsd:simpleType> 397 <xsd:restriction base="xsd:unsignedInt"> 398 <xsd:minInclusive value="1"/> 399 <xsd:maxInclusive value="63"/> 400 </xsd:restriction> 401 </xsd:simpleType> 402 </xsd:attribute> 403 </xsd:complexType> 404 394 405 <xsd:complexType name="TCPU"> 395 406 <xsd:sequence> … … 398 409 <xsd:element name="HardwareVirtExVPID" type="THWVirtExVPIDType" minOccurs="0"/> 399 410 <xsd:element name="PAE" type="TPAEType" minOccurs="0"/> 411 <xsd:element name="CPUCount" type="TCPUCount" minOccurs="0"/> 400 412 </xsd:sequence> 401 413 </xsd:complexType>
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器