summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/malloc_deferred.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport/src/malloc_deferred.c')
-rw-r--r--cpukit/libcsupport/src/malloc_deferred.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/cpukit/libcsupport/src/malloc_deferred.c b/cpukit/libcsupport/src/malloc_deferred.c
index f15e71153f..81559c4c39 100644
--- a/cpukit/libcsupport/src/malloc_deferred.c
+++ b/cpukit/libcsupport/src/malloc_deferred.c
@@ -27,16 +27,15 @@
#include "malloc_p.h"
+#include <rtems/score/sysstate.h>
#include <rtems/score/threaddispatch.h>
RTEMS_CHAIN_DEFINE_EMPTY(RTEMS_Malloc_GC_list);
bool malloc_is_system_state_OK(void)
{
- if ( !_Thread_Dispatch_is_enabled() )
- return false;
-
- return true;
+ return !_System_state_Is_up( _System_state_Get() )
+ || _Thread_Dispatch_is_enabled();
}
void malloc_deferred_frees_process(void)