VirtualBox

Changeset 81896 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 16, 2019 4:27:37 PM (5 years ago)
Author:
vboxsync
Message:

DevRTC: Some cleanup. bugref:9218

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevRTC.cpp

    r81695 r81896  
    200200/**
    201201 * RTC ring-0 instance data.
    202  * @note Not needed, but serves as example for testing the new model.
    203202 */
    204203typedef struct RTCSTATER0
    205204{
    206     /** Pointer to the device instance. */
    207     PPDMDEVINSR0            pDevInsR0;
     205    uint64_t                uUnused;
    208206} RTCSTATER0;
    209207/** Pointer to the ring-0 RTC device instance data. */
     
    213211/**
    214212 * RTC raw-mode instance data.
    215  * @note Not needed, but serves as example for testing the new model.
    216213 */
    217214typedef struct RTCSTATERC
    218215{
    219     /** Pointer to the device instance. */
    220     PPDMDEVINSRC            pDevInsRC;
     216    uint64_t                uUnused;
    221217} RTCSTATERC;
    222218/** Pointer to the raw-mode RTC device instance data. */
     
    224220
    225221
    226 /** @typedef RTCSTATECC
    227  * The instance data for the current context. */
    228 /** @typedef PRTCSTATECC
    229  * Pointer to the instance data for the current context. */
    230 #ifdef IN_RING3
    231 typedef  RTCSTATER3  RTCSTATECC;
    232 typedef PRTCSTATER3 PRTCSTATECC;
    233 #elif defined(IN_RING0)
    234 typedef  RTCSTATER0  RTCSTATECC;
    235 typedef PRTCSTATER0 PRTCSTATECC;
    236 #elif defined(IN_RC)
    237 typedef  RTCSTATERC  RTCSTATECC;
    238 typedef PRTCSTATERC PRTCSTATECC;
    239 #else
    240 # error "Not IN_RING3, IN_RING0 or IN_RC"
    241 #endif
     222/** The instance data for the current context. */
     223typedef CTX_SUFF(RTCSTATE)  RTCSTATECC;
     224/** Pointer to the instance data for the current context. */
     225typedef CTX_SUFF(PRTCSTATE) PRTCSTATECC;
    242226
    243227
     
    11021086
    11031087/**
    1104  * @interface_method_impl{PDMDEVREG,pfnRelocate}
    1105  */
    1106 static DECLCALLBACK(void) rtcRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
    1107 {
    1108     RT_NOREF1(offDelta);
    1109     PRTCSTATERC pThisRC = PDMINS_2_DATA_RC(pDevIns, PRTCSTATERC);
    1110     pThisRC->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
    1111 }
    1112 
    1113 
    1114 /**
    11151088 * @interface_method_impl{PDMDEVREG,pfnReset}
    11161089 */
     
    12591232{
    12601233    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
    1261     PRTCSTATE   pThis   = PDMDEVINS_2_DATA(pDevIns, PRTCSTATE);
    1262     PRTCSTATER0 pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PRTCSTATECC);
    1263     pThisCC->CTX_SUFF(pDevIns) = pDevIns;
     1234    PRTCSTATE pThis = PDMDEVINS_2_DATA(pDevIns, PRTCSTATE);
    12641235
    12651236    int rc = PDMDevHlpIoPortSetUpContext(pDevIns, pThis->hIoPorts, rtcIOPortWrite, rtcIOPortRead, NULL /*pvUser*/);
     
    12941265    /* .pfnConstruct = */           rtcConstruct,
    12951266    /* .pfnDestruct = */            NULL,
    1296     /* .pfnRelocate = */            rtcRelocate,
     1267    /* .pfnRelocate = */            NULL,
    12971268    /* .pfnMemSetup = */            NULL,
    12981269    /* .pfnPowerOn = */             NULL,
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