Changeset 59882 in vbox
- Timestamp:
- Mar 1, 2016 10:43:06 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Mouse/NT5/VBoxMFInternal.cpp
r58178 r59882 216 216 KeAcquireSpinLock(&g_ctx.SyncLock, &Irql); 217 217 InsertHeadList(&g_ctx.DevExtList, &pDevExt->ListEntry); 218 if (!g_ctx.pCurrentDevExt) 218 /* g_ctx.pCurrentDevExt must be associated with the i8042prt device. */ 219 if (pDevExt->bHostMouse && !g_ctx.pCurrentDevExt) 219 220 { 220 221 ASMAtomicWritePtr(&g_ctx.pCurrentDevExt, pDevExt); … … 243 244 if (g_ctx.pCurrentDevExt == pDevExt) 244 245 { 246 /* The PS/2 mouse is being removed. Usually never happens. */ 245 247 ObDereferenceObject(pDevExt->pdoSelf); 246 248 g_ctx.pCurrentDevExt = NULL; 247 for (PLIST_ENTRY pCur = g_ctx.DevExtList.Flink; pCur != &g_ctx.DevExtList; pCur = pCur->Flink)248 {249 PVBOXMOUSE_DEVEXT pNewCurDevExt = PVBOXMOUSE_DEVEXT_FROM_LE(pCur);250 ASMAtomicWritePtr(&g_ctx.pCurrentDevExt, pNewCurDevExt);251 /* ensure the object is not deleted while it is being used by a poller thread */252 ObReferenceObject(pNewCurDevExt->pdoSelf);253 break;254 }255 249 } 256 250 … … 347 341 } 348 342 } 349 350 vboxNewProtDeviceAdded(pDevExt);351 343 352 344 if (!vboxIsHostMouseFound()) … … 424 416 } 425 417 } 418 419 /* Finally call the handler, which needs a correct pDevExt->bHostMouse value. */ 420 vboxNewProtDeviceAdded(pDevExt); 421 426 422 LOGF_LEAVE(); 427 423 }
Note:
See TracChangeset
for help on using the changeset viewer.