Of course (2) and (3) will only show up in the checked build of the OS.
And (3) is silly
Spin lock routines generates three critical actions:
- KeBugCheck(IRQL_NOT_GREATER_OR_EQUAL)
- in KfAcquireSpinLock when KeGetCurrentIrql() > DISPATCH_LEVEL
- in KfReleaseSpinLock when NewIrql > KeGetCurrentIrql()
- KeBugCheck(SpinLock)
- in Kii386SpinOnSpinLock (called from KfAcquireSpinLock when
spin lock is already acquired) if current thread has the
spin lock
already acquired- in KfReleaseSpinLock if the spin lock is not acquired by
current thread
- hardcoded breakpoint (int 3)
- in Kii386SpinOnSpinLock when spinning for too long