diff --git a/dlls/kernel/tests/thread.c b/dlls/kernel/tests/thread.c index 733b1913b20..3017200d56c 100644 --- a/dlls/kernel/tests/thread.c +++ b/dlls/kernel/tests/thread.c @@ -48,16 +48,18 @@ #include "wine/exception.h" #endif #endif -typedef HANDLE (WINAPI *OPENTHREADPTR)(DWORD,BOOL,DWORD); -OPENTHREADPTR OpenThreadPtr; -HANDLE WINAPI OpenThreadDefault(DWORD dwDesiredAccess, - BOOL bInheritHandle, - DWORD dwThreadId) -{ - return (HANDLE)NULL; -} -/* define a check for whether we are running in Win2k or XP */ -#define WIN2K_PLUS(version) (version < 0x80000000 && (version & 0xFF) >= 5) + +typedef BOOL (WINAPI *GetThreadPriorityBoost_t)(HANDLE,PBOOL); +static GetThreadPriorityBoost_t pGetThreadPriorityBoost=NULL; + +typedef HANDLE (WINAPI *OpenThread_t)(DWORD,BOOL,DWORD); +static OpenThread_t pOpenThread=NULL; + +typedef DWORD (WINAPI *SetThreadIdealProcessor_t)(HANDLE,DWORD); +static SetThreadIdealProcessor_t pSetThreadIdealProcessor=NULL; + +typedef BOOL (WINAPI *SetThreadPriorityBoost_t)(HANDLE,BOOL); +static SetThreadPriorityBoost_t pSetThreadPriorityBoost=NULL; /* Functions not tested yet: AttachThreadInput @@ -100,7 +102,7 @@ VOID WINAPI threadFunc1(t1Struct *tstruct) while(tstruct->threadmem[i]==0) ; } /* Check that noone cahnged our tls memory */ - ok((DWORD)TlsGetValue(tlsIndex)-1==tstruct->threadnum, + ok((int)TlsGetValue(tlsIndex)-1==tstruct->threadnum, "TlsGetValue failed"); ExitThread(NUM_THREADS+tstruct->threadnum); } @@ -120,7 +122,7 @@ VOID WINAPI threadFunc3() VOID WINAPI threadFunc4(HANDLE event) { - if(event != (HANDLE)NULL) { + if(event != NULL) { SetEvent(event); } Sleep(99000); @@ -147,7 +149,7 @@ VOID WINAPI threadFunc5(DWORD *exitCode) #endif /* Check basic funcationality of CreateThread and Tls* functions */ -VOID test_CreateThread_basic(DWORD version) +VOID test_CreateThread_basic() { HANDLE thread[NUM_THREADS],event[NUM_THREADS]; DWORD threadid[NUM_THREADS],curthreadId; @@ -155,7 +157,7 @@ VOID test_CreateThread_basic(DWORD version) DWORD exitCode; t1Struct tstruct[NUM_THREADS]; int error; - int i,j; + DWORD i,j; /* Retrieve current Thread ID for later comparisons */ curthreadId=GetCurrentThreadId(); /* Allocate some local storage */ @@ -176,7 +178,7 @@ VOID test_CreateThread_basic(DWORD version) for(i=0;i