Changeset 90330 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Jul 26, 2021 12:50:05 PM (4 years ago)
- Location:
- trunk/src/VBox/Devices/Network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvIntNet.cpp
r90103 r90330 292 292 DECLINLINE(int) drvIntNetProcessXmit(PDRVINTNET pThis) 293 293 { 294 Assert(PDM CritSectIsOwner(&pThis->XmitLock));294 Assert(PDMDrvHlpCritSectIsOwner(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock)); 295 295 296 296 #ifdef IN_RING3 … … 325 325 #endif 326 326 327 int rc = PDM CritSectTryEnter(&pThis->XmitLock);327 int rc = PDMDrvHlpCritSectTryEnter(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock); 328 328 if (RT_SUCCESS(rc)) 329 329 { … … 367 367 int rc = VINF_SUCCESS; 368 368 Assert(cbMin < UINT32_MAX / 2); 369 Assert(PDM CritSectIsOwner(&pThis->XmitLock));369 Assert(PDMDrvHlpCritSectIsOwner(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock)); 370 370 371 371 /* … … 468 468 Assert( pHdr->u8Type == INTNETHDR_TYPE_FRAME 469 469 || pHdr->u8Type == INTNETHDR_TYPE_GSO); 470 Assert(PDM CritSectIsOwner(&pThis->XmitLock));470 Assert(PDMDrvHlpCritSectIsOwner(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock)); 471 471 472 472 /** @todo LATER: try unalloc the frame. */ … … 495 495 Assert(pSgBuf->fFlags == (PDMSCATTERGATHER_FLAGS_MAGIC | PDMSCATTERGATHER_FLAGS_OWNER_1)); 496 496 Assert(pSgBuf->cbUsed <= pSgBuf->cbAvailable); 497 Assert(PDM CritSectIsOwner(&pThis->XmitLock));497 Assert(PDMDrvHlpCritSectIsOwner(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock)); 498 498 499 499 if (pSgBuf->pvUser) … … 528 528 PDRVINTNET pThis = RT_FROM_MEMBER(pInterface, DRVINTNET, CTX_SUFF(INetworkUp)); 529 529 ASMAtomicUoWriteBool(&pThis->fXmitOnXmitThread, false); 530 PDM CritSectLeave(&pThis->XmitLock);530 PDMDrvHlpCritSectLeave(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock); 531 531 } 532 532 … … 606 606 { 607 607 STAM_REL_COUNTER_INC(&pThis->StatXmitProcessRing); 608 PDM CritSectEnter(&pThis->XmitLock, VERR_IGNORED);608 PDMDrvHlpCritSectEnter(pDrvIns, &pThis->XmitLock, VERR_IGNORED); 609 609 drvIntNetProcessXmit(pThis); 610 PDM CritSectLeave(&pThis->XmitLock);610 PDMDrvHlpCritSectLeave(pDrvIns, &pThis->XmitLock); 611 611 } 612 612 … … 616 616 { 617 617 STAM_REL_COUNTER_INC(&pThis->StatXmitProcessRing); 618 PDM CritSectEnter(&pThis->XmitLock, VERR_IGNORED);618 PDMDrvHlpCritSectEnter(pDrvIns, &pThis->XmitLock, VERR_IGNORED); 619 619 drvIntNetProcessXmit(pThis); 620 PDM CritSectLeave(&pThis->XmitLock);620 PDMDrvHlpCritSectLeave(pDrvIns, &pThis->XmitLock); 621 621 } 622 622 … … 1273 1273 pThis->hSgCache = NIL_RTMEMCACHE; 1274 1274 1275 if (PDM CritSectIsInitialized(&pThis->XmitLock))1276 PDM R3CritSectDelete(&pThis->XmitLock);1275 if (PDMDrvHlpCritSectIsInitialized(pDrvIns, &pThis->XmitLock)) 1276 PDMDrvHlpCritSectDelete(pDrvIns, &pThis->XmitLock); 1277 1277 } 1278 1278 -
trunk/src/VBox/Devices/Network/DrvNetShaper.cpp
r82968 r90330 108 108 if (RT_UNLIKELY(!pThis->CTX_SUFF(pIBelowNet))) 109 109 { 110 int rc = PDM CritSectTryEnter(&pThis->XmitLock);110 int rc = PDMDrvHlpCritSectTryEnter(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock); 111 111 if (RT_UNLIKELY(rc == VERR_SEM_BUSY)) 112 112 rc = VERR_TRY_AGAIN; … … 179 179 pThis->CTX_SUFF(pIBelowNet)->pfnEndXmit(pThis->CTX_SUFF(pIBelowNet)); 180 180 else 181 PDM CritSectLeave(&pThis->XmitLock);181 PDMDrvHlpCritSectLeave(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock); 182 182 } 183 183 … … 343 343 344 344 LogFlow(("drvNetShaperDetach: pDrvIns: %p, fFlags: %u\n", pDrvIns, fFlags)); 345 PDM CritSectEnter(&pThis->XmitLock, VERR_IGNORED);345 PDMDrvHlpCritSectEnter(pDrvIns, &pThis->XmitLock, VERR_IGNORED); 346 346 pThis->pIBelowNetR3 = NULL; 347 347 pThis->pIBelowNetR0 = NIL_RTR0PTR; 348 PDM CritSectLeave(&pThis->XmitLock);348 PDMDrvHlpCritSectLeave(pDrvIns, &pThis->XmitLock); 349 349 } 350 350 … … 357 357 PDRVNETSHAPER pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSHAPER); 358 358 LogFlow(("drvNetShaperAttach/#%#x: fFlags=%#x\n", pDrvIns->iInstance, fFlags)); 359 PDM CritSectEnter(&pThis->XmitLock, VERR_IGNORED);359 PDMDrvHlpCritSectEnter(pDrvIns, &pThis->XmitLock, VERR_IGNORED); 360 360 361 361 /* … … 389 389 AssertMsgFailed(("Failed to attach to driver below! rc=%Rrc\n", rc)); 390 390 391 PDM CritSectLeave(&pThis->XmitLock);391 PDMDrvHlpCritSectLeave(pDrvIns, &pThis->XmitLock); 392 392 return VINF_SUCCESS; 393 393 } … … 404 404 PDMDrvHlpNetShaperDetach(pDrvIns, &pThis->Filter); 405 405 406 if (PDM CritSectIsInitialized(&pThis->XmitLock))407 PDM R3CritSectDelete(&pThis->XmitLock);406 if (PDMDrvHlpCritSectIsInitialized(pDrvIns, &pThis->XmitLock)) 407 PDMDrvHlpCritSectDelete(pDrvIns, &pThis->XmitLock); 408 408 } 409 409
Note:
See TracChangeset
for help on using the changeset viewer.