summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/__assert.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-03-28 18:58:12 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-03-28 18:58:12 +0000
commit4fbd8f7aa9b597829874c51cc846d95b5181f80d (patch)
tree1ea90f410d8fac4f2d5f7f51177a8b54b1bc4fbc /cpukit/libcsupport/src/__assert.c
parent2007-03-28 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-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.
Diffstat (limited to 'cpukit/libcsupport/src/__assert.c')
-rw-r--r--cpukit/libcsupport/src/__assert.c21
1 files changed, 21 insertions, 0 deletions
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);
+}