[Wine-patches] [PATCH 5/5] kernel32: Add Sleep().

Alexander Morozov =?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Вт Апр 7 17:15:11 MSD 2009


---
 dlls/kernel32/time.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c
index e1b787e..6be8649 100644
--- a/dlls/kernel32/time.c
+++ b/dlls/kernel32/time.c
@@ -917,7 +917,7 @@ VOID WINAPI GetLocalTime(LPSYSTEMTIME systime)
     FILETIME lft;
     LARGE_INTEGER ft, ft2;
 
-    while (interlocked_cmpxchg(&lock, 1, 0));
+    while (interlocked_cmpxchg(&lock, 1, 0)) Sleep(1);
     NtQuerySystemTime(&ft);
     if (ft.QuadPart == old.QuadPart)
     {
@@ -954,7 +954,7 @@ VOID WINAPI GetSystemTime(LPSYSTEMTIME systime)
     FILETIME ft;
     LARGE_INTEGER t;
 
-    while (interlocked_cmpxchg(&lock, 1, 0));
+    while (interlocked_cmpxchg(&lock, 1, 0)) Sleep(1);
     NtQuerySystemTime(&t);
     if (t.QuadPart == old.QuadPart)
     {
-- 
1.6.1.3.GIT



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