Index: /trunk/src/VBox/Devices/Network/DrvIntNet.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DrvIntNet.cpp	(revision 90329)
+++ /trunk/src/VBox/Devices/Network/DrvIntNet.cpp	(revision 90330)
@@ -292,5 +292,5 @@
 DECLINLINE(int) drvIntNetProcessXmit(PDRVINTNET pThis)
 {
-    Assert(PDMCritSectIsOwner(&pThis->XmitLock));
+    Assert(PDMDrvHlpCritSectIsOwner(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock));
 
 #ifdef IN_RING3
@@ -325,5 +325,5 @@
 #endif
 
-    int rc = PDMCritSectTryEnter(&pThis->XmitLock);
+    int rc = PDMDrvHlpCritSectTryEnter(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock);
     if (RT_SUCCESS(rc))
     {
@@ -367,5 +367,5 @@
     int         rc    = VINF_SUCCESS;
     Assert(cbMin < UINT32_MAX / 2);
-    Assert(PDMCritSectIsOwner(&pThis->XmitLock));
+    Assert(PDMDrvHlpCritSectIsOwner(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock));
 
     /*
@@ -468,5 +468,5 @@
     Assert(   pHdr->u8Type == INTNETHDR_TYPE_FRAME
            || pHdr->u8Type == INTNETHDR_TYPE_GSO);
-    Assert(PDMCritSectIsOwner(&pThis->XmitLock));
+    Assert(PDMDrvHlpCritSectIsOwner(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock));
 
     /** @todo LATER: try unalloc the frame. */
@@ -495,5 +495,5 @@
     Assert(pSgBuf->fFlags == (PDMSCATTERGATHER_FLAGS_MAGIC | PDMSCATTERGATHER_FLAGS_OWNER_1));
     Assert(pSgBuf->cbUsed <= pSgBuf->cbAvailable);
-    Assert(PDMCritSectIsOwner(&pThis->XmitLock));
+    Assert(PDMDrvHlpCritSectIsOwner(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock));
 
     if (pSgBuf->pvUser)
@@ -528,5 +528,5 @@
     PDRVINTNET pThis = RT_FROM_MEMBER(pInterface, DRVINTNET, CTX_SUFF(INetworkUp));
     ASMAtomicUoWriteBool(&pThis->fXmitOnXmitThread, false);
-    PDMCritSectLeave(&pThis->XmitLock);
+    PDMDrvHlpCritSectLeave(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock);
 }
 
@@ -606,7 +606,7 @@
         {
             STAM_REL_COUNTER_INC(&pThis->StatXmitProcessRing);
-            PDMCritSectEnter(&pThis->XmitLock, VERR_IGNORED);
+            PDMDrvHlpCritSectEnter(pDrvIns, &pThis->XmitLock, VERR_IGNORED);
             drvIntNetProcessXmit(pThis);
-            PDMCritSectLeave(&pThis->XmitLock);
+            PDMDrvHlpCritSectLeave(pDrvIns, &pThis->XmitLock);
         }
 
@@ -616,7 +616,7 @@
         {
             STAM_REL_COUNTER_INC(&pThis->StatXmitProcessRing);
-            PDMCritSectEnter(&pThis->XmitLock, VERR_IGNORED);
+            PDMDrvHlpCritSectEnter(pDrvIns, &pThis->XmitLock, VERR_IGNORED);
             drvIntNetProcessXmit(pThis);
-            PDMCritSectLeave(&pThis->XmitLock);
+            PDMDrvHlpCritSectLeave(pDrvIns, &pThis->XmitLock);
         }
 
@@ -1273,6 +1273,6 @@
     pThis->hSgCache = NIL_RTMEMCACHE;
 
-    if (PDMCritSectIsInitialized(&pThis->XmitLock))
-        PDMR3CritSectDelete(&pThis->XmitLock);
+    if (PDMDrvHlpCritSectIsInitialized(pDrvIns, &pThis->XmitLock))
+        PDMDrvHlpCritSectDelete(pDrvIns, &pThis->XmitLock);
 }
 
Index: /trunk/src/VBox/Devices/Network/DrvNetShaper.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DrvNetShaper.cpp	(revision 90329)
+++ /trunk/src/VBox/Devices/Network/DrvNetShaper.cpp	(revision 90330)
@@ -108,5 +108,5 @@
     if (RT_UNLIKELY(!pThis->CTX_SUFF(pIBelowNet)))
     {
-        int rc = PDMCritSectTryEnter(&pThis->XmitLock);
+        int rc = PDMDrvHlpCritSectTryEnter(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock);
         if (RT_UNLIKELY(rc == VERR_SEM_BUSY))
             rc = VERR_TRY_AGAIN;
@@ -179,5 +179,5 @@
         pThis->CTX_SUFF(pIBelowNet)->pfnEndXmit(pThis->CTX_SUFF(pIBelowNet));
     else
-        PDMCritSectLeave(&pThis->XmitLock);
+        PDMDrvHlpCritSectLeave(pThis->CTX_SUFF(pDrvIns), &pThis->XmitLock);
 }
 
@@ -343,8 +343,8 @@
 
     LogFlow(("drvNetShaperDetach: pDrvIns: %p, fFlags: %u\n", pDrvIns, fFlags));
-    PDMCritSectEnter(&pThis->XmitLock, VERR_IGNORED);
+    PDMDrvHlpCritSectEnter(pDrvIns, &pThis->XmitLock, VERR_IGNORED);
     pThis->pIBelowNetR3 = NULL;
     pThis->pIBelowNetR0 = NIL_RTR0PTR;
-    PDMCritSectLeave(&pThis->XmitLock);
+    PDMDrvHlpCritSectLeave(pDrvIns, &pThis->XmitLock);
 }
 
@@ -357,5 +357,5 @@
     PDRVNETSHAPER pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSHAPER);
     LogFlow(("drvNetShaperAttach/#%#x: fFlags=%#x\n", pDrvIns->iInstance, fFlags));
-    PDMCritSectEnter(&pThis->XmitLock, VERR_IGNORED);
+    PDMDrvHlpCritSectEnter(pDrvIns, &pThis->XmitLock, VERR_IGNORED);
 
     /*
@@ -389,5 +389,5 @@
         AssertMsgFailed(("Failed to attach to driver below! rc=%Rrc\n", rc));
 
-    PDMCritSectLeave(&pThis->XmitLock);
+    PDMDrvHlpCritSectLeave(pDrvIns, &pThis->XmitLock);
     return VINF_SUCCESS;
 }
@@ -404,6 +404,6 @@
     PDMDrvHlpNetShaperDetach(pDrvIns, &pThis->Filter);
 
-    if (PDMCritSectIsInitialized(&pThis->XmitLock))
-        PDMR3CritSectDelete(&pThis->XmitLock);
+    if (PDMDrvHlpCritSectIsInitialized(pDrvIns, &pThis->XmitLock))
+        PDMDrvHlpCritSectDelete(pDrvIns, &pThis->XmitLock);
 }
 
