move old cruft
[reactos.git] / reactos / lib / crtdll / old cruft / process / thread.c
1 /* $Id$
2 *
3 */
4
5 #include <precomp.h>
6 #include <msvcrt/errno.h>
7 #include <msvcrt/process.h>
8 #include <msvcrt/internal/file.h>
9
10
11 /*
12 * @implemented
13 */
14 unsigned long _beginthread(
15 void (*pfuncStart)(void*),
16 unsigned unStackSize,
17 void* pArgList)
18 {
19 DWORD ThreadId;
20 HANDLE hThread;
21 if ( pfuncStart == NULL )
22 __set_errno(EINVAL);
23
24 hThread = CreateThread( NULL,unStackSize,(LPTHREAD_START_ROUTINE)pfuncStart,pArgList,0, &ThreadId);
25 if (hThread == NULL ) {
26 __set_errno(EAGAIN);
27 return -1;
28 }
29 return (unsigned long)hThread;
30 }
31
32 /*
33 * @unimplemented
34 */
35 void _endthread(void)
36 {
37 //fixme ExitThread
38 //ExitThread(0);
39 for(;;);
40 }