Changeset 5707 in vbox for trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp
- Timestamp:
- Nov 12, 2007 2:35:27 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp
r5606 r5707 339 339 { 340 340 PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pvData; 341 LARGE_INTEGER timeout;341 PLARGE_INTEGER pTimeout; 342 342 343 343 dprintf(("VBoxHGCMCallback\n")); … … 346 346 * call; introduce a timeout to make sure we don't wait indefinitely. 347 347 */ 348 timeout.QuadPart = 250; 349 timeout.QuadPart *= -10000; /* relative in 100ns units */ 348 pTimeout = (PLARGE_INTEGER)VbglPhysHeapAlloc(sizeof(LARGE_INTEGER)); 349 Assert(pTimeout); 350 if (!pTimeout) 351 return; 352 353 pTimeout->QuadPart = 250; 354 pTimeout->QuadPart *= -10000; /* relative in 100ns units */ 355 350 356 351 357 while ((pHeader->fu32Flags & VBOX_HGCM_REQ_DONE) == 0) 352 358 { 359 /* Specifying UserMode so killing the user process will abort the wait. */ 353 360 NTSTATUS rc = KeWaitForSingleObject (&pDevExt->keventNotification, Executive, 354 KernelMode, TRUE, &timeout361 UserMode, TRUE, pTimeout 355 362 ); 356 363 dprintf(("VBoxHGCMCallback: Wait returned %d fu32Flags=%x\n", rc, pHeader->fu32Flags)); … … 367 374 dprintf(("VBoxHGCMCallback: fu32Flags = %08X\n", pHeader->fu32Flags)); 368 375 } 369 376 VbglPhysHeapFree(pTimeout); 370 377 return; 371 378 }
Note:
See TracChangeset
for help on using the changeset viewer.