Changeset 20659 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Jun 17, 2009 10:34:40 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp
r20374 r20659 415 415 416 416 #ifdef VBOX_WITH_HGCM 417 void VBoxHGCMCallbackWorker (VMMDevHGCMRequestHeader *pHeader, PVBOXGUESTDEVEXT pDevExt,418 uint32_t u32Timeout, bool fInterruptible)417 static void VBoxHGCMCallbackWorker (VMMDevHGCMRequestHeader *pHeader, PVBOXGUESTDEVEXT pDevExt, 418 uint32_t u32Timeout, bool fInterruptible, KPROCESSOR_MODE ProcessorMode) 419 419 { 420 420 /* Possible problem with request completion right between the fu32Flags check and KeWaitForSingleObject … … 434 434 /* Specifying UserMode so killing the user process will abort the wait. */ 435 435 NTSTATUS rc = KeWaitForSingleObject (&pDevExt->keventNotification, Executive, 436 UserMode,436 ProcessorMode, 437 437 fInterruptible ? TRUE : FALSE, /* Alertable */ 438 438 &timeout … … 459 459 460 460 dprintf(("VBoxHGCMCallback\n")); 461 VBoxHGCMCallbackWorker (pHeader, pDevExt, u32Data, false); 461 VBoxHGCMCallbackWorker (pHeader, pDevExt, u32Data, false, UserMode); 462 } 463 464 DECLVBGL(void) VBoxHGCMCallbackKernelMode (VMMDevHGCMRequestHeader *pHeader, void *pvData, uint32_t u32Data) 465 { 466 PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pvData; 467 468 dprintf(("VBoxHGCMCallback\n")); 469 VBoxHGCMCallbackWorker (pHeader, pDevExt, u32Data, false, KernelMode); 462 470 } 463 471 … … 468 476 469 477 dprintf(("VBoxHGCMCallbackInterruptible\n")); 470 VBoxHGCMCallbackWorker (pHeader, pDevExt, u32Data, true );478 VBoxHGCMCallbackWorker (pHeader, pDevExt, u32Data, true, UserMode); 471 479 } 472 480 … … 1010 1018 dprintf(("a) ptr->u32ClientID = %d\n", ptr->u32ClientID)); 1011 1019 1012 int rc = VbglHGCMConnect (ptr, VBoxHGCMCallback, pDevExt, RT_INDEFINITE_WAIT);1020 int rc = VbglHGCMConnect (ptr, pIrp->RequestorMode == KernelMode? VBoxHGCMCallbackKernelMode :VBoxHGCMCallback, pDevExt, RT_INDEFINITE_WAIT); 1013 1021 1014 1022 dprintf(("b) ptr->u32ClientID = %d\n", ptr->u32ClientID)); … … 1054 1062 Info.result = 0; 1055 1063 Info.u32ClientID = ptr->u32ClientID; 1056 VbglHGCMDisconnect(&Info, VBoxHGCMCallback, pDevExt, RT_INDEFINITE_WAIT);1064 VbglHGCMDisconnect(&Info, pIrp->RequestorMode == KernelMode? VBoxHGCMCallbackKernelMode :VBoxHGCMCallback, pDevExt, RT_INDEFINITE_WAIT); 1057 1065 Status = STATUS_UNSUCCESSFUL; 1058 1066 break; … … 1133 1141 */ 1134 1142 1135 int rc = VbglHGCMDisconnect (ptr, VBoxHGCMCallback, pDevExt, RT_INDEFINITE_WAIT);1143 int rc = VbglHGCMDisconnect (ptr, pIrp->RequestorMode == KernelMode? VBoxHGCMCallbackKernelMode :VBoxHGCMCallback, pDevExt, RT_INDEFINITE_WAIT); 1136 1144 1137 1145 if (RT_FAILURE(rc)) … … 1182 1190 VBoxGuestHGCMCallInfo *ptr = (VBoxGuestHGCMCallInfo *)pBuf; 1183 1191 1184 rc = VbglHGCMCall32(ptr, VBoxHGCMCallback, pDevExt, RT_INDEFINITE_WAIT);1192 rc = VbglHGCMCall32(ptr, pIrp->RequestorMode == KernelMode? VBoxHGCMCallbackKernelMode :VBoxHGCMCallback, pDevExt, RT_INDEFINITE_WAIT); 1185 1193 1186 1194 if (RT_FAILURE(rc)) … … 1214 1222 VBoxGuestHGCMCallInfo *ptr = (VBoxGuestHGCMCallInfo *)pBuf; 1215 1223 1216 rc = VbglHGCMCall (ptr, VBoxHGCMCallback, pDevExt, RT_INDEFINITE_WAIT);1224 rc = VbglHGCMCall (ptr, pIrp->RequestorMode == KernelMode? VBoxHGCMCallbackKernelMode :VBoxHGCMCallback, pDevExt, RT_INDEFINITE_WAIT); 1217 1225 1218 1226 if (RT_FAILURE(rc)) … … 1230 1238 case VBOXGUEST_IOCTL_HGCM_CALL_TIMED(0): /* (The size isn't relevant on NT.) */ 1231 1239 { 1240 /* This IOCTL is not used by shared folders, so VBoxHGCMCallbackKernelMode is not used. */ 1232 1241 dprintf(("VBoxGuest::VBoxGuestDeviceControl: VBOXGUEST_IOCTL_HGCM_CALL_TIMED\n")); 1233 1242
Note:
See TracChangeset
for help on using the changeset viewer.