mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 05:32:21 +00:00
Move and reshuffle reactos/regtetsts into rostests. 1/2
svn path=/trunk/; revision=26014
This commit is contained in:
parent
d5b244c7cc
commit
33c6673cfb
201 changed files with 84137 additions and 0 deletions
41
rostests/win32/kernel32/queuetest/queuetest.c
Normal file
41
rostests/win32/kernel32/queuetest/queuetest.c
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Tests
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: queuetest.c
|
||||
* PURPOSE: Usermode QueueUserWorkItem() testing
|
||||
* PROGRAMMERS: Thomas Weidenmueller (w3seek@reactos.org)
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define WT_EXECUTEINPERSISTENTIOTHREAD 0x00000040
|
||||
BOOL WINAPI QueueUserWorkItem(LPTHREAD_START_ROUTINE,PVOID,ULONG);
|
||||
|
||||
#define TestProc(n) \
|
||||
DWORD CALLBACK TestProc##n(void *ctx)\
|
||||
{\
|
||||
printf("TestProc%d thread 0x%x context 0x%p\n", n, GetCurrentThreadId(), ctx);\
|
||||
return 0;\
|
||||
}
|
||||
|
||||
TestProc(1)
|
||||
TestProc(2)
|
||||
TestProc(3)
|
||||
TestProc(4)
|
||||
TestProc(5)
|
||||
TestProc(6)
|
||||
|
||||
int __cdecl
|
||||
main(int argc, char* argv[])
|
||||
{
|
||||
PVOID x = (PVOID)0x12345;
|
||||
QueueUserWorkItem(TestProc1, x, 0);
|
||||
QueueUserWorkItem(TestProc2, x, WT_EXECUTELONGFUNCTION);
|
||||
QueueUserWorkItem(TestProc3, x, WT_EXECUTEINIOTHREAD);
|
||||
QueueUserWorkItem(TestProc4, x, WT_EXECUTEINIOTHREAD | WT_EXECUTELONGFUNCTION);
|
||||
QueueUserWorkItem(TestProc5, x, WT_EXECUTEINPERSISTENTTHREAD);
|
||||
QueueUserWorkItem(TestProc6, x, WT_EXECUTEINPERSISTENTIOTHREAD);
|
||||
Sleep(INFINITE);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue