On 04/09/2019 02:29 PM, Derek Lesho wrote:
Signed-off-by: Derek Lesho dereklesho52@Gmail.com
dlls/ntoskrnl.exe/ntoskrnl.c | 16 ++++++++++++++-- dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- dlls/ntoskrnl.exe/ntoskrnl_private.h | 1 + 3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 770bdfd4fa..ec05125f27 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2497,6 +2497,8 @@ static void *create_thread_object( HANDLE handle ) if (!NtQueryInformationThread( handle, ThreadBasicInformation, &info, sizeof(info), NULL )) thread->id = info.ClientId;
- thread->critical_region = FALSE;
- return thread;
}
@@ -3431,7 +3433,8 @@ void WINAPI ExReleaseResourceForThreadLite( PERESOURCE resource, ERESOURCE_THREA */ void WINAPI KeEnterCriticalRegion(void) {
- FIXME(": stub\n");
- /* FIXME: actually disable certain APCs */
- KeGetCurrentThread()->critical_region = TRUE;
}
Can you please change this to a TRACE rather than removing it entirely?
Similarly for other functions you add, it would be nice to add trace messages.
/*********************************************************************** @@ -3439,7 +3442,8 @@ void WINAPI KeEnterCriticalRegion(void) */ void WINAPI KeLeaveCriticalRegion(void) {
- FIXME(": stub\n");
- /* FIXME: actually re-enable certain APCs */
- KeGetCurrentThread()->critical_region = FALSE;
}
/*********************************************************************** @@ -4379,3 +4383,11 @@ ULONG WINAPI ExSetTimerResolution(ULONG time, BOOLEAN set_resolution) FIXME("stub: %u %d\n", time, set_resolution); return KeQueryTimeIncrement(); }
+/*********************************************************************
KeAreApcsDisabled (NTOSKRNL.@)
- */
+BOOLEAN WINAPI KeAreApcsDisabled(void) +{
- return KeGetCurrentThread()->critical_region;
+}
Again, can you please add this to the public header?