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

Derek Lesho dereklesho52 at gmail.com
Fri Mar 29 13:20:24 CDT 2019


On Fri, Mar 29, 2019 at 7:57 AM Thomas Faber <thomas.faber at reactos.org> wrote:
> 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.

I thought about doing this, and I have another patch in the pipeline
that adds some basic IRQL stuff, but the MSDN page for this functions
says "The KeAreApcsDisabled routine returns whether the calling thread
is within a critical region or a guarded region, which disables normal
kernel APC delivery.", so it sounds like they check whether you are in
a region, not the IRQL level.  Or maybe that's just bad documentation?

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

Yeah, good point, might be a good idea to get it out of the way for
anyone who has to deal with it in the future.



More information about the wine-devel mailing list