Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting... Please check out the Community Guidelines in the
Announcements and Administration Category, below.

Re: RE: RE: RE: Re: [BULK] Re: Modern C++ Features in Kernel Mode Drivers

Tim_RobertsTim_Roberts Posts: 12,567
xxxxx@hotmail.com wrote:
>> But with judicious appropriate comments, all should be well, and your chances
>> of leaving the function's scope without releasing the lock are zero.
> True, but consider the scenario when you may have to release the lock and subsequently re-acquire it in some cases.

Ooh, that's so hard.  std::unique_lock supplies unlock() and lock()
primitives, but it provides the very convenient guarantee that any lock
will be released when it goes out of scope.


> Apparently, you must be able to find a workaround by messing around with scopes and loops, but imagine how ugly it is going to look.

Honestly, I don't know why you feel empowered to criticize tools you
don't use and don't understand.  You are certainly not required to use
C++ in your drivers, but you are entirely out of line to argue that C++
is inherently inferior.  It is provably not so.

--
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!