diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1997-04-09 20:05:59 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1997-04-09 20:05:59 +0000 |
commit | e39e6f77cf9dcad2fbf155f0e05110407d0e0cb5 (patch) | |
tree | a163e64aabe28c82564bd82e25467c05c8279059 /cpukit/libcsupport/src | |
parent | correct incorrect register addresses for port a. (diff) | |
download | rtems-e39e6f77cf9dcad2fbf155f0e05110407d0e0cb5.tar.bz2 |
added code to prevent attempts to clean up the library when rtems is
down.
Diffstat (limited to 'cpukit/libcsupport/src')
-rw-r--r-- | cpukit/libcsupport/src/newlibc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/newlibc.c b/cpukit/libcsupport/src/newlibc.c index af3023fac2..cbf073cc13 100644 --- a/cpukit/libcsupport/src/newlibc.c +++ b/cpukit/libcsupport/src/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) { |