Paul Vriens : kernel32/tests: Fix a few failures on win98.

Alexandre Julliard julliard at winehq.org
Mon Sep 8 07:41:45 CDT 2008


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

Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date:   Mon Sep  8 08:19:45 2008 +0200

kernel32/tests: Fix a few failures on win98.

---

 dlls/kernel32/tests/thread.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
index 5c3d99e..697f34b 100644
--- a/dlls/kernel32/tests/thread.c
+++ b/dlls/kernel32/tests/thread.c
@@ -372,6 +372,7 @@ static VOID test_CreateThread_basic(void)
    int error;
    DWORD i,j;
    DWORD GLE, ret;
+   DWORD tid;
 
    /* lstrlenA contains an exception handler so this makes sure exceptions work in the main thread */
    ok( lstrlenA( (char *)0xdeadbeef ) == 0, "lstrlenA: unexpected success\n" );
@@ -429,7 +430,7 @@ static VOID test_CreateThread_basic(void)
 
   /* Test how passing NULL as a pointer to threadid works */
   SetLastError(0xFACEaBAD);
-  thread[0] = CreateThread(NULL,0,threadFunc2,NULL,0,NULL);
+  thread[0] = CreateThread(NULL,0,threadFunc2,NULL,0,&tid);
   GLE = GetLastError();
   if (thread[0]) { /* NT */
     ok(GLE==0xFACEaBAD, "CreateThread set last error to %d, expected 4207848365\n", GLE);
@@ -1125,7 +1126,7 @@ static DWORD WINAPI TLS_ThreadProc(LPVOID p)
   if (sync_threads_and_run_one(0, id))
   {
     HANDLE thread;
-    DWORD waitret;
+    DWORD waitret, tid;
 
     val = TlsGetValue(TLS_index0);
     ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n");
@@ -1135,7 +1136,7 @@ static DWORD WINAPI TLS_ThreadProc(LPVOID p)
     ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n");
     ok(val == (LPVOID) 2, "TLS slot not initialized correctly\n");
 
-    thread = CreateThread(NULL, 0, TLS_InheritanceProc, 0, 0, NULL);
+    thread = CreateThread(NULL, 0, TLS_InheritanceProc, 0, 0, &tid);
     ok(thread != NULL, "CreateThread failed\n");
     waitret = WaitForSingleObject(thread, 60000);
     ok(waitret == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
@@ -1173,7 +1174,9 @@ static void test_TLS(void)
 
   for (i = 0; i < 2; ++i)
   {
-    threads[i] = CreateThread(NULL, 0, TLS_ThreadProc, (LPVOID) i, 0, NULL);
+    DWORD tid;
+
+    threads[i] = CreateThread(NULL, 0, TLS_ThreadProc, (LPVOID) i, 0, &tid);
     ok(threads[i] != NULL, "CreateThread failed\n");
   }
 
@@ -1221,7 +1224,8 @@ START_TEST(thread)
        while (1)
        {
            HANDLE hThread;
-           hThread = CreateThread(NULL, 0, threadFunc2, NULL, 0, NULL);
+           DWORD tid;
+           hThread = CreateThread(NULL, 0, threadFunc2, NULL, 0, &tid);
            ok(hThread != NULL, "CreateThread failed, error %u\n",
               GetLastError());
            ok(WaitForSingleObject(hThread, 200) == WAIT_OBJECT_0,




More information about the wine-cvs mailing list