Changeset 81896 in vbox for trunk/src/VBox
- Timestamp:
- Nov 16, 2019 4:27:37 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevRTC.cpp
r81695 r81896 200 200 /** 201 201 * RTC ring-0 instance data. 202 * @note Not needed, but serves as example for testing the new model.203 202 */ 204 203 typedef struct RTCSTATER0 205 204 { 206 /** Pointer to the device instance. */ 207 PPDMDEVINSR0 pDevInsR0; 205 uint64_t uUnused; 208 206 } RTCSTATER0; 209 207 /** Pointer to the ring-0 RTC device instance data. */ … … 213 211 /** 214 212 * RTC raw-mode instance data. 215 * @note Not needed, but serves as example for testing the new model.216 213 */ 217 214 typedef struct RTCSTATERC 218 215 { 219 /** Pointer to the device instance. */ 220 PPDMDEVINSRC pDevInsRC; 216 uint64_t uUnused; 221 217 } RTCSTATERC; 222 218 /** Pointer to the raw-mode RTC device instance data. */ … … 224 220 225 221 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. */ 223 typedef CTX_SUFF(RTCSTATE) RTCSTATECC; 224 /** Pointer to the instance data for the current context. */ 225 typedef CTX_SUFF(PRTCSTATE) PRTCSTATECC; 242 226 243 227 … … 1102 1086 1103 1087 /** 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 /**1115 1088 * @interface_method_impl{PDMDEVREG,pfnReset} 1116 1089 */ … … 1259 1232 { 1260 1233 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); 1264 1235 1265 1236 int rc = PDMDevHlpIoPortSetUpContext(pDevIns, pThis->hIoPorts, rtcIOPortWrite, rtcIOPortRead, NULL /*pvUser*/); … … 1294 1265 /* .pfnConstruct = */ rtcConstruct, 1295 1266 /* .pfnDestruct = */ NULL, 1296 /* .pfnRelocate = */ rtcRelocate,1267 /* .pfnRelocate = */ NULL, 1297 1268 /* .pfnMemSetup = */ NULL, 1298 1269 /* .pfnPowerOn = */ NULL,
Note:
See TracChangeset
for help on using the changeset viewer.