31#define DISPATCH_LEVEL 2
33#define PASSIVE_LEVEL 0
46#undef _IRQL_always_function_max_
47#undef _IRQL_always_function_min_
51#undef _IRQL_requires_max_
52#undef _IRQL_requires_min_
53#undef _IRQL_requires_same_
55#undef _IRQL_restores_global_
57#undef _IRQL_saves_global_
58#undef _IRQL_uses_cancel_
59#undef _IRQL_is_cancel_
61#undef __drv_raisesIRQL
62#undef __drv_requiresIRQL
66#undef __drv_savesIRQLGlobal
67#undef __drv_restoresIRQL
68#undef __drv_restoresIRQLGlobal
69#undef __drv_minFunctionIRQL
70#undef __drv_maxFunctionIRQL
72#undef __drv_useCancelIRQL
73#undef __drv_isCancelIRQL
75#define _IRQL_always_function_max_(irql) _Pre_ _SA_annotes1(SAL_maxFunctionIrql,irql)
76#define _IRQL_always_function_min_(irql) _Pre_ _SA_annotes1(SAL_minFunctionIrql,irql)
77#define _IRQL_inout_ _IRQL_saves_ _IRQL_restores_
78#define _IRQL_raises_(irql) _Post_ _SA_annotes1(SAL_raiseIRQL,irql)
79#define _IRQL_requires_(irql) _Pre_ _SA_annotes1(SAL_IRQL,irql)
80#define _IRQL_requires_max_(irql) _Pre_ _SA_annotes1(SAL_maxIRQL,irql)
81#define _IRQL_requires_min_(irql) _Pre_ _SA_annotes1(SAL_minIRQL,irql)
82#define _IRQL_requires_same_ _Post_ _SA_annotes0(SAL_sameIRQL)
83#define _IRQL_restores_ _Post_ _SA_annotes0(SAL_restoreIRQL)
84#define _IRQL_restores_global_(kind,param) _Post_ _SA_annotes2(SAL_restoreIRQLGlobal, #kind, param\t)
85#define _IRQL_saves_ _Post_ _SA_annotes0(SAL_saveIRQL)
86#define _IRQL_saves_global_(kind,param) _Post_ _SA_annotes2(SAL_saveIRQLGlobal,#kind, param\t)
87#define _IRQL_uses_cancel_ _Post_ _SA_annotes0(SAL_UseCancelIrql)
88#define _IRQL_is_cancel_ _IRQL_uses_cancel_ _Releases_nonreentrant_lock_(_Global_cancel_spin_lock_) \
89 _At_(return, _IRQL_always_function_min_(DISPATCH_LEVEL) _IRQL_requires_(DISPATCH_LEVEL))
90#define __drv_setsIRQL(irql) _Post_ _SA_annotes1(SAL_IRQL,irql)
91#define __drv_raisesIRQL(irql) _IRQL_raises_(irql)
92#define __drv_requiresIRQL(irql) _IRQL_requires_(irql)
93#define __drv_maxIRQL(irql) _IRQL_requires_max_(irql)
94#define __drv_minIRQL(irql) _IRQL_requires_min_(irql)
95#define __drv_savesIRQL _IRQL_saves_
96#define __drv_savesIRQLGlobal(kind,param) _IRQL_saves_global_(kind,param)
97#define __drv_restoresIRQL _IRQL_restores_
98#define __drv_restoresIRQLGlobal(kind,param) _IRQL_restores_global_(kind,param)
99#define __drv_minFunctionIRQL(irql) _IRQL_always_function_min_(irql)
100#define __drv_maxFunctionIRQL(irql) _IRQL_always_function_max_(irql)
101#define __drv_sameIRQL _IRQL_requires_same_
102#define __drv_useCancelIRQL _IRQL_uses_cancel_
103#define __drv_isCancelIRQL _IRQL_is_cancel_
#define __ANNOTATION(fun)