ReactOS  0.4.15-dev-1068-g467feb9
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 }
DWORD(WINAPI * LPTHREAD_START_ROUTINE)(LPVOID)
Definition: winbase.h:707
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
unsigned int uintptr_t
Definition: crtdefs.h:300
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:136
smooth NULL
Definition: ftsmooth.c:416
void _dosmaperr(unsigned long oserrcode)
Definition: errno.c:81
unsigned int * PULONG
Definition: retypes.h:1
va_lists_t arglist[FMT_ARGMAX+1]
Definition: format.c:284

◆ _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:364