summaryrefslogtreecommitdiff
path: root/network/netadaptercx/netvadapterlibrary/code/rtl/KDebug.h
blob: d90e60560ba7156b1cbcd17e3db2da80fb3a0979 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

#pragma once

#include <KMacros.h>

template<ULONG SIGNATURE>
struct KRTL_CLASS NdisDebugBlock
{
#if DBG
    PAGED ~NdisDebugBlock()
    {
        ASSERT_VALID();
        Signature |= 0x80;
    }
#endif

    _IRQL_requires_max_(HIGH_LEVEL)
    NONPAGEDX bool ASSERT_VALID() const
    {
#if DBG
        return NT_VERIFY(Signature == SIGNATURE);
#else
        return true;
#endif
    }

private:
#if DBG
    ULONG Signature = SIGNATURE;
#endif
};