diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-03-28 18:58:12 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-03-28 18:58:12 +0000 |
commit | 4fbd8f7aa9b597829874c51cc846d95b5181f80d (patch) | |
tree | 1ea90f410d8fac4f2d5f7f51177a8b54b1bc4fbc | |
parent | 2007-03-28 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-4fbd8f7aa9b597829874c51cc846d95b5181f80d.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.
-rw-r--r-- | cpukit/ChangeLog | 7 | ||||
-rw-r--r-- | cpukit/libcsupport/Makefile.am | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/__assert.c | 21 |
3 files changed, 29 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index d53dbcc819..41ac040846 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,10 @@ +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. + 2007-03-28 Ralf Corsépius <ralf.corsepius@rtems.org> * librpc/src/rpc/clnt_tcp.c (clnttcp_create): diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am index e91b7927da..add1f50e63 100644 --- a/cpukit/libcsupport/Makefile.am +++ b/cpukit/libcsupport/Makefile.am @@ -33,7 +33,7 @@ include_rtems_zilog_HEADERS = include/zilog/z8036.h include/zilog/z8530.h \ include/zilog/z8536.h ## General stuff -ERROR_C_FILES = src/error.c +ERROR_C_FILES = src/error.c src/__assert.c ASSOCIATION_C_FILES = src/assoc.c src/assoclocalbyname.c \ src/assoclocalbyremotebitfield.c src/assoclocalbyremote.c \ 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); +} |