[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:
Ahmed Arif
2026-06-26 14:07:15 +02:00
committed by GitHub
parent a45e91cb3d
commit 6e95a132bd
6 changed files with 34 additions and 8 deletions
+1 -1
View File
@@ -803,7 +803,7 @@ EngpFindGraphicsDevice(
pustrDevice, iDevNum);
/* Lock list */
EngAcquireSemaphore(ghsemGraphicsDeviceList);
EngAcquireSemaphoreShared(ghsemGraphicsDeviceList);
if (pustrDevice && pustrDevice->Buffer)
{
+1 -1
View File
@@ -805,7 +805,7 @@ EngpGetPDEV(
ULONG i;
/* Acquire PDEV lock */
EngAcquireSemaphore(ghsemPDEV);
EngAcquireSemaphoreShared(ghsemPDEV);
/* Did the caller pass a device name? */
if (pustrDeviceName)