mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Implemented NtResumeThread() and NtSuspendThread()
Cleanup svn path=/trunk/; revision=1472
This commit is contained in:
parent
90beca63cb
commit
64ba922c19
4 changed files with 15 additions and 22 deletions
|
@ -1,15 +1,8 @@
|
|||
/* $Id: psfuncs.h,v 1.11 2000/09/06 03:00:10 phreak Exp $
|
||||
/* $Id: psfuncs.h,v 1.12 2000/12/22 13:29:48 ekohl Exp $
|
||||
*/
|
||||
#ifndef _INCLUDE_DDK_PSFUNCS_H
|
||||
#define _INCLUDE_DDK_PSFUNCS_H
|
||||
|
||||
PACCESS_TOKEN PsReferenceEffectiveToken(struct _ETHREAD* Thread,
|
||||
PTOKEN_TYPE TokenType,
|
||||
PUCHAR b,
|
||||
PSECURITY_IMPERSONATION_LEVEL Level);
|
||||
|
||||
NTSTATUS PsOpenTokenOfProcess(HANDLE ProcessHandle,
|
||||
PACCESS_TOKEN* Token);
|
||||
NTSTATUS STDCALL PsAssignImpersonationToken (struct _ETHREAD* Thread,
|
||||
HANDLE TokenHandle);
|
||||
|
||||
|
@ -40,12 +33,7 @@ NTSTATUS STDCALL PsCreateSystemThread(PHANDLE ThreadHandle,
|
|||
PKSTART_ROUTINE StartRoutine,
|
||||
PVOID StartContext);
|
||||
NTSTATUS STDCALL PsTerminateSystemThread(NTSTATUS ExitStatus);
|
||||
ULONG PsSuspendThread(struct _ETHREAD* Thread,
|
||||
PNTSTATUS WaitStatus,
|
||||
UCHAR Alertable,
|
||||
ULONG WaitMode);
|
||||
ULONG PsResumeThread(struct _ETHREAD* Thread,
|
||||
PNTSTATUS WaitStatus);
|
||||
|
||||
struct _ETHREAD* STDCALL PsGetCurrentThread(VOID);
|
||||
struct _EPROCESS* STDCALL PsGetCurrentProcess(VOID);
|
||||
PACCESS_TOKEN STDCALL PsReferenceImpersonationToken(struct _ETHREAD* Thread,
|
||||
|
|
|
@ -59,5 +59,7 @@
|
|||
#define NORMAL_PRIORITY_CLASS (32)
|
||||
#define REALTIME_PRIORITY_CLASS (256)
|
||||
|
||||
/* ResumeThread / SuspendThread */
|
||||
#define MAXIMUM_SUSPEND_COUNT (0x7f)
|
||||
|
||||
#endif /* __INCLUDE_PS_H */
|
||||
|
|
|
@ -381,12 +381,15 @@ PACCESS_TOKEN PsReferenceEffectiveToken(PETHREAD Thread,
|
|||
NTSTATUS PsOpenTokenOfProcess(HANDLE ProcessHandle,
|
||||
PACCESS_TOKEN* Token);
|
||||
|
||||
ULONG PsSuspendThread(PETHREAD Thread,
|
||||
PNTSTATUS WaitStatus,
|
||||
UCHAR Alertable,
|
||||
ULONG WaitMode);
|
||||
ULONG PsResumeThread(PETHREAD Thread,
|
||||
PNTSTATUS WaitStatus);
|
||||
ULONG PsFreezeThread(PETHREAD Thread,
|
||||
PNTSTATUS WaitStatus,
|
||||
UCHAR Alertable,
|
||||
ULONG WaitMode);
|
||||
ULONG PsUnfreezeThread(PETHREAD Thread,
|
||||
PNTSTATUS WaitStatus);
|
||||
|
||||
ULONG PsSuspendThread(PETHREAD Thread);
|
||||
ULONG PsResumeThread(PETHREAD Thread);
|
||||
|
||||
|
||||
#define THREAD_STATE_INVALID (0)
|
||||
|
|
|
@ -139,8 +139,8 @@ KeInitializeThread(PKPROCESS Process, PKTHREAD Thread)
|
|||
KeInitializeSemaphore(&Thread->SuspendSemaphore, 0, 255);
|
||||
Thread->ThreadListEntry.Flink = NULL;
|
||||
Thread->ThreadListEntry.Blink = NULL;
|
||||
Thread->FreezeCount = 1;
|
||||
Thread->SuspendCount = 0;
|
||||
Thread->FreezeCount = 0;
|
||||
Thread->SuspendCount = 1;
|
||||
|
||||
/*
|
||||
* Initialize ReactOS specific members
|
||||
|
|
Loading…
Reference in a new issue