mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[WIN32SS:ENG/NTUSER] Use shared locks for display list lookups (#9090)
- Use shared locks for the display device and PDEV lookup paths. These functions only walk existing lists and take references, while list updates and mode-switch paths still use exclusive locking. This avoids serializing read-only display queries unnecessarily. - Use shared locks for other read-only NtUser calls.
This commit is contained in:
@@ -803,7 +803,7 @@ EngpFindGraphicsDevice(
|
||||
pustrDevice, iDevNum);
|
||||
|
||||
/* Lock list */
|
||||
EngAcquireSemaphore(ghsemGraphicsDeviceList);
|
||||
EngAcquireSemaphoreShared(ghsemGraphicsDeviceList);
|
||||
|
||||
if (pustrDevice && pustrDevice->Buffer)
|
||||
{
|
||||
|
||||
@@ -805,7 +805,7 @@ EngpGetPDEV(
|
||||
ULONG i;
|
||||
|
||||
/* Acquire PDEV lock */
|
||||
EngAcquireSemaphore(ghsemPDEV);
|
||||
EngAcquireSemaphoreShared(ghsemPDEV);
|
||||
|
||||
/* Did the caller pass a device name? */
|
||||
if (pustrDeviceName)
|
||||
|
||||
Reference in New Issue
Block a user