VirtualBox

Changeset 44386 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jan 25, 2013 6:18:12 PM (12 years ago)
Author:
vboxsync
Message:

CFGM: Some smaller PVM/PUVM adjustments.

Location:
trunk/src/VBox/VMM/VMMR3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/CFGM.cpp

    r44340 r44386  
    9494 * @param   pvUser              The user argument passed to pfnCFGMConstructor.
    9595 * @thread  EMT.
     96 * @internal
    9697 */
    9798VMMR3DECL(int) CFGMR3Init(PVM pVM, PFNCFGMCONSTRUCTOR pfnCFGMConstructor, void *pvUser)
     
    144145 * @returns VBox status code.
    145146 * @param   pVM             Pointer to the VM.
     147 * @internal
    146148 */
    147149VMMR3DECL(int) CFGMR3Term(PVM pVM)
     
    838840 * @returns VBox status code.
    839841 * @param   pVM     Pointer to the VM.
     842 * @internal
    840843 */
    841844VMMR3DECL(int) CFGMR3ConstructDefaultTree(PVM pVM)
     
    11971200 * correct location.
    11981201 *
    1199  * @returns Pointer to the root node.
    1200  * @param   pVM         Pointer to the VM.
    1201  */
    1202 VMMR3DECL(PCFGMNODE) CFGMR3CreateTree(PVM pVM)
    1203 {
    1204     PCFGMNODE pNew = (PCFGMNODE)MMR3HeapAlloc(pVM, MM_TAG_CFGM, sizeof(*pNew));
     1202 * @returns Pointer to the root node, NULL on error (out of memory or invalid
     1203 *          VM handle).
     1204 * @param   pUVM            The user mode VM handle.
     1205 */
     1206VMMR3DECL(PCFGMNODE) CFGMR3CreateTree(PUVM pUVM)
     1207{
     1208    UVM_ASSERT_VALID_EXT_RETURN(pUVM, NULL);
     1209    VM_ASSERT_VALID_EXT_RETURN(pUVM->pVM, NULL);
     1210
     1211    PCFGMNODE pNew = (PCFGMNODE)MMR3HeapAllocU(pUVM, MM_TAG_CFGM, sizeof(*pNew));
    12051212    if (pNew)
    12061213    {
     
    12101217        pNew->pFirstChild   = NULL;
    12111218        pNew->pFirstLeaf    = NULL;
    1212         pNew->pVM           = pVM;
     1219        pNew->pVM           = pUVM->pVM;
    12131220        pNew->fRestrictedRoot = false;
    12141221        pNew->cchName       = 0;
     
    12341241     * Create a new tree.
    12351242     */
    1236     PCFGMNODE pNewRoot = CFGMR3CreateTree(pRoot->pVM);
     1243    PCFGMNODE pNewRoot = CFGMR3CreateTree(pRoot->pVM->pUVM);
    12371244    if (!pNewRoot)
    12381245        return VERR_NO_MEMORY;
  • trunk/src/VBox/VMM/VMMR3/PDMUsb.cpp

    r44358 r44386  
    898898     * Create the CFGM configuration node.
    899899     */
    900     PCFGMNODE pConfig = CFGMR3CreateTree(pVM);
     900    PCFGMNODE pConfig = CFGMR3CreateTree(pUVM);
    901901    AssertReturn(pConfig, VERR_NO_MEMORY);
    902902    do /* break loop */
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