[ros-dev] Ros-dev Digest, Vol 145, Issue 16

Love Nystrom love.nystrom at gmail.com
Mon Sep 26 03:48:08 UTC 2016


Agreed..

When the assignment and assert are separated by a call
of X distance, the assert is certainly warranted.
Just not as it stands in ke_x.h

Perhaps you could factorize as suggested, Dmitri?

Best regards
L.

On 2016-09-26 10.28, ros-dev-request at reactos.org wrote:
> Rationale is simple:
>
> The real headers contain a KeEnterCriticalRegionThread function, which 
> has this assert, and a KeEnterCriticalRegion function, which calls 
> that function with KeGetCurrentThread() at input. This is an 
> optimization such that if you already have the current thread of 
> interest somewhere, you can call KeEnterCriticalRegionThread and avoid 
> reading from FS or GS again. ReactOS combines these two functions in 
> one, and as such the ASSERT appears pointless. Factoring the functions 
> would've been the correct approach -- not removing the ASSERT.
>
> Best regards,
> Alex Ionescu

-- 
There is one thing stronger than all the armies in the world,
and that's an idea whose time has come. [Victor Hugo]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.reactos.org/pipermail/ros-dev/attachments/20160926/b2b94ca7/attachment.html>


More information about the Ros-dev mailing list