reactos/include/ddk/kernelspecs.h
Hermès Bélusca-Maïto b819608ed8 Create a branch for console restructuration work.
svn path=/branches/condrv_restructure/; revision=63104
2014-05-02 14:13:40 +00:00

110 lines
4.1 KiB
C

/*
* kernelspecs.h
*
* SAL 2 annotations for kernel mode drivers
*
* This file is part of the ReactOS DDK package.
*
* Contributor:
* Timo Kreuzer (timo.kreuzer@reactos.org)
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#pragma once
#define KERNELSPECS_H
#include "driverspecs.h"
#ifdef _PREFAST_
#undef _IRQL_always_function_max_
#undef _IRQL_always_function_min_
#undef _IRQL_raises_
#undef _IRQL_requires_
#undef _IRQL_requires_max_
#undef _IRQL_requires_min_
#undef _IRQL_requires_same_
#undef _IRQL_restores_
#undef _IRQL_restores_global_
#undef _IRQL_saves_
#undef _IRQL_saves_global_
#undef _IRQL_uses_cancel_
#undef _IRQL_is_cancel_
#undef __drv_setsIRQL
#undef __drv_raisesIRQL
#undef __drv_requiresIRQL
#undef __drv_maxIRQL
#undef __drv_minIRQL
#undef __drv_savesIRQL
#undef __drv_savesIRQLGlobal
#undef __drv_restoresIRQL
#undef __drv_restoresIRQLGlobal
#undef __drv_minFunctionIRQL
#undef __drv_maxFunctionIRQL
#undef __drv_sameIRQL
#undef __drv_useCancelIRQL
#undef __drv_isCancelIRQL
#define _IRQL_always_function_max_(irql) _Pre_ _SA_annotes1(SAL_maxFunctionIrql,irql)
#define _IRQL_always_function_min_(irql) _Pre_ _SA_annotes1(SAL_minFunctionIrql,irql)
#define _IRQL_raises_(irql) _Post_ _SA_annotes1(SAL_raiseIRQL,irql)
#define _IRQL_requires_(irql) _Pre_ _SA_annotes1(SAL_IRQL,irql)
#define _IRQL_requires_max_(irql) _Pre_ _SA_annotes1(SAL_maxIRQL,irql)
#define _IRQL_requires_min_(irql) _Pre_ _SA_annotes1(SAL_minIRQL,irql)
#define _IRQL_requires_same_ _Post_ _SA_annotes0(SAL_sameIRQL)
#define _IRQL_restores_ _Post_ _SA_annotes0(SAL_restoreIRQL)
#define _IRQL_restores_global_(kind,param) _Post_ _SA_annotes2(SAL_restoreIRQLGlobal, #kind, param\t)
#define _IRQL_saves_ _Post_ _SA_annotes0(SAL_saveIRQL)
#define _IRQL_saves_global_(kind,param) _Post_ _SA_annotes2(SAL_saveIRQLGlobal,#kind, param\t)
#define _IRQL_uses_cancel_ _Post_ _SA_annotes0(SAL_UseCancelIrql)
#define _IRQL_is_cancel_ _IRQL_uses_cancel_ _Releases_nonreentrant_lock_(_Global_cancel_spin_lock_) \
_At_(return, _IRQL_always_function_min_(2 /*DISPATCH_LEVEL*/) _IRQL_requires_(2 /*DISPATCH_LEVEL*/))
#define __drv_setsIRQL(irql) _Post_ _SA_annotes1(SAL_IRQL,irql)
#define __drv_raisesIRQL _IRQL_raises_
#define __drv_requiresIRQL _IRQL_requires_
#define __drv_maxIRQL _IRQL_requires_max_
#define __drv_minIRQL _IRQL_requires_min_
#define __drv_savesIRQL _IRQL_saves_
#define __drv_savesIRQLGlobal _IRQL_saves_global_
#define __drv_restoresIRQL _IRQL_restores_
#define __drv_restoresIRQLGlobal _IRQL_restores_global_
#define __drv_minFunctionIRQL _IRQL_always_function_min_
#define __drv_maxFunctionIRQL _IRQL_always_function_max_
#define __drv_sameIRQL _IRQL_requires_same_
#define __drv_useCancelIRQL _IRQL_uses_cancel_
#define __drv_isCancelIRQL _IRQL_is_cancel_
#ifdef __cplusplus
extern "C" {
#endif
__ANNOTATION(SAL_IRQL(__int64);)
__ANNOTATION(SAL_raiseIRQL(__int64);)
__ANNOTATION(SAL_IRQL(__int64);)
__ANNOTATION(SAL_maxIRQL(__int64);)
__ANNOTATION(SAL_minIRQL(__int64);)
__ANNOTATION(SAL_saveIRQL(void);)
__ANNOTATION(SAL_saveIRQLGlobal(_In_ char *, ...);)
__ANNOTATION(SAL_restoreIRQL(void);)
__ANNOTATION(SAL_restoreIRQLGlobal(_In_ char *, ...);)
__ANNOTATION(SAL_minFunctionIrql(__int64);)
__ANNOTATION(SAL_maxFunctionIrql(__int64);)
__ANNOTATION(SAL_sameIRQL(void);)
__ANNOTATION(SAL_UseCancelIrql(void);)
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* _PREFAST_ */