29 Mar
2019
29 Mar
'19
6:57 a.m.
On 2019-03-28 21:47, Derek Lesho wrote:
+/********************************************************************* + * KeAreApcsDisabled (NTOSKRNL.@) + */ +BOOLEAN WINAPI KeAreApcsDisabled(void) +{ + PETHREAD thread = (PETHREAD) KeGetCurrentThread(); + + return thread->critical_region; +}
This may not be important for now, but this function will also return true if the current IRQL is APC_LEVEL or higher. So perhaps "|| KeGetCurrentIrql() > 0" or a FIXME could make sense. While we're at it, the function will also return true if you're inside a guarded region. Though that's likely even less relevant at this point ;)