summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1997-04-09 20:05:59 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1997-04-09 20:05:59 +0000
commite39e6f77cf9dcad2fbf155f0e05110407d0e0cb5 (patch)
treea163e64aabe28c82564bd82e25467c05c8279059 /c/src/lib/libc
parentcorrect incorrect register addresses for port a. (diff)
downloadrtems-e39e6f77cf9dcad2fbf155f0e05110407d0e0cb5.tar.bz2
added code to prevent attempts to clean up the library when rtems is
down.
Diffstat (limited to 'c/src/lib/libc')
-rw-r--r--c/src/lib/libc/newlibc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/c/src/lib/libc/newlibc.c b/c/src/lib/libc/newlibc.c
index af3023fac2..cbf073cc13 100644
--- a/c/src/lib/libc/newlibc.c
+++ b/c/src/lib/libc/newlibc.c
@@ -79,6 +79,14 @@ extern void _reclaim_reent(struct _reent *);
void
libc_wrapup(void)
{
+ /*
+ * In case RTEMS is already down, don't do this. It could be
+ * dangerous.
+ */
+
+ if (!_System_state_Is_up(_System_state_Get()))
+ return;
+
_wrapup_reent(0);
if (_REENT != &libc_global_reent)
{