-Nearly compiles doscalls
[reactos.git] / os2 / lib / doscalls / run / process.cpp
1 /* $Id: process.cpp,v 1.4 2002/07/26 00:23:13 robertk Exp $
2 */
3 /*
4 *
5 * COPYRIGHT: See COPYING in the top level directory
6 * PROJECT: ReactOS OS/2 sub system
7 * FILE: dll/process.cpp
8 * PURPOSE: Kernelservices for OS/2 apps
9 * PROGRAMMER: Robert K. nonvolatil@yahoo.de
10 * REVISION HISTORY:
11 * 13-03-2002 Created
12 * 25-07-2002 Work to make it compile
13 */
14
15
16 #define INCL_DOSPROCESS
17 #define INCL_DOSERRORS
18 #include "ros2.h"
19
20
21 APIRET STDCALL DosSleep(ULONG msec)
22 {
23 NT::NTSTATUS stat;
24 NT::TIME Interv;
25 Interv.QuadPart= -(10000 * msec);
26 stat = NT::NtDelayExecution( TRUE, &Interv );
27 return 0;
28 }
29
30
31 /* $Id: process.cpp,v 1.4 2002/07/26 00:23:13 robertk Exp $ */
32 /* Terminates the current thread or the current Process.
33 Decission is made by action
34 FIXME: move this code to OS2.EXE */
35 VOID APIENTRY DosExit(ULONG action, ULONG result)
36 {
37 // decide what to do
38 if( action == EXIT_THREAD)
39 {
40 NT::NtTerminateThread( NULL, result );
41 }
42 else // EXIT_PROCESS
43 {
44 NT::NtTerminateProcess( NULL, result );
45 }
46 }
47
48
49 APIRET STDCALL DosCreateThread(PTID ptid, PFNTHREAD pfn,
50 ULONG param, ULONG flag, ULONG cbStack)
51 {
52 return ERROR_CALL_NOT_IMPLEMENTED;
53 }
54
55 /* EOF */