ReactOS 0.4.15-dev-7942-gd23573b
threadx.c File Reference
#include <precomp.h>
Include dependency graph for threadx.c:

Go to the source code of this file.

Functions

uintptr_t CDECL _beginthreadex (void *security, unsigned stack_size, unsigned(__stdcall *start_address)(void *), void *arglist, unsigned initflag, unsigned *thrdaddr)
 
void CDECL _endthreadex (unsigned retval)
 

Function Documentation

◆ _beginthreadex()

uintptr_t CDECL _beginthreadex ( void security,
unsigned  stack_size,
unsigned(__stdcall *start_address)(void *)  ,
void arglist,
unsigned  initflag,
unsigned thrdaddr 
)

Definition at line 6 of file threadx.c.

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}
unsigned int uintptr_t
Definition: crtdefs.h:321
#define NULL
Definition: types.h:112
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
uint32_t * PULONG
Definition: typedefs.h:59
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
DWORD(WINAPI * LPTHREAD_START_ROUTINE)(LPVOID)
Definition: winbase.h:729

◆ _endthreadex()

void CDECL _endthreadex ( unsigned  retval)

Definition at line 35 of file threadx.c.

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}
VOID WINAPI ExitThread(IN DWORD uExitCode)
Definition: thread.c:365