Changeset 26001 in vbox for trunk/src/VBox/Devices/Parallel
- Timestamp:
- Jan 25, 2010 2:21:13 PM (15 years ago)
- Location:
- trunk/src/VBox/Devices/Parallel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Parallel/DevParallel.cpp
r25985 r26001 673 673 { 674 674 ParallelState *pThis = PDMINS_2_DATA(pDevIns, ParallelState *); 675 PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns); 675 676 676 677 PDMR3CritSectDelete(&pThis->CritSect); … … 702 703 703 704 Assert(iInstance < 4); 705 PDMDEV_CHECK_VERSIONS_RETURN(pDevIns); 704 706 705 707 /* -
trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp
r25985 r26001 249 249 250 250 /** 251 * Construct a host parallel driver instance. 252 * 253 * @copydoc FNPDMDRVCONSTRUCT 254 */ 255 static DECLCALLBACK(int) drvHostParallelConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 251 * Destruct a host parallel driver instance. 252 * 253 * Most VM resources are freed by the VM. This callback is provided so that 254 * any non-VM resources can be freed correctly. 255 * 256 * @param pDrvIns The driver instance data. 257 */ 258 static DECLCALLBACK(void) drvHostParallelDestruct(PPDMDRVINS pDrvIns) 256 259 { 257 260 PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL); 258 261 LogFlow(("%s: iInstance=%d\n", __FUNCTION__, pDrvIns->iInstance)); 262 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 263 264 ioctl(pThis->FileDevice, PPRELEASE); 265 266 if (pThis->WakeupPipeW != NIL_RTFILE) 267 { 268 int rc = RTFileClose(pThis->WakeupPipeW); 269 AssertRC(rc); 270 pThis->WakeupPipeW = NIL_RTFILE; 271 } 272 if (pThis->WakeupPipeR != NIL_RTFILE) 273 { 274 int rc = RTFileClose(pThis->WakeupPipeR); 275 AssertRC(rc); 276 pThis->WakeupPipeR = NIL_RTFILE; 277 } 278 if (pThis->FileDevice != NIL_RTFILE) 279 { 280 int rc = RTFileClose(pThis->FileDevice); 281 AssertRC(rc); 282 pThis->FileDevice = NIL_RTFILE; 283 } 284 } 285 286 /** 287 * Construct a host parallel driver instance. 288 * 289 * @copydoc FNPDMDRVCONSTRUCT 290 */ 291 static DECLCALLBACK(int) drvHostParallelConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 292 { 293 PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL); 294 LogFlow(("%s: iInstance=%d\n", __FUNCTION__, pDrvIns->iInstance)); 295 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); 259 296 260 297 /* … … 348 385 349 386 return VINF_SUCCESS; 350 }351 352 353 /**354 * Destruct a host parallel driver instance.355 *356 * Most VM resources are freed by the VM. This callback is provided so that357 * any non-VM resources can be freed correctly.358 *359 * @param pDrvIns The driver instance data.360 */361 static DECLCALLBACK(void) drvHostParallelDestruct(PPDMDRVINS pDrvIns)362 {363 PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);364 365 LogFlow(("%s: iInstance=%d\n", __FUNCTION__, pDrvIns->iInstance));366 367 ioctl(pThis->FileDevice, PPRELEASE);368 369 if (pThis->WakeupPipeW != NIL_RTFILE)370 {371 int rc = RTFileClose(pThis->WakeupPipeW);372 AssertRC(rc);373 pThis->WakeupPipeW = NIL_RTFILE;374 }375 if (pThis->WakeupPipeR != NIL_RTFILE)376 {377 int rc = RTFileClose(pThis->WakeupPipeR);378 AssertRC(rc);379 pThis->WakeupPipeR = NIL_RTFILE;380 }381 if (pThis->FileDevice != NIL_RTFILE)382 {383 int rc = RTFileClose(pThis->FileDevice);384 AssertRC(rc);385 pThis->FileDevice = NIL_RTFILE;386 }387 387 } 388 388
Note:
See TracChangeset
for help on using the changeset viewer.