Changeset 25111 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Nov 30, 2009 2:20:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r25110 r25111 241 241 { 242 242 rc = RTCritSectEnter(&pThis->csEventRecv); 243 AssertR eleaseRC(rc);243 AssertRC(rc); 244 244 RTReqProcess(pThis->pRecvReqQueue, 0); 245 245 rc = RTCritSectLeave(&pThis->csEventRecv); 246 AssertR eleaseRC(rc);246 AssertRC(rc); 247 247 if (ASMAtomicReadU32(&pThis->cPkt) == 0) 248 248 { … … 261 261 { 262 262 rc = RTCritSectEnter(&pThis->csEventRecv); 263 AssertR eleaseRC(rc);263 AssertRC(rc); 264 264 rc = RTSemEventSignal(pThis->EventRecv); 265 AssertR eleaseRC(rc);265 AssertRC(rc); 266 266 rc = RTCritSectLeave(&pThis->csEventRecv); 267 267 } … … 282 282 int rc; 283 283 rc = RTCritSectEnter(&pThis->csEventUrgRecv); 284 AssertR eleaseRC(rc);284 AssertRC(rc); 285 285 RTReqProcess(pThis->pUrgRecvReqQueue, 0); 286 286 rc = RTCritSectLeave(&pThis->csEventUrgRecv); 287 AssertR eleaseRC(rc);287 AssertRC(rc); 288 288 if (ASMAtomicReadU32(&pThis->cUrgPkt) == 0) 289 289 { 290 290 rc = RTSemEventWait(pThis->EventUrgRecv, RT_INDEFINITE_WAIT); 291 AssertR eleaseRC(rc);291 AssertRC(rc); 292 292 } 293 293 } … … 301 301 int rc; 302 302 rc = RTCritSectEnter(&pThis->csEventUrgRecv); 303 AssertR eleaseRC(rc);303 AssertRC(rc); 304 304 rc = RTSemEventSignal(pThis->EventUrgRecv); 305 AssertR eleaseRC(rc);305 AssertRC(rc); 306 306 rc = RTCritSectLeave(&pThis->csEventUrgRecv); 307 AssertR eleaseRC(rc);307 AssertRC(rc); 308 308 } 309 309 … … 314 314 { 315 315 int rc = RTCritSectEnter(&pThis->csDevAccess); 316 AssertR eleaseRC(rc);316 AssertRC(rc); 317 317 rc = pThis->pPort->pfnWaitReceiveAvail(pThis->pPort, RT_INDEFINITE_WAIT); 318 318 if (RT_SUCCESS(rc)) 319 319 { 320 320 rc = pThis->pPort->pfnReceive(pThis->pPort, pu8Buf, cb); 321 AssertR eleaseRC(rc);321 AssertRC(rc); 322 322 } 323 323 else if ( RT_FAILURE(rc) … … 325 325 && rc == VERR_INTERRUPTED)) 326 326 { 327 AssertR eleaseRC(rc);327 AssertRC(rc); 328 328 } 329 329 330 330 rc = RTCritSectLeave(&pThis->csDevAccess); 331 AssertR eleaseRC(rc);331 AssertRC(rc); 332 332 333 333 slirp_ext_m_free(pThis->pNATState, pvArg); … … 350 350 { 351 351 rc = RTCritSectLeave(&pThis->csEventRecv); 352 AssertR eleaseRC(rc);352 AssertRC(rc); 353 353 rc = RTSemEventWait(pThis->EventRecv, RT_INDEFINITE_WAIT); 354 354 if ( RT_FAILURE(rc) … … 357 357 goto done_unlocked; 358 358 rc = RTCritSectEnter(&pThis->csEventRecv); 359 AssertR eleaseRC(rc);359 AssertRC(rc); 360 360 } 361 361 … … 366 366 { 367 367 rc = pThis->pPort->pfnReceive(pThis->pPort, pu8Buf, cb); 368 AssertR eleaseRC(rc);368 AssertRC(rc); 369 369 } 370 370 else if ( RT_FAILURE(rc) … … 372 372 && rc != VERR_INTERRUPTED)) 373 373 { 374 AssertR eleaseRC(rc);374 AssertRC(rc); 375 375 } 376 376 377 377 rc = RTCritSectLeave(&pThis->csDevAccess); 378 AssertR eleaseRC(rc);378 AssertRC(rc); 379 379 done_unlocked: 380 380 slirp_ext_m_free(pThis->pNATState, pvArg); … … 428 428 rc = RTReqAlloc((PRTREQQUEUE)slirp_get_queue(pThis->pNATState), &pReq, RTREQTYPE_INTERNAL); 429 429 #endif 430 AssertR eleaseRC(rc);430 AssertRC(rc); 431 431 432 432 /* @todo: Here we should get mbuf instead temporal buffer */ … … 452 452 453 453 rc = RTReqQueue(pReq, 0); /* don't wait, we have to wakeup the NAT thread fist */ 454 AssertR eleaseRC(rc);454 AssertRC(rc); 455 455 drvNATNotifyNATThread(pThis); 456 456 LogFlow(("drvNATSend: end\n")); … … 472 472 rc = WSASetEvent(pThis->hWakeupEvent); 473 473 #endif 474 AssertR eleaseRC(rc);474 AssertRC(rc); 475 475 } 476 476 … … 539 539 540 540 int rc = RTReqAlloc(pThis->pSlirpReqQueue, &pReq, RTREQTYPE_INTERNAL); 541 AssertR eleaseRC(rc);541 AssertRC(rc); 542 542 pReq->u.Internal.pfn = (PFNRT)drvNATNotifyLinkChangedWorker; 543 543 pReq->u.Internal.cArgs = 2; … … 550 550 drvNATNotifyNATThread(pThis); 551 551 rc = RTReqWait(pReq, RT_INDEFINITE_WAIT); 552 AssertR eleaseRC(rc);552 AssertRC(rc); 553 553 } 554 554 else 555 AssertR eleaseRC(rc);555 AssertRC(rc); 556 556 RTReqFree(pReq); 557 557 } … … 673 673 int error = WSAGetLastError(); 674 674 LogRel(("NAT: WSAWaitForMultipleEvents returned %d (error %d)\n", event, error)); 675 RTAssert ReleasePanic();675 RTAssertPanic(); 676 676 } 677 677 … … 784 784 785 785 int rc = RTReqAlloc(pThis->pUrgRecvReqQueue, &pReq, RTREQTYPE_INTERNAL); 786 AssertR eleaseRC(rc);786 AssertRC(rc); 787 787 ASMAtomicIncU32(&pThis->cUrgPkt); 788 788 pReq->u.Internal.pfn = (PFNRT)drvNATUrgRecvWorker; … … 794 794 pReq->fFlags = RTREQFLAGS_VOID|RTREQFLAGS_NO_WAIT; 795 795 rc = RTReqQueue(pReq, 0); 796 AssertR eleaseRC(rc);796 AssertRC(rc); 797 797 drvNATUrgRecvWakeup(pThis->pDrvIns, pThis->pUrgRecvThread); 798 798 } … … 816 816 817 817 int rc = RTReqAlloc(pThis->pRecvReqQueue, &pReq, RTREQTYPE_INTERNAL); 818 AssertR eleaseRC(rc);818 AssertRC(rc); 819 819 ASMAtomicIncU32(&pThis->cPkt); 820 820 pReq->u.Internal.pfn = (PFNRT)drvNATRecvWorker; … … 826 826 pReq->fFlags = RTREQFLAGS_VOID|RTREQFLAGS_NO_WAIT; 827 827 rc = RTReqQueue(pReq, 0); 828 AssertR eleaseRC(rc);828 AssertRC(rc); 829 829 drvNATRecvWakeup(pThis->pDrvIns, pThis->pRecvThread); 830 830 STAM_COUNTER_INC(&pThis->StatQueuePktSent); … … 1163 1163 rc = PDMDrvHlpPDMThreadCreate(pDrvIns, &pThis->pRecvThread, pThis, drvNATRecv, 1164 1164 drvNATRecvWakeup, 128 * _1K, RTTHREADTYPE_IO, "NATRX"); 1165 AssertR eleaseRC(rc);1165 AssertRC(rc); 1166 1166 rc = RTSemEventCreate(&pThis->EventRecv); 1167 1167 1168 1168 rc = PDMDrvHlpPDMThreadCreate(pDrvIns, &pThis->pUrgRecvThread, pThis, drvNATUrgRecv, 1169 1169 drvNATUrgRecvWakeup, 128 * _1K, RTTHREADTYPE_IO, "NATURGRX"); 1170 AssertR eleaseRC(rc);1170 AssertRC(rc); 1171 1171 rc = RTSemEventCreate(&pThis->EventRecv); 1172 1172 rc = RTSemEventCreate(&pThis->EventUrgRecv); … … 1200 1200 rc = PDMDrvHlpPDMThreadCreate(pDrvIns, &pThis->pSlirpThread, pThis, drvNATAsyncIoThread, 1201 1201 drvNATAsyncIoWakeup, 128 * _1K, RTTHREADTYPE_IO, "NAT"); 1202 AssertR eleaseRC(rc);1202 AssertRC(rc); 1203 1203 1204 1204 #ifdef VBOX_WITH_SLIRP_MT 1205 1205 rc = PDMDrvHlpPDMThreadCreate(pDrvIns, &pThis->pGuestThread, pThis, drvNATAsyncIoGuest, 1206 1206 drvNATAsyncIoGuestWakeup, 128 * _1K, RTTHREADTYPE_IO, "NATGUEST"); 1207 AssertR eleaseRC(rc);1207 AssertRC(rc); 1208 1208 #endif 1209 1209
Note:
See TracChangeset
for help on using the changeset viewer.