Changeset 93989 in vbox for trunk/src/VBox/Devices/USB/VUSBInternal.h
- Timestamp:
- Feb 28, 2022 3:28:20 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/VUSBInternal.h
r93979 r93989 291 291 int vusbDevInit(PVUSBDEV pDev, PPDMUSBINS pUsbIns, const char *pszCaptureFilename); 292 292 void vusbDevDestroy(PVUSBDEV pDev); 293 294 DECLINLINE(bool) vusbDevIsRh(PVUSBDEV pDev)295 {296 return (pDev->pHub == (PVUSBROOTHUB)pDev);297 }298 299 293 bool vusbDevDoSelectConfig(PVUSBDEV dev, PCVUSBDESCCONFIGEX pCfg); 300 294 void vusbDevMapEndpoint(PVUSBDEV dev, PCVUSBDESCENDPOINTEX ep); … … 355 349 typedef struct VUSBROOTHUB 356 350 { 357 /** VUSB device data for the roothub @todo Remove. */358 VUSBDEV Dev;359 351 /** Pointer to the driver instance. */ 360 352 PPDMDRVINS pDrvIns; … … 373 365 PVUSBROOTHUBLOAD pLoad; 374 366 367 /** Roothub device state. */ 368 VUSBDEVICESTATE enmState; 375 369 /** Number of ports this roothub offers. */ 376 370 uint16_t cPorts; … … 379 373 /** Name of the roothub. Used for logging. */ 380 374 char *pszName; 375 /** URB pool for URBs from the roothub. */ 376 VUSBURBPOOL UrbPool; 381 377 382 378 #if HC_ARCH_BITS == 32 … … 676 672 * @returns New reference count. 677 673 * @param pThis The VUSB device pointer. 678 */ 679 DECLINLINE(uint32_t) vusbDevRetain(PVUSBDEV pThis) 674 * @param pszWho Caller of the retaining. 675 */ 676 DECLINLINE(uint32_t) vusbDevRetain(PVUSBDEV pThis, const char *pszWho) 680 677 { 681 678 AssertPtrReturn(pThis, UINT32_MAX); 682 679 683 680 uint32_t cRefs = ASMAtomicIncU32(&pThis->cRefs); 681 LogFlowFunc(("pThis=%p{.cRefs=%u}[%s]\n", pThis, cRefs, pszWho)); RT_NOREF(pszWho); 684 682 AssertMsg(cRefs > 1 && cRefs < _1M, ("%#x %p\n", cRefs, pThis)); 685 683 return cRefs; … … 691 689 * @returns New reference count. 692 690 * @retval 0 if no onw is holding a reference anymore causing the device to be destroyed. 693 */ 694 DECLINLINE(uint32_t) vusbDevRelease(PVUSBDEV pThis) 691 * @param pThis The VUSB device pointer. 692 * @param pszWho Caller of the retaining. 693 */ 694 DECLINLINE(uint32_t) vusbDevRelease(PVUSBDEV pThis, const char *pszWho) 695 695 { 696 696 AssertPtrReturn(pThis, UINT32_MAX); 697 697 698 698 uint32_t cRefs = ASMAtomicDecU32(&pThis->cRefs); 699 LogFlowFunc(("pThis=%p{.cRefs=%u}[%s]\n", pThis, cRefs, pszWho)); RT_NOREF(pszWho); 699 700 AssertMsg(cRefs < _1M, ("%#x %p\n", cRefs, pThis)); 700 701 if (cRefs == 0)
Note:
See TracChangeset
for help on using the changeset viewer.