How to view all spinlocks in the system?

Dear Readers,
the short version:
I want to see all spinlocks in the system ( Windows 7 ). How can I do that?

The long version:
I have a spinlock declared global like this
KSPIN_LOCK SpinLock = 0;
I use it like this
KeInitializeSpinLock(&SpinLock);
KeAcquireSpinLockRaiseToDpc(&SpinLock);
and I can see ( in the memory windows i.e. ) that the contention count is 1.

But whatever I do I can not see it with any** !locks** command and if
I use an** !object** call on the SpinLock I receive a “Not a valid object (ObjectType invalid)”

What to do to show my own spinlock?

Regards
Burkhardt

There is no “master list” of spinlocks. Spinlocks are not registered when they are created, and they are not kernel objects. It’s just a chunk of your memory that gets initialized in a known way.

after a few hours work, I expected something like that. Thank you!

You could adjust your spin lock to a queued spinlok(ignore the light contention disclaimer on reason to use), and then use the !qlocks command.