mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Implemented _beginthreadex and _endthreadex
svn path=/trunk/; revision=4558
This commit is contained in:
parent
628cc3fad9
commit
0f4fba969a
1 changed files with 19 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: threadx.c,v 1.1 2002/11/29 16:00:21 robd Exp $
|
||||
/* $Id: threadx.c,v 1.2 2003/04/20 19:42:50 gvg Exp $
|
||||
*
|
||||
*/
|
||||
#include <windows.h>
|
||||
|
@ -14,13 +14,30 @@ unsigned long _beginthreadex(
|
|||
unsigned initflag,
|
||||
unsigned* thrdaddr)
|
||||
{
|
||||
HANDLE NewThread;
|
||||
|
||||
/*
|
||||
* Just call the API function. Any CRT specific processing is done in
|
||||
* DllMain DLL_THREAD_ATTACH
|
||||
*/
|
||||
NewThread = CreateThread(security, stack_size, start_address, arglist, initflag, thrdaddr);
|
||||
if (NULL == NewThread)
|
||||
{
|
||||
/* FIXME map GetLastError() to errno */
|
||||
errno = ENOSYS;
|
||||
return (unsigned long)-1;
|
||||
}
|
||||
|
||||
return (unsigned long) NewThread;
|
||||
}
|
||||
|
||||
|
||||
void _endthreadex(unsigned retval)
|
||||
{
|
||||
/*
|
||||
* Just call the API function. Any CRT specific processing is done in
|
||||
* DllMain DLL_THREAD_DETACH
|
||||
*/
|
||||
ExitThread(retval);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue