ReactOS  0.4.13-dev-100-gc8611ae
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  */
35 void 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 */
DWORD(WINAPI * LPTHREAD_START_ROUTINE)(LPVOID)
Definition: winbase.h:707
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
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:112
smooth NULL
Definition: ftsmooth.c:416
VOID WINAPI ExitThread(IN DWORD uExitCode)
Definition: thread.c:327
#define __stdcall
Definition: typedefs.h:25
uintptr_t CDECL _beginthreadex(void *security, unsigned stack_size, unsigned(__stdcall *start_address)(void *), void *arglist, unsigned initflag, unsigned *thrdaddr)
Definition: threadx.c:6
void _dosmaperr(unsigned long oserrcode)
Definition: errno.c:81
#define CDECL
Definition: compat.h:21
unsigned int * PULONG
Definition: retypes.h:1
void CDECL _endthreadex(unsigned retval)
Definition: threadx.c:35
va_lists_t arglist[FMT_ARGMAX+1]
Definition: format.c:284