#include <debug.h>
SIZE_T RtlpAllocDeallocQueryBufferSize = PAGE_SIZE;
+PTEB LdrpTopLevelDllBeingLoadedTeb = NULL;
/* FUNCTIONS ***************************************************************/
BOOLEAN
NTAPI
-RtlpCheckForActiveDebugger(BOOLEAN Type)
+RtlpCheckForActiveDebugger(VOID)
{
- return (NtCurrentPeb()->BeingDebugged);
+ /* Return the flag in the PEB */
+ return NtCurrentPeb()->BeingDebugged;
}
BOOLEAN
NTAPI
-RtlpSetInDbgPrint(IN BOOLEAN NewValue)
+RtlpSetInDbgPrint(VOID)
{
- /* If we're setting it to false, do it and return */
- if (NewValue == FALSE)
- {
- NtCurrentTeb()->InDbgPrint = FALSE;
- return FALSE;
- }
-
- /* Setting to true; check if it's not already */
+ /* Check if it's already set and return TRUE if so */
if (NtCurrentTeb()->InDbgPrint) return TRUE;
/* Set it and return */
return FALSE;
}
+VOID
+NTAPI
+RtlpClearInDbgPrint(VOID)
+{
+ /* Clear the flag */
+ NtCurrentTeb()->InDbgPrint = FALSE;
+}
+
KPROCESSOR_MODE
NTAPI
RtlpGetMode()
}
-#ifdef DBG
+#if DBG
VOID FASTCALL
CHECK_PAGED_CODE_RTL(char *file, int line)
{
return TRUE;
}
+BOOLEAN
+NTAPI
+RtlIsThreadWithinLoaderCallout(VOID)
+{
+ return LdrpTopLevelDllBeingLoadedTeb == NtCurrentTeb();
+}
+
/* RTL Atom Tables ************************************************************/
typedef struct _RTL_ATOM_HANDLE