[Wine-patches] kernel32: Call __wine_get_shared_time only once.

Alexander Morozov =?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Пн Апр 27 18:23:40 MSD 2009


----------- следующая часть -----------
From 95a41109dc3a6c484b684f840e0cd12b1f39c0fe Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Mon, 27 Apr 2009 18:16:03 +0400
Subject: [PATCH] kernel32: Call __wine_get_shared_time only once.

---
 dlls/kernel32/kernel_main.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/kernel32/kernel_main.c b/dlls/kernel32/kernel_main.c
index 38110bc..e20b7ea 100644
--- a/dlls/kernel32/kernel_main.c
+++ b/dlls/kernel32/kernel_main.c
@@ -261,9 +261,13 @@ ULONGLONG WINAPI GetTickCount64(void)
     LARGE_INTEGER now;
 #ifdef HAVE_SYS_MMAN_H
     static timeout_t *shared_time = MAP_FAILED;
+    static int map_flag;
 
-    if (shared_time == MAP_FAILED)
+    if (!map_flag)
+    {
         __wine_get_shared_time( &shared_time );
+        map_flag = 1;
+    }
     if (shared_time != MAP_FAILED)
         return (interlocked_cmpxchg64( shared_time, 0, 0 ) - server_start_time) / 10000;
 #endif
-- 
1.6.1.3.GIT



Подробная информация о списке рассылки Wine-patches