VirtualBox

Changeset 26172 in vbox


Ignore:
Timestamp:
Feb 2, 2010 8:41:40 PM (15 years ago)
Author:
vboxsync
Message:

PDM: s/pCfgHandle/pCfg/g - part 1.

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pdmdev.h

    r26169 r26172  
    5959 * @param   pDevIns     The device instance data. If the registration structure
    6060 *                      is needed, it can be accessed thru  pDevIns->pReg.
    61  * @param   iInstance   Instance number. Use this to figure out which registers and such to use.
    62  *                      The instance number is also found in pDevIns->iInstance, but since it's
    63  *                      likely to be freqently used PDM passes it as parameter.
    64  * @param   pCfgHandle  Configuration node handle for the device. Use this to obtain the configuration
    65  *                      of the device instance. It's also found in pDevIns->pCfgHandle, but since it's
    66  *                      primary usage will in this function it's passed as a parameter.
    67  */
    68 typedef DECLCALLBACK(int)   FNPDMDEVCONSTRUCT(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfgHandle);
     61 * @param   iInstance   Instance number. Use this to figure out which registers
     62 *                      and such to use. The instance number is also found in
     63 *                      pDevIns->iInstance, but since it's likely to be
     64 *                      freqently used PDM passes it as parameter.
     65 * @param   pCfg        Configuration node handle for the driver.  This is
     66 *                      expected to be in high demand in the constructor and is
     67 *                      therefore passed as an argument.  When using it at other
     68 *                      times, it can be found in pDrvIns->pCfg.
     69 */
     70typedef DECLCALLBACK(int)   FNPDMDEVCONSTRUCT(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg);
    6971/** Pointer to a FNPDMDEVCONSTRUCT() function. */
    7072typedef FNPDMDEVCONSTRUCT *PFNPDMDEVCONSTRUCT;
     
    34923494    R3PTRTYPE(PCPDMDEVREG)      pReg;
    34933495    /** Configuration handle. */
    3494     R3PTRTYPE(PCFGMNODE)        pCfgHandle;
     3496    R3PTRTYPE(PCFGMNODE)        pCfg;
    34953497
    34963498    /** The base interface of the device.
  • trunk/include/VBox/pdmdrv.h

    r26168 r26172  
    6767 * @param   pDrvIns     The driver instance data. If the registration structure
    6868 *                      is needed, it can be accessed thru pDrvIns->pReg.
    69  * @param   pCfgHandle  Configuration node handle for the driver. Use this to
    70  *                      obtain the configuration of the driver instance. It's
    71  *                      also found in pDrvIns->pCfgHandle as it's expected to be
    72  *                      used frequently in this function.
     69 * @param   pCfg        Configuration node handle for the driver.  This is
     70 *                      expected to be in high demand in the constructor and is
     71 *                      therefore passed as an argument.  When using it at other
     72 *                      times, it can be accessed via pDrvIns->pCfg.
    7373 * @param   fFlags      Flags, combination of the PDM_TACH_FLAGS_* \#defines.
    7474 */
    75 typedef DECLCALLBACK(int)   FNPDMDRVCONSTRUCT(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags);
     75typedef DECLCALLBACK(int)   FNPDMDRVCONSTRUCT(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
    7676/** Pointer to a FNPDMDRVCONSTRUCT() function. */
    7777typedef FNPDMDRVCONSTRUCT *PFNPDMDRVCONSTRUCT;
     
    367367    R3PTRTYPE(PCPDMDRVREG)      pReg;
    368368    /** Configuration handle. */
    369     R3PTRTYPE(PCFGMNODE)        pCfgHandle;
     369    R3PTRTYPE(PCFGMNODE)        pCfg;
    370370
    371371    /** Pointer to the base interface of the device/driver instance above. */
  • trunk/include/VBox/pdmusb.h

    r26170 r26172  
    112112     *                      pUsbDev->iInstance, but since it's likely to be
    113113     *                      freqently used PDM passes it as parameter.
    114      * @param   pCfg        Configuration node handle for the device. Use this to
    115      *                      obtain the configuration of the device instance. It's
    116      *                      also found in pUsbDev->pCfg, but since it's primary
    117      *                      usage will in this function it's passed as a parameter.
    118      * @param   pCfgGlobal  Handle to the global device configuration. Also foundin
    119      *                      pUsbDev->pCfgGlobal.
     114     * @param   pCfg        Configuration node handle for the device.  Use this to
     115     *                      obtain the configuration of the device instance.  It is
     116     *                      also found in pUsbDev->pCfg, but since it is primary
     117     *                      usage will in this function it is passed as a parameter.
     118     * @param   pCfgGlobal  Handle to the global device configuration.  Also found
     119     *                      in pUsbDev->pCfgGlobal.
    120120     * @remarks This callback is required.
    121121     */
  • trunk/src/VBox/Devices/EFI/DevEFI.cpp

    r26165 r26172  
    426426                               VBOX_DMI_TABLE_SIZE,
    427427                               &pThis->aUuid,
    428                                pDevIns->pCfgHandle,
     428                               pDevIns->pCfg,
    429429                               true /* fPutSmbiosHeaders */);
    430430    Assert(RT_SUCCESS(rc));
  • trunk/src/VBox/Devices/PC/ACPI/VBoxAcpi.cpp

    r26115 r26172  
    6666    int rc;
    6767
    68     rc = CFGMR3QueryU16Def(pDevIns->pCfgHandle, "NumCPUs", &cNumCpus, 1);
     68    rc = CFGMR3QueryU16Def(pDevIns->pCfg, "NumCPUs", &cNumCpus, 1);
    6969
    7070    if (RT_FAILURE(rc))
     
    7373    /* Clear CPU objects at all, if needed */
    7474    bool fShowCpu;
    75     rc = CFGMR3QueryBoolDef(pDevIns->pCfgHandle, "ShowCpu", &fShowCpu, false);
     75    rc = CFGMR3QueryBoolDef(pDevIns->pCfg, "ShowCpu", &fShowCpu, false);
    7676    if (RT_FAILURE(rc))
    7777        return rc;
     
    146146    size_t cbAmlCode = 0;
    147147    char *pszAmlFilePath = NULL;
    148     int rc = CFGMR3QueryStringAlloc(pDevIns->pCfgHandle, "AmlFilePath", &pszAmlFilePath);
     148    int rc = CFGMR3QueryStringAlloc(pDevIns->pCfg, "AmlFilePath", &pszAmlFilePath);
    149149    if (RT_SUCCESS(rc))
    150150    {
  • trunk/src/VBox/Devices/PC/DevACPI.cpp

    r26165 r26172  
    19581958    cbXsdt += cAddr*sizeof(uint64_t);  /* each entry: 64 bits phys. address. */
    19591959
    1960     rc = CFGMR3QueryU64(s->pDevIns->pCfgHandle, "RamSize", &s->u64RamSize);
     1960    rc = CFGMR3QueryU64(s->pDevIns->pCfg, "RamSize", &s->u64RamSize);
    19611961    if (RT_FAILURE(rc))
    19621962        return PDMDEV_SET_ERROR(s->pDevIns, rc,
     
    19641964
    19651965    uint32_t cbRamHole;
    1966     rc = CFGMR3QueryU32Def(s->pDevIns->pCfgHandle, "RamHoleSize", &cbRamHole, MM_RAM_HOLE_SIZE_DEFAULT);
     1966    rc = CFGMR3QueryU32Def(s->pDevIns->pCfg, "RamHoleSize", &cbRamHole, MM_RAM_HOLE_SIZE_DEFAULT);
    19671967    if (RT_FAILURE(rc))
    19681968        return PDMDEV_SET_ERROR(s->pDevIns, rc,
  • trunk/src/VBox/Devices/Storage/DevAHCI.cpp

    r26165 r26172  
    57765776    {
    57775777        uint32_t iPort;
    5778         int rc = CFGMR3QueryU32Def(pDevIns->pCfgHandle, s_apszIdeEmuPortNames[i], &iPort, i);
     5778        int rc = CFGMR3QueryU32Def(pDevIns->pCfg, s_apszIdeEmuPortNames[i], &iPort, i);
    57795779        AssertRCReturn(rc, rc);
    57805780        SSMR3PutU32(pSSM, iPort);
     
    59345934        {
    59355935            uint32_t iPort;
    5936             rc = CFGMR3QueryU32Def(pDevIns->pCfgHandle, s_apszIdeEmuPortNames[i], &iPort, i);
     5936            rc = CFGMR3QueryU32Def(pDevIns->pCfg, s_apszIdeEmuPortNames[i], &iPort, i);
    59375937            AssertRCReturn(rc, rc);
    59385938
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp

    r26169 r26172  
    108108    GEN_CHECK_OFF(PDMDEVINS, Internal);
    109109    GEN_CHECK_OFF(PDMDEVINS, pReg);
    110     GEN_CHECK_OFF(PDMDEVINS, pCfgHandle);
     110    GEN_CHECK_OFF(PDMDEVINS, pCfg);
    111111    GEN_CHECK_OFF(PDMDEVINS, iInstance);
    112112    GEN_CHECK_OFF(PDMDEVINS, IBase);
  • trunk/src/VBox/VMM/PDMDevice.cpp

    r26169 r26172  
    329329        pDevIns->pHlpR0                         = pHlpR0;
    330330        pDevIns->pReg                           = paDevs[i].pDev->pReg;
    331         pDevIns->pCfgHandle                     = pConfigNode;
     331        pDevIns->pCfg                           = pConfigNode;
    332332        pDevIns->iInstance                      = paDevs[i].iInstance;
    333333        pDevIns->pvInstanceDataR3               = &pDevIns->achInstanceData[0];
     
    367367        paDevs[i].pDev->cInstances++;
    368368        Log(("PDM: Constructing device '%s' instance %d...\n", pDevIns->pReg->szName, pDevIns->iInstance));
    369         rc = pDevIns->pReg->pfnConstruct(pDevIns, pDevIns->iInstance, pDevIns->pCfgHandle);
     369        rc = pDevIns->pReg->pfnConstruct(pDevIns, pDevIns->iInstance, pDevIns->pCfg);
    370370        if (RT_FAILURE(rc))
    371371        {
  • trunk/src/VBox/VMM/PDMDriver.cpp

    r26169 r26172  
    449449                    pNew->Internal.s.pCfgHandle     = pNode;
    450450                    pNew->pReg                      = pDrv->pReg;
    451                     pNew->pCfgHandle                = pConfigNode;
     451                    pNew->pCfg                      = pConfigNode;
    452452                    pNew->iInstance                 = pDrv->iNextInstance;
    453453                    pNew->pUpBase                   = pBaseInterface;
     
    490490                     * Invoke the constructor.
    491491                     */
    492                     rc = pDrv->pReg->pfnConstruct(pNew, pNew->pCfgHandle, 0 /*fFlags*/);
     492                    rc = pDrv->pReg->pfnConstruct(pNew, pNew->pCfg, 0 /*fFlags*/);
    493493                    if (RT_SUCCESS(rc))
    494494                    {
  • trunk/src/VBox/VMM/testcase/tstVMStructRC.cpp

    r26169 r26172  
    376376    GEN_CHECK_OFF(PDMDEVINS, pvInstanceDataR3);
    377377    GEN_CHECK_OFF(PDMDEVINS, pReg);
    378     GEN_CHECK_OFF(PDMDEVINS, pCfgHandle);
     378    GEN_CHECK_OFF(PDMDEVINS, pCfg);
    379379    GEN_CHECK_OFF(PDMDEVINS, IBase);
    380380    GEN_CHECK_OFF(PDMDEVINS, Internal);
     
    403403    GEN_CHECK_OFF(PDMDRVINS, pvInstanceDataR3);
    404404    GEN_CHECK_OFF(PDMDRVINS, pReg);
    405     GEN_CHECK_OFF(PDMDRVINS, pCfgHandle);
     405    GEN_CHECK_OFF(PDMDRVINS, pCfg);
    406406    GEN_CHECK_OFF(PDMDRVINS, IBase);
    407407    GEN_CHECK_OFF(PDMDRVINS, Internal);
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