blob: bd1dbe991383c7b3d79928d9b03cc43d6c14655f (
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
|
/*
* @file assert.h
*
* @brief This file contains the assert macro for SBE
*/
#ifndef SBE_ASSERT_H
#define SBE_ASSERT_H
#include "sbetrace.H"
//@TODO via RTC 129166
//inject exception to halt SBE. Also see if we can use some
//PK kernel API.
#ifndef NDEBUG
#define assert(expr) \
if( !(expr )) \
{ \
SBE_ERROR("assertion failed: "#expr); \
} \
#else
#define assert(expr)
#endif //NDEBUG
#endif // SBE_ASSERT_H
|