VirtualBox

Changeset 24288 in vbox


Ignore:
Timestamp:
Nov 3, 2009 12:53:17 PM (15 years ago)
Author:
vboxsync
Message:

VGA: more critical section protection required

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r24265 r24288  
    49714971    pInterface->pfnUpdateDisplayAll(pInterface);
    49724972
     4973    int rc = PDMCritSectEnter(&pThis->lock, VERR_SEM_BUSY);
     4974    AssertRC(rc);
     4975
    49734976    /*
    49744977     * Validate the buffer size.
     
    49784981    {
    49794982        Log(("vgaPortSnapshot: %d bytes are required, a buffer of %d bytes is profiled.\n", cbRequired, cbData));
     4983        PDMCritSectLeave(&pThis->lock);
    49804984        return VERR_BUFFER_OVERFLOW;
    49814985    }
     
    50065010     * That is if display is blanked, we expect a black screen in the external buffer.
    50075011     */
    5008     int rc = vga_update_display(pThis, false);
     5012    rc = vga_update_display(pThis, false);
    50095013
    50105014    /* restore */
     
    50125016    pThis->graphic_mode = graphic_mode;
    50135017    pThis->fRenderVRAM = fRenderVRAM;
     5018    PDMCritSectLeave(&pThis->lock);
    50145019
    50155020    if (rc != VINF_SUCCESS)
     
    50475052    PDMDEV_ASSERT_EMT(VGASTATE2DEVINS(pThis));
    50485053    LogFlow(("vgaPortDisplayBlt: pvData=%p x=%d y=%d cx=%d cy=%d\n", pvData, x, y, cx, cy));
     5054
     5055    rc = PDMCritSectEnter(&pThis->lock, VERR_SEM_BUSY);
     5056    AssertRC(rc);
    50495057
    50505058    /*
     
    51105118        rc = VERR_INVALID_PARAMETER;
    51115119
     5120    PDMCritSectLeave(&pThis->lock);
     5121
    51125122    LogFlow(("vgaPortDisplayBlt: returns %Rrc\n", rc));
    51135123    return rc;
     
    51495159    }
    51505160
     5161    int rc = PDMCritSectEnter(&s->lock, VERR_SEM_BUSY);
     5162    AssertRC(rc);
     5163
    51515164    /* Correct negative x and y coordinates. */
    51525165    if (x < 0)
     
    51965209        LogFlow(("vgaPortUpdateDisplayRect: nothing to do: %dx%d\n", w, h));
    51975210#endif /* DEBUG_sunlover */
     5211        PDMCritSectLeave(&s->lock);
    51985212        return;
    51995213    }
     
    52595273        pu8Src += cbLineSrc;
    52605274    }
     5275    PDMCritSectLeave(&s->lock);
    52615276
    52625277#ifdef DEBUG_sunlover
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