KeIsExecutingInArbitraryThreadContext

BOOL __stdcall KeIsExecutingInArbitraryThreadContext(){
  return KeGetPcr()->Prcb.NestingLevel != 0;
}

Referenced by:

EtwpTraceFileName
IopCheckSessionDeviceAccess
MiGetNextSession
MmGetSessionById
MmIsSessionInCurrentServerSilo
PerfInfoLogSysCallEntry
PerfInfoLogSysCallExit
PsGetCurrentServerSilo
PsGetCurrentServerSiloGlobals
PsIsCurrentThreadInServerSilo
RtlGetActiveConsoleId
RtlGetCurrentServiceSessionId
RtlGetNtProductType
SepAdtLogAuditRecord