ReactOS 0.4.15-dev-7924-g5949c20
threadx.c
Go to the documentation of this file.
1#include <precomp.h>
2
3/*
4 * @unimplemented
5 */
7 void* security,
8 unsigned stack_size,
9 unsigned (__stdcall *start_address)(void*),
10 void* arglist,
11 unsigned initflag,
12 unsigned* thrdaddr)
13{
14 HANDLE NewThread;
15
16 /*
17 * Just call the API function. Any CRT specific processing is done in
18 * DllMain DLL_THREAD_ATTACH
19 */
20 NewThread = CreateThread ( security, stack_size,
21 (LPTHREAD_START_ROUTINE)start_address,
22 arglist, initflag, (PULONG)thrdaddr );
23 if (NULL == NewThread)
24 {
26 }
27
28 return (uintptr_t) NewThread;
29}
30
31
32/*
33 * @implemented
34 */
35void CDECL _endthreadex(unsigned retval)
36{
37 /*
38 * Just call the API function. Any CRT specific processing is done in
39 * DllMain DLL_THREAD_DETACH
40 */
41 ExitThread(retval);
42}
43
44/* EOF */
unsigned int uintptr_t
Definition: crtdefs.h:321
#define NULL
Definition: types.h:112
#define CDECL
Definition: compat.h:29
VOID WINAPI ExitThread(IN DWORD uExitCode)
Definition: thread.c:365
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
void _dosmaperr(unsigned long oserrcode)
Definition: errno.c:81
va_lists_t arglist[FMT_ARGMAX+1]
Definition: format.c:284
void CDECL _endthreadex(unsigned retval)
Definition: threadx.c:35
uintptr_t CDECL _beginthreadex(void *security, unsigned stack_size, unsigned(__stdcall *start_address)(void *), void *arglist, unsigned initflag, unsigned *thrdaddr)
Definition: threadx.c:6
uint32_t * PULONG
Definition: typedefs.h:59
#define __stdcall
Definition: typedefs.h:25
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
DWORD(WINAPI * LPTHREAD_START_ROUTINE)(LPVOID)
Definition: winbase.h:729