Module: wine Branch: master Commit: 7af93f497c3e71f69511743f42b86b2ef5e13b32 URL: https://source.winehq.org/git/wine.git/?a=commit;h=7af93f497c3e71f69511743f4...
Author: Piotr Caban piotr@codeweavers.com Date: Mon Apr 25 18:34:31 2022 +0200
msvcrt: Use TICKSPERMSEC define in concurrency functions.
Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/msvcrt/concurrency.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index f9a7f489ceb..c26478f36cd 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -1944,8 +1944,8 @@ bool __thiscall critical_section_try_lock_for(
last->next = q; GetSystemTimeAsFileTime(&ft); - to.QuadPart = ((LONGLONG)ft.dwHighDateTime<<32) + - ft.dwLowDateTime + (LONGLONG)timeout*10000; + to.QuadPart = ((LONGLONG)ft.dwHighDateTime << 32) + + ft.dwLowDateTime + (LONGLONG)timeout * TICKSPERMSEC; status = NtWaitForKeyedEvent(keyed_event, q, 0, &to); if(status == STATUS_TIMEOUT) { if(!InterlockedExchange(&q->free, TRUE)) @@ -2128,7 +2128,7 @@ unsigned int __cdecl _GetConcurrency(void) static inline PLARGE_INTEGER evt_timeout(PLARGE_INTEGER pTime, unsigned int timeout) { if(timeout == COOPERATIVE_TIMEOUT_INFINITE) return NULL; - pTime->QuadPart = (ULONGLONG)timeout * -10000; + pTime->QuadPart = (ULONGLONG)timeout * -TICKSPERMSEC; return pTime; }
@@ -2396,7 +2396,7 @@ bool __thiscall _Condition_variable_wait_for(_Condition_variable *this,
GetSystemTimeAsFileTime(&ft); to.QuadPart = ((LONGLONG)ft.dwHighDateTime << 32) + - ft.dwLowDateTime + (LONGLONG)timeout * 10000; + ft.dwLowDateTime + (LONGLONG)timeout * TICKSPERMSEC; while (q->next != CV_WAKE) { status = RtlWaitOnAddress(&q->next, &next, sizeof(next), &to); if(status == STATUS_TIMEOUT) {