VirtualBox

Changeset 7833 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 9, 2008 12:43:55 PM (17 years ago)
Author:
vboxsync
Message:

added missing function

File:
1 edited

Legend:

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

    r7831 r7833  
    242242}
    243243
     244
     245/**
     246 * Unblock the send thread so it can respond to a state change.
     247 *
     248 * @returns VBox status code.
     249 * @param   pDevIns     The pcnet device instance.
     250 * @param   pThread     The send thread.
     251 */
     252static DECLCALLBACK(int) drvTAPW32AsyncIoWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
     253{
     254    /** @todo this isn't a safe method to notify the async thread; it might be using the instance
     255     *        data after we've been destroyed; could wait for it to terminate, but that's not
     256     *        without risks either.
     257     */
     258    SetEvent(pData->hHaltAsyncEventSem);
     259
     260    /* Yield or else our async thread will never acquire the event semaphore */
     261    RTThreadSleep(16);
     262    /* Wait for the async thread to quit; up to half a second */
     263    WaitForSingleObject(pData->hHaltAsyncEventSem, 500);
     264}
     265
    244266/**
    245267 * Queries an interface to the driver.
     
    282304
    283305    LogFlow(("drvTAPW32Destruct\n"));
    284 
    285     /** @todo this isn't a safe method to notify the async thread; it might be using the instance
    286      *        data after we've been destroyed; could wait for it to terminate, but that's not
    287      *        without risks either.
    288      */
    289     SetEvent(pData->hHaltAsyncEventSem);
    290 
    291     /* Yield or else our async thread will never acquire the event semaphore */
    292     RTThreadSleep(16);
    293     /* Wait for the async thread to quit; up to half a second */
    294     WaitForSingleObject(pData->hHaltAsyncEventSem, 500);
    295306
    296307    mediastatus.fConnect = FALSE;
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