4.115
Last change
on this file since 95519eed was
95519eed,
checked in by Sebastian Huber <sebastian.huber@…>, on 07/22/13 at 15:56:07
|
score: New header file <rtems/score/assert.h>
|
-
Property mode set to
100644
|
File size:
941 bytes
|
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2013 embedded brains GmbH. All rights reserved. |
---|
3 | * |
---|
4 | * embedded brains GmbH |
---|
5 | * Dornierstr. 4 |
---|
6 | * 82178 Puchheim |
---|
7 | * Germany |
---|
8 | * <rtems@embedded-brains.de> |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.com/license/LICENSE. |
---|
13 | */ |
---|
14 | |
---|
15 | #ifndef _RTEMS_SCORE_ASSERT_H |
---|
16 | #define _RTEMS_SCORE_ASSERT_H |
---|
17 | |
---|
18 | #include <rtems/score/basedefs.h> |
---|
19 | |
---|
20 | #if defined( RTEMS_DEBUG ) |
---|
21 | #include <assert.h> |
---|
22 | #endif |
---|
23 | |
---|
24 | #ifdef __cplusplus |
---|
25 | extern "C" { |
---|
26 | #endif /* __cplusplus */ |
---|
27 | |
---|
28 | /** |
---|
29 | * @brief Assertion similar to assert() controlled via RTEMS_DEBUG instead of |
---|
30 | * NDEBUG. |
---|
31 | */ |
---|
32 | #if defined( RTEMS_DEBUG ) |
---|
33 | #define _Assert( _e ) \ |
---|
34 | ( ( _e ) ? \ |
---|
35 | ( void ) 0 : \ |
---|
36 | __assert_func( __FILE__, __LINE__, __ASSERT_FUNC, #_e ) ) |
---|
37 | #else |
---|
38 | #define _Assert( _e ) ( ( void ) 0 ) |
---|
39 | #endif |
---|
40 | |
---|
41 | #ifdef __cplusplus |
---|
42 | } |
---|
43 | #endif /* __cplusplus */ |
---|
44 | |
---|
45 | #endif /* _RTEMS_SCORE_ASSERT_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.