]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - drivers/net/npe/include/IxOsalAssert.h
Merge 'u-boot-microblaze/zynq' into (u-boot-arm/master'
[karo-tx-uboot.git] / drivers / net / npe / include / IxOsalAssert.h
1 /*
2  * @file        IxOsalAssert.h 
3  * @author      Intel Corporation
4  * @date        25-08-2004
5  *
6  * @brief       description goes here
7  *
8  * @par
9  * IXP400 SW Release version 2.0
10  * 
11  * -- Copyright Notice --
12  * 
13  * @par
14  * Copyright 2001-2005, Intel Corporation.
15  * All rights reserved.
16  * 
17  * @par
18  * SPDX-License-Identifier:     BSD-3-Clause
19  * @par
20  * -- End of Copyright Notice --
21  */
22
23 #ifndef IX_OSAL_ASSERT_H
24 #define IX_OSAL_ASSERT_H
25
26 /*
27  * Put the system defined include files required
28  * @par
29  * <TAGGED>
30  */
31
32 #include "IxOsalOsAssert.h"
33
34 /**
35  * @brief Assert macro, assert the condition is true. This
36  *        will not be compiled out.
37  *        N.B. will result in a system crash if it is false.
38  */
39 #define IX_OSAL_ASSERT(c) IX_OSAL_OS_ASSERT(c)
40
41
42 /**
43  * @brief Ensure macro, ensure the condition is true.
44  *        This will be conditionally compiled out and
45  *        may be used for test purposes.
46  */
47 #ifdef IX_OSAL_ENSURE_ON
48 #define IX_OSAL_ENSURE(c, str) do { \
49 if (!(c)) ixOsalLog (IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, str, \
50 0, 0, 0, 0, 0, 0); } while (0)
51
52 #else
53 #define IX_OSAL_ENSURE(c, str)
54 #endif
55
56
57 #endif /* IX_OSAL_ASSERT_H */