Changeset 7833 in vbox for trunk/src/VBox
- Timestamp:
- Apr 9, 2008 12:43:55 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvTAPWin32.cpp
r7831 r7833 242 242 } 243 243 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 */ 252 static 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 244 266 /** 245 267 * Queries an interface to the driver. … … 282 304 283 305 LogFlow(("drvTAPW32Destruct\n")); 284 285 /** @todo this isn't a safe method to notify the async thread; it might be using the instance286 * data after we've been destroyed; could wait for it to terminate, but that's not287 * 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);295 306 296 307 mediastatus.fConnect = FALSE;
Note:
See TracChangeset
for help on using the changeset viewer.