ReactOS 0.4.15-dev-7674-gc0b4db1
queuetest.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Tests
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: queuetest.c
5 * PURPOSE: Usermode QueueUserWorkItem() testing
6 * PROGRAMMERS: Thomas Weidenmueller (w3seek@reactos.org)
7 */
8
9#include <windows.h>
10#include <stdio.h>
11
12#define WT_EXECUTEINPERSISTENTIOTHREAD 0x00000040
14
15#define TestProc(n) \
16DWORD CALLBACK TestProc##n(void *ctx)\
17{\
18 printf("TestProc%d thread 0x%lx context 0x%p\n", n, GetCurrentThreadId(), ctx);\
19 return 0;\
20}
21
23TestProc(2)
24TestProc(3)
25TestProc(4)
26TestProc(5)
27TestProc(6)
28
29int __cdecl
30main(int argc, char* argv[])
31{
32 PVOID x = (PVOID)0x12345;
33 QueueUserWorkItem(TestProc1, x, 0);
40 return 0;
41}
static int argc
Definition: ServiceArgs.c:12
#define __cdecl
Definition: accygwin.h:79
int main()
Definition: test.c:6
#define INFINITE
Definition: serial.h:102
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define argv
Definition: mplay32.c:18
#define TestProc(n)
Definition: queuetest.c:15
BOOL WINAPI QueueUserWorkItem(LPTHREAD_START_ROUTINE, PVOID, ULONG)
#define WT_EXECUTEINPERSISTENTIOTHREAD
Definition: queuetest.c:12
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
void * PVOID
Definition: typedefs.h:50
uint32_t ULONG
Definition: typedefs.h:59
DWORD(WINAPI * LPTHREAD_START_ROUTINE)(LPVOID)
Definition: winbase.h:729
#define WINAPI
Definition: msvc.h:6
#define WT_EXECUTEINPERSISTENTTHREAD
Definition: winnt_old.h:1046
#define WT_EXECUTEINIOTHREAD
Definition: winnt_old.h:1039
#define WT_EXECUTELONGFUNCTION
Definition: winnt_old.h:1043