[PATCH 5/5] Implement KeAreApcsDisabled using critical region functions.

Thomas Faber thomas.faber at reactos.org
Fri Mar 29 06:57:23 CDT 2019


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 ;)



More information about the wine-devel mailing list