VirtualBox

Changeset 41643 in vbox


Ignore:
Timestamp:
Jun 11, 2012 10:43:28 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
78443
Message:

VBoxGuest: Drop duplicate mouse callback data, fix member names and add a comment.

Location:
trunk/src/VBox/Additions/common/VBoxGuest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp

    r41642 r41643  
    962962 * @param   pContext    Context specific pointer.
    963963 */
    964 void vboxguestwinDpcHandler(PKDPC pDPC, PDEVICE_OBJECT pDevObj,
    965                             PIRP pIrp, PVOID pContext)
     964void vboxguestwinDpcHandler(PKDPC pDPC, PDEVICE_OBJECT pDevObj, PIRP pIrp, PVOID pContext)
    966965{
    967966    PVBOXGUESTDEVEXT pDevExt = (PVBOXGUESTDEVEXT)pDevObj->DeviceExtension;
     
    971970    if (ASMAtomicXchgU32(&pDevExt->u32MousePosChangedSeq, 0))
    972971    {
    973         Assert(KeGetCurrentIrql() == DISPATCH_LEVEL);
    974972        /* we need a lock here to avoid concurrency with the set event ioctl handler thread,
    975973         * i.e. to prevent the event from destroyed while we're using it */
     974        Assert(KeGetCurrentIrql() == DISPATCH_LEVEL);
    976975        KeAcquireSpinLockAtDpcLevel(&pDevExt->win.s.MouseEventAccessLock);
    977         if (pDevExt->win.s.pfnMouseNotify)
    978         {
    979             pDevExt->win.s.pfnMouseNotify(pDevExt->win.s.pvMouseNotify);
    980         }
     976
     977        if (pDevExt->MouseNotifyCallback.pfnNotify)
     978            pDevExt->MouseNotifyCallback.pfnNotify(pDevExt->MouseNotifyCallback.pvUser);
     979
    981980        KeReleaseSpinLockFromDpcLevel(&pDevExt->win.s.MouseEventAccessLock);
    982981    }
    983982
    984983    /* Process the wake-up list we were asked by the scheduling a DPC
    985      *  in vboxguestwinIsrHandler(). */
     984     * in vboxguestwinIsrHandler(). */
    986985    VBoxGuestWaitDoWakeUps(pDevExt);
    987986}
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.h

    r38760 r41643  
    117117    PVBOXGUESTSESSION pKernelSession;
    118118
    119 
     119    /** Spinlock protecting MouseNotifyCallback. Required since the consumer is
     120     *  in a DPC callback and not the ISR. */
    120121    KSPIN_LOCK MouseEventAccessLock;
    121     PFNVBOXMOUSENOTIFYCB pfnMouseNotify;
    122     void *pvMouseNotify;
    123122} VBOXGUESTDEVEXTWIN, *PVBOXGUESTDEVEXTWIN;
    124123
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette