1 /*
2  * Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
3  *
4  * SPDX-License-Identifier: BSD-2-Clause
5  */
6 
7 /**
8  * Declares macros and methods which are conditional based
9  * on NDEBUG. If  NDEBUG is defined then seL4_DebugAssert
10  * is a NOP, otherwise it invokes the unconditional version
11  * in sel4/assert.h.
12  */
13 #pragma once
14 
15 #ifdef NDEBUG
16 
17 /** NDEBUG is defined do nothing */
18 #define seL4_DebugAssert(expr) ((void)(0))
19 
20 #else // NDEBUG is not defined
21 
22 #include <sel4/assert.h>
23 
24 /**
25  * NDEBUG is not defined invoke seL4_Assert(expr).
26  */
27 #define seL4_DebugAssert(expr) seL4_Assert(expr)
28 
29 #endif // NDEBUG
30 
31