Philip Lukidis wrote:
Hi Peter, thanks for answering. First off, I’d like to apologize for
the tone of my question. Deep down I realized there surely was, most
probably, a good reason for it being the way it was.
Dude! No apologies necessary. Just means that you like the tool. And
I DO like hearing that!
However, I am still confused somewhat. I was not talking about an
EXPORT_DRIVER (driver DLL), but a static library (DRIVER_LIBRARY). So
in the case you mentioned, only 1 driver would be initializing any spin
lock. And this would be known at link time, no?
Sorry! That’s what I get for reading so fast and answering the “common”
question.
However, I am sure
there are valid reasons for why it was done this way, I just don’t
understand them (or I don’t see how what you said applies to a static
library).
Well, I’m on shakier ground here, Philip
While there’s a valid
reason, you might not think it’s a very good one.
The main reason is simply that CUV hasn’t been tested in this
environment. In these early releases of CUV, the idea was to support a
clearly defined subset of potential targets, while everybody got
experience with the tool and ironed out any annoying problems.
I don’t know if CUV would work in the situation you outline, given that
it creates a number of globals. But if you’re a brave man, you don’t
mind trying something unsupported, and you’re looking for a
work-around… If you look at \DDK\BIN\makefile.new, you’ll see that
defining VERIFIER_DDK_EXTENSIONS in your build environment causes the
following statements to be executed:
C_DEFINES=$(C_DEFINES) -DVERIFIER_DDK_EXTENSIONS
ENTRY_SUFFIX=_DDK$(ENTRY_SUFFIX)
TARGETLIB=$(DDK_LIB_PATH)\DDK_EXT.LIB $(TARGETLIB)
I bet that if you add these to the end of the sources file (and not
define VERIFIER_DDK_EXTENSIONS) whatever driver you build want will get
built with CUV.
OBVIOUS CAVEAT: This work-around is not supported by Microsoft in any way.
If you try this, please do me the favor of letting me know (either on or
off list, your preference) how it works out.
Peter
OSR