diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-03-28 19:06:33 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-03-28 19:06:33 +0000 |
commit | 53d549649f7d8ebd0cfdb26b07c84f05c05f41d6 (patch) | |
tree | 9c67cdd629816c48e807fbf04978cc96e3c1baa3 /cpukit | |
parent | 2007-03-28 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-53d549649f7d8ebd0cfdb26b07c84f05c05f41d6.tar.bz2 |
2007-03-28 Joel Sherrill <joel@OARcorp.com>
PR 1234/cpukit
* libcsupport/Makefile.am: Provide printk() based implementation of
__assert() to reduce dependencies in executables.
* libcsupport/src/__assert.c: New file.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 1 | ||||
-rw-r--r-- | cpukit/libcsupport/src/__assert.c | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 94abafa65f..e0f2ca82f6 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -3,6 +3,7 @@ PR 1234/cpukit * libcsupport/Makefile.am: Provide printk() based implementation of __assert() to reduce dependencies in executables. + * libcsupport/src/__assert.c: New file. 2007-03-26 Joel Sherrill <joel@OARcorp.com> diff --git a/cpukit/libcsupport/src/__assert.c b/cpukit/libcsupport/src/__assert.c new file mode 100644 index 0000000000..18e62a75dc --- /dev/null +++ b/cpukit/libcsupport/src/__assert.c @@ -0,0 +1,21 @@ +/* __assert - small RTEMS Specific Implementation + * + * COPYRIGHT (c) 2007. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <rtems/bspIo.h> +#include <rtems.h> + +void __assert(const char *file, int line, const char *failedexpr) +{ + printk("assertion \"%s\" failed: file \"%s\", line %d\n", + failedexpr, file, line); + rtems_fatal_error_occurred(0); +} |