From 6a1667fab428764eeaba38ac9b5cb1813c5cffda Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 21 May 2020 16:03:52 +0200 Subject: [PATCH] kernelbase: Move WaitOnAddress implementation to sync.c. Signed-off-by: Alexandre Julliard --- dlls/kernelbase/main.c | 15 --------------- dlls/kernelbase/sync.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/dlls/kernelbase/main.c b/dlls/kernelbase/main.c index 9aa64739949..f1edf8614e7 100644 --- a/dlls/kernelbase/main.c +++ b/dlls/kernelbase/main.c @@ -200,21 +200,6 @@ BOOL WINAPI QuirkIsEnabled3(void *unk1, void *unk2) return FALSE; } -/*********************************************************************** - * WaitOnAddress (KERNELBASE.@) - */ -BOOL WINAPI WaitOnAddress(volatile void *addr, void *cmp, SIZE_T size, DWORD timeout) -{ - LARGE_INTEGER to; - - if (timeout != INFINITE) - { - to.QuadPart = -(LONGLONG)timeout * 10000; - return set_ntstatus( RtlWaitOnAddress( (const void *)addr, cmp, size, &to )); - } - return set_ntstatus( RtlWaitOnAddress( (const void *)addr, cmp, size, NULL )); -} - HRESULT WINAPI QISearch(void *base, const QITAB *table, REFIID riid, void **obj) { const QITAB *ptr; diff --git a/dlls/kernelbase/sync.c b/dlls/kernelbase/sync.c index c0db4679e9e..6c2242e30d1 100644 --- a/dlls/kernelbase/sync.c +++ b/dlls/kernelbase/sync.c @@ -286,6 +286,22 @@ DWORD WINAPI DECLSPEC_HOTPATCH WaitForMultipleObjectsEx( DWORD count, const HAND } +/*********************************************************************** + * WaitOnAddress (kernelbase.@) + */ +BOOL WINAPI DECLSPEC_HOTPATCH WaitOnAddress( volatile void *addr, void *cmp, SIZE_T size, DWORD timeout ) +{ + LARGE_INTEGER to; + + if (timeout != INFINITE) + { + to.QuadPart = -(LONGLONG)timeout * 10000; + return set_ntstatus( RtlWaitOnAddress( (const void *)addr, cmp, size, &to )); + } + return set_ntstatus( RtlWaitOnAddress( (const void *)addr, cmp, size, NULL )); +} + + /*********************************************************************** * Events ***********************************************************************/