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 */