VirtualBox

Changeset 7785 in vbox


Ignore:
Timestamp:
Apr 8, 2008 7:58:25 AM (17 years ago)
Author:
vboxsync
Message:

comment, cosmetics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvTAP.cpp

    r7033 r7785  
    245245static DECLCALLBACK(void) drvTAPNotifyCanReceive(PPDMINETWORKCONNECTOR pInterface)
    246246{
     247#ifdef ASYNC_NET
    247248    PDRVTAP pData = PDMINETWORKCONNECTOR_2_DRVTAP(pInterface);
    248249
     
    262263    if (ASMAtomicXchgU32(&pData->fOutOfSpace, false))
    263264        RTSemEventSignal(pData->EventOutOfSpace);
     265#endif
    264266}
    265267
     
    324326            rc = RT_LIKELY(rc == DLPI_SUCCESS) ? VINF_SUCCESS : SolarisDLPIErr2VBoxErr(rc);
    325327#else
     328            /** @note At least on Linux we will never receive more than one network packet
     329             *        after poll() returned successfully. I don't know why but a second
     330             *        RTFileRead() operation will return with VERR_TRY_AGAIN. */
    326331            rc = RTFileRead(pData->FileDevice, achBuf, sizeof(achBuf), &cbRead);
    327332#endif
     
    353358                    {
    354359                        LogFlow(("drvTAPAsyncIoThread: cbMax=%d cbRead=%d waiting...\n", cbMax, cbRead));
    355 #if 1
    356360                        /* We get signalled by the network driver. 50ms is just for sanity */
    357361                        ASMAtomicXchgU32(&pData->fOutOfSpace, true);
    358362                        RTSemEventWait(pData->EventOutOfSpace, 50);
    359 #else
    360                         RTThreadSleep(1);
    361 #endif
    362363                        cbMax = pData->pPort->pfnCanReceive(pData->pPort);
    363364                    }
     
    378379                pData->u64LastReceiveTS = u64Now;
    379380#endif
    380                 Log2(("drvTAPAsyncIoThread: cbRead=%#x\n"
    381                       "%.*Vhxd\n",
    382                       cbRead, cbRead, achBuf));
     381                Log2(("drvTAPAsyncIoThread: cbRead=%#x\n" "%.*Vhxd\n", cbRead, cbRead, achBuf));
    383382                STAM_COUNTER_INC(&pData->StatPktRecv);
    384383                STAM_COUNTER_ADD(&pData->StatPktRecvBytes, cbRead);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette