Changeset 5540 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Oct 27, 2007 12:20:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp
r4777 r5540 339 339 { 340 340 PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pvData; 341 LARGE_INTEGER timeout; 341 342 342 343 dprintf(("VBoxHGCMCallback\n")); 343 344 344 // this code is subject to "lost wakeup" bug 345 // -- malc 345 /* Possible problem with requestion completion right between the fu32Flags check and KeWaitForSingleObject 346 * call; introduce a timeout to make sure we don't wait indefinitely. 347 */ 348 timeout.QuadPart = 250; 349 timeout.QuadPart *= -10000; /* relative in 100ns units */ 350 346 351 while ((pHeader->fu32Flags & VBOX_HGCM_REQ_DONE) == 0) 347 352 { 348 353 /* Specifying UserMode so killing the user process will abort the wait. */ 349 354 NTSTATUS rc = KeWaitForSingleObject (&pDevExt->keventNotification, Executive, 350 UserMode, TRUE, NULL /** @todo &timeout? */355 UserMode, TRUE, &timeout 351 356 ); 352 dprintf(("VBoxHGCMCallback: Wait returned %d\n", rc)); 357 dprintf(("VBoxHGCMCallback: Wait returned %d fu32Flags=%x\n", rc, pHeader->fu32Flags)); 358 359 if (rc == STATUS_TIMEOUT) 360 continue; 353 361 354 362 if (rc != STATUS_WAIT_0)
Note:
See TracChangeset
for help on using the changeset viewer.