VirtualBox

Changeset 238 in vbox for trunk/src


Ignore:
Timestamp:
Jan 23, 2007 1:33:33 PM (18 years ago)
Author:
vboxsync
Message:

Keep the framebuffer locked during resizing

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp

    r146 r238  
    140140    {
    141141        LogFlow(("VMDisplay::handleDisplayResize: external framebuffer wants us to wait!\n"));
     142
     143        /* Note: The previously obtained framebuffer lock must be preserved.
     144         *       The EMT keeps the framebuffer lock until the resize process completes.
     145         */
     146
    142147        /// @todo is this compatible with VBOX_NEXT_STEP?
    143148        // the framebuffer needs more time to process
    144149        // the event so we have to halt the VM until it's done
    145150        RTSemEventMultiReset(mResizeSem);
    146         mFramebuffer->Unlock();
    147151        RTSemEventMultiWait(mResizeSem, RT_INDEFINITE_WAIT);
    148         mFramebuffer->Lock();
    149152    }
    150153
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r1 r238  
    200200        LogFlowFunc (("External framebuffer wants us to wait!\n"));
    201201
     202        /* Note: The previously obtained framebuffer lock is preserved.
     203         *       The EMT keeps the lock until the resize process completes.
     204         */
     205       
    202206        /* The framebuffer needs more time to process
    203207         * the event so we have to halt the VM until it's done.
    204208         */
    205209        RTSemEventMultiReset(mResizeSem);
    206         mFramebuffer->Unlock();
    207210        RTSemEventMultiWait(mResizeSem, RT_INDEFINITE_WAIT); /** @todo r=bird: this is a serious deadlock point, where EMT is stuck while the main thread is doing VMR3Req for some reason. */
    208         mFramebuffer->Lock();
    209211    }
    210212}
     
    15401542                "for external framebuffers"));
    15411543
    1542     mFramebuffer->Lock();
    15431544    /* signal our semaphore */
    15441545    RTSemEventMultiSignal(mResizeSem);
    1545     mFramebuffer->Unlock();
    15461546
    15471547    return S_OK;
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r235 r238  
    55015501                The caller checks if the call was successful
    55025502                via IFramebuffer property 'PixelFormat'.
     5503
     5504                Note: The method is called by IDisplay under the Framebuffer lock.
    55035505            </desc>
    55045506            <param name="pixelFormat" type="FramebufferPixelFormat" dir="in">
Note: See TracChangeset for help on using the changeset viewer.

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