[PATCH 1/5] ntoskrnl.exe: Implement KeAreApcsDisabled using critical region functions.

Derek Lesho dereklesho52 at gmail.com
Wed Apr 24 09:41:09 CDT 2019


I thought about that, but since the only documented way to access it is
from the current thread.

On Wed, Apr 24, 2019 at 10:32 AM Dmitry Timoshkov <dmitry at baikal.ru> wrote:

> Derek Lesho <dereklesho52 at gmail.com> wrote:
>
> >  void WINAPI KeEnterCriticalRegion(void)
> >  {
> > -    FIXME(": stub\n");
> > +    TRACE(": semi-stub\n");
> > +    KeGetCurrentThread()->critical_region_count++;
> >  }
> ...
> >  void WINAPI KeLeaveCriticalRegion(void)
> >  {
> > -    FIXME(": stub\n");
> > +    TRACE(": semi-stub\n");
> > +    KeGetCurrentThread()->critical_region_count--;
> >  }
> ...
> > +BOOLEAN WINAPI KeAreApcsDisabled(void)
> > +{
> > +    return !!KeGetCurrentThread()->critical_region_count;
> > +}
>
> Shouldn't these APIs use interlocked operations?
>
> --
> Dmitry.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190424/7c9122c0/attachment.html>


More information about the wine-devel mailing list