summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-03-28 19:06:33 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-03-28 19:06:33 +0000
commit53d549649f7d8ebd0cfdb26b07c84f05c05f41d6 (patch)
tree9c67cdd629816c48e807fbf04978cc96e3c1baa3 /cpukit
parent2007-03-28 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-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/ChangeLog1
-rw-r--r--cpukit/libcsupport/src/__assert.c21
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);
+}