[PATCH 1/5] ntoskrnl.exe: Implement KeAreApcsDisabled using critical region functions.
Derek Lesho
dereklesho52 at gmail.com
Wed Apr 24 09:45:56 CDT 2019
*but since the only documented way to access it is from the current thread,
I thought it was unnecessary.
On Wed, Apr 24, 2019 at 10:41 AM Derek Lesho <dereklesho52 at gmail.com> wrote:
> 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/ca12d1f6/attachment.html>
More information about the wine-devel
mailing list