Alexandre Julliard : user32: Use the standard Interlocked* functions.
Alexandre Julliard
julliard at winehq.org
Mon May 4 15:49:16 CDT 2020
Module: wine
Branch: master
Commit: 5d5b6a1f35c6fee51dcef60818028061f03ce0ce
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5d5b6a1f35c6fee51dcef60818028061f03ce0ce
Author: Alexandre Julliard <julliard at winehq.org>
Date: Sat May 2 15:10:10 2020 +0200
user32: Use the standard Interlocked* functions.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/hook.c | 2 +-
dlls/user32/input.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/hook.c b/dlls/user32/hook.c
index d3e78bb473..b6a3b3661f 100644
--- a/dlls/user32/hook.c
+++ b/dlls/user32/hook.c
@@ -449,7 +449,7 @@ static LRESULT call_hook( struct hook_info *info, INT code, WPARAM wparam, LPARA
}
if (info->id == WH_KEYBOARD_LL || info->id == WH_MOUSE_LL)
- interlocked_xchg_add( &global_key_state_counter, 1 ); /* force refreshing the key state cache */
+ InterlockedIncrement( &global_key_state_counter ); /* force refreshing the key state cache */
return ret;
}
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 0325e2ce3d..b7cdbd84ef 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -433,7 +433,7 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key )
* (like Adobe Photoshop CS5) expect that changes to the async key state
* are also immediately available in other threads. */
if (prev_key_state != key_state_info->state[key])
- counter = interlocked_xchg_add( &global_key_state_counter, 1 ) + 1;
+ counter = InterlockedIncrement( &global_key_state_counter );
key_state_info->time = GetTickCount();
key_state_info->counter = counter;
More information about the wine-cvs
mailing list