Alexandre Julliard : kernel32/tests: Fix a race that could corrupt the thread register state.

Alexandre Julliard julliard at winehq.org
Fri May 6 13:44:17 CDT 2011


Module: wine
Branch: master
Commit: f555c2d8572b83595e5a9742ec4444c3ade17d3d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f555c2d8572b83595e5a9742ec4444c3ade17d3d

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri May  6 17:12:22 2011 +0200

kernel32/tests: Fix a race that could corrupt the thread register state.

---

 dlls/kernel32/tests/thread.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
index 8376575..373eea7 100644
--- a/dlls/kernel32/tests/thread.c
+++ b/dlls/kernel32/tests/thread.c
@@ -898,6 +898,7 @@ static HANDLE event;
 static void WINAPI set_test_val( int val )
 {
     test_value += val;
+    ExitThread(0);
 }
 
 static DWORD WINAPI threadFunc6(LPVOID p)
@@ -954,7 +955,7 @@ static void test_SetThreadContext(void)
                          prevcount, GetLastError() );
 
     WaitForSingleObject( thread, INFINITE );
-    ok( test_value == 20, "test_value %d instead of 20\n", test_value );
+    ok( test_value == 10, "test_value %d instead of 20\n", test_value );
 
     ctx.ContextFlags = CONTEXT_FULL;
     SetLastError(0xdeadbeef);




More information about the wine-cvs mailing list