From e8b55a9f69fb9f471025ac3f458e20566d24c615 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Sun, 22 Sep 2013 18:54:58 +0000 Subject: [PATCH] - Implement and export PsGetCurrentThreadWin32ThreadAndEnterCriticalRegion. svn path=/trunk/; revision=60318 --- reactos/ntoskrnl/ntoskrnl.spec | 2 +- reactos/ntoskrnl/ps/thread.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/ntoskrnl.spec b/reactos/ntoskrnl/ntoskrnl.spec index f024e7fda2e..9a37277f072 100644 --- a/reactos/ntoskrnl/ntoskrnl.spec +++ b/reactos/ntoskrnl/ntoskrnl.spec @@ -969,7 +969,7 @@ @ stdcall PsGetCurrentThreadStackLimit() @ stdcall PsGetCurrentThreadTeb() @ stdcall PsGetCurrentThreadWin32Thread() -;PsGetCurrentThreadWin32ThreadAndEnterCriticalRegion +@ stdcall PsGetCurrentThreadWin32ThreadAndEnterCriticalRegion() @ stdcall PsGetJobLock(ptr) @ stdcall PsGetJobSessionId(ptr) @ stdcall PsGetJobUIRestrictionsClass(ptr) diff --git a/reactos/ntoskrnl/ps/thread.c b/reactos/ntoskrnl/ps/thread.c index 07e8f99e85c..8d6f08d8e69 100644 --- a/reactos/ntoskrnl/ps/thread.c +++ b/reactos/ntoskrnl/ps/thread.c @@ -796,6 +796,17 @@ PsGetCurrentThreadWin32Thread(VOID) return PsGetCurrentThread()->Tcb.Win32Thread; } +/* + * @implemented + */ +PVOID +NTAPI +PsGetCurrentThreadWin32ThreadAndEnterCriticalRegion(VOID) +{ + KeEnterCriticalRegion(); + return PsGetCurrentThread()->Tcb.Win32Thread; +} + /* * @implemented */