From 6be5fe1285433182997a4f9109f33dd3c6c43729 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Thu, 29 Nov 2001 16:41:22 +0000 Subject: [PATCH] Implemented PsGetProcessExitTime() and PsIsThreadTerminating(). svn path=/trunk/; revision=2409 --- reactos/include/ddk/psfuncs.h | 5 ++++- reactos/ntoskrnl/ntoskrnl.def | 6 +++--- reactos/ntoskrnl/ntoskrnl.edf | 6 +++--- reactos/ntoskrnl/ps/process.c | 16 +++++++++++++++- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/reactos/include/ddk/psfuncs.h b/reactos/include/ddk/psfuncs.h index e4bea83ec96..78033211608 100644 --- a/reactos/include/ddk/psfuncs.h +++ b/reactos/include/ddk/psfuncs.h @@ -1,4 +1,4 @@ -/* $Id: psfuncs.h,v 1.15 2001/11/21 18:44:09 ekohl Exp $ +/* $Id: psfuncs.h,v 1.16 2001/11/29 16:39:45 ekohl Exp $ */ #ifndef _INCLUDE_DDK_PSFUNCS_H #define _INCLUDE_DDK_PSFUNCS_H @@ -63,6 +63,9 @@ BOOLEAN STDCALL PsGetVersion (PULONG MajorVersion OPTIONAL, VOID STDCALL PsDispatchThread(ULONG NewThreadStatus); +LARGE_INTEGER STDCALL PsGetProcessExitTime(VOID); +BOOLEAN STDCALL PsIsThreadTerminating(struct _ETHREAD* Thread); + #endif /* EOF */ diff --git a/reactos/ntoskrnl/ntoskrnl.def b/reactos/ntoskrnl/ntoskrnl.def index ec2cb72dbe5..91e3133d9b0 100644 --- a/reactos/ntoskrnl/ntoskrnl.def +++ b/reactos/ntoskrnl/ntoskrnl.def @@ -1,4 +1,4 @@ -; $Id: ntoskrnl.def,v 1.119 2001/11/21 18:44:50 ekohl Exp $ +; $Id: ntoskrnl.def,v 1.120 2001/11/29 16:41:22 ekohl Exp $ ; ; reactos/ntoskrnl/ntoskrnl.def ; @@ -596,11 +596,11 @@ PsDispatchThread@4 PsGetCurrentProcessId@0 PsGetCurrentThreadId@0 PsGetCurrentThread@0 -;PsGetProcessExitTime@0 +PsGetProcessExitTime@0 PsGetVersion@16 PsImpersonateClient@20 PsInitialSystemProcess DATA -;PsIsThreadTerminating@4 +PsIsThreadTerminating@4 ;PsLookupProcessByProcessId@8 ;PsLookupProcessThreadByCid@12 ;PsLookupThreadByThreadId@8 diff --git a/reactos/ntoskrnl/ntoskrnl.edf b/reactos/ntoskrnl/ntoskrnl.edf index 233a86d479e..9bd1d8af7e1 100644 --- a/reactos/ntoskrnl/ntoskrnl.edf +++ b/reactos/ntoskrnl/ntoskrnl.edf @@ -1,4 +1,4 @@ -; $Id: ntoskrnl.edf,v 1.105 2001/11/21 18:44:50 ekohl Exp $ +; $Id: ntoskrnl.edf,v 1.106 2001/11/29 16:41:22 ekohl Exp $ ; ; reactos/ntoskrnl/ntoskrnl.def ; @@ -596,11 +596,11 @@ PsDispatchThread=PsDispatchThread@4 PsGetCurrentProcessId=PsGetCurrentProcessId@0 PsGetCurrentThreadId=PsGetCurrentThreadId@0 PsGetCurrentThread=PsGetCurrentThread@0 -;PsGetProcessExitTime +PsGetProcessExitTime=PsGetProcessExitTime@0 PsGetVersion=PsGetVersion@16 PsImpersonateClient=PsImpersonateClient@20 PsInitialSystemProcess DATA -;PsIsThreadTerminating +PsIsThreadTerminating=PsIsThreadTerminating@4 ;PsLookupProcessByProcessId ;PsLookupProcessThreadByCid ;PsLookupThreadByThreadId diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index cd4dd8336dc..8e04fbdb015 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.69 2001/10/31 00:03:07 dwelch Exp $ +/* $Id: process.c,v 1.70 2001/11/29 16:40:45 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -1099,4 +1099,18 @@ PiQuerySystemProcessInformation(PVOID Buffer, #endif } +LARGE_INTEGER STDCALL +PsGetProcessExitTime(VOID) +{ + LARGE_INTEGER Li; + Li.QuadPart = PsGetCurrentProcess()->ExitTime.QuadPart; + return Li; +} + +BOOLEAN STDCALL +PsIsThreadTerminating(IN PETHREAD Thread) +{ + return(Thread->DeadThread); +} + /* EOF */