2003-01-07 16:23:12 +00:00
|
|
|
/* $Id: process.cpp,v 1.6 2003/01/07 16:23:11 robd Exp $
|
2002-05-30 15:11:47 +00:00
|
|
|
*/
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS OS/2 sub system
|
2002-09-04 22:19:47 +00:00
|
|
|
* PART: doscalls.dll
|
|
|
|
* FILE: process.cpp
|
|
|
|
* CONTAINS: process and thread related CP-functions.
|
2002-05-30 15:11:47 +00:00
|
|
|
* PURPOSE: Kernelservices for OS/2 apps
|
|
|
|
* PROGRAMMER: Robert K. nonvolatil@yahoo.de
|
|
|
|
* REVISION HISTORY:
|
2002-07-26 00:23:13 +00:00
|
|
|
* 13-03-2002 Created
|
|
|
|
* 25-07-2002 Work to make it compile
|
2002-05-30 15:11:47 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2003-01-07 16:23:12 +00:00
|
|
|
//#if defined (INCL_DOS)
|
2002-05-30 15:11:47 +00:00
|
|
|
#define INCL_DOSPROCESS
|
2002-07-26 00:23:13 +00:00
|
|
|
#define INCL_DOSERRORS
|
|
|
|
#include "ros2.h"
|
2002-05-30 15:11:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
APIRET STDCALL DosSleep(ULONG msec)
|
|
|
|
{
|
2002-07-26 00:23:13 +00:00
|
|
|
NT::NTSTATUS stat;
|
|
|
|
NT::TIME Interv;
|
2002-05-30 15:11:47 +00:00
|
|
|
Interv.QuadPart= -(10000 * msec);
|
2002-07-26 00:23:13 +00:00
|
|
|
stat = NT::NtDelayExecution( TRUE, &Interv );
|
2002-05-30 15:11:47 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-01-07 16:23:12 +00:00
|
|
|
/* $Id: process.cpp,v 1.6 2003/01/07 16:23:11 robd Exp $ */
|
2002-03-23 19:23:28 +00:00
|
|
|
/* Terminates the current thread or the current Process.
|
|
|
|
Decission is made by action
|
|
|
|
FIXME: move this code to OS2.EXE */
|
2002-05-30 15:11:47 +00:00
|
|
|
VOID APIENTRY DosExit(ULONG action, ULONG result)
|
2002-03-23 19:23:28 +00:00
|
|
|
{
|
|
|
|
// decide what to do
|
|
|
|
if( action == EXIT_THREAD)
|
|
|
|
{
|
2002-07-26 00:23:13 +00:00
|
|
|
NT::NtTerminateThread( NULL, result );
|
2002-03-23 19:23:28 +00:00
|
|
|
}
|
|
|
|
else // EXIT_PROCESS
|
|
|
|
{
|
2002-07-26 00:23:13 +00:00
|
|
|
NT::NtTerminateProcess( NULL, result );
|
2002-03-23 19:23:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-05-30 15:11:47 +00:00
|
|
|
|
|
|
|
APIRET STDCALL DosCreateThread(PTID ptid, PFNTHREAD pfn,
|
|
|
|
ULONG param, ULONG flag, ULONG cbStack)
|
|
|
|
{
|
2002-07-26 00:23:13 +00:00
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
2002-05-30 15:11:47 +00:00
|
|
|
}
|
|
|
|
|
2002-03-24 18:55:39 +00:00
|
|
|
/* EOF */
|