diff options
author | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2011-04-21 19:05:15 +0000 |
---|---|---|
committer | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2011-04-21 19:05:15 +0000 |
commit | d7c388321ad2f250cb35f01dc4c8dda7489c3416 (patch) | |
tree | 292c6c350e7f96ddb3cc0a910433ceb296c24db1 /cpukit/libcsupport | |
parent | 2011-04-21 Jennifer Averett <Jennifer.Averett@OARcorp.com (diff) | |
download | rtems-d7c388321ad2f250cb35f01dc4c8dda7489c3416.tar.bz2 |
2011-04-21 Jennifer Averett <Jennifer.Averett@OARcorp.com
PR 1777/cpukit
* libcsupport/src/malloc_deferred.c, libcsupport/src/realloc.c,
score/Makefile.am, score/cpu/lm32/irq.c, score/cpu/nios2/irq.c,
score/include/rtems/score/coremutex.h,
score/include/rtems/score/thread.h,
score/inline/rtems/score/thread.inl, score/src/heapfree.c,
score/src/pheapwalk.c, score/src/smp.c, score/src/threaddispatch.c:
Consolidated access to _Thread_Dispatch_disable_level.
* score/src/threaddisabledispatch.c, score/src/threadenabledispatch.c:
New files.
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r-- | cpukit/libcsupport/src/malloc_deferred.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/realloc.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/libcsupport/src/malloc_deferred.c b/cpukit/libcsupport/src/malloc_deferred.c index 4289a899bc..c5138d7ade 100644 --- a/cpukit/libcsupport/src/malloc_deferred.c +++ b/cpukit/libcsupport/src/malloc_deferred.c @@ -26,7 +26,7 @@ rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { - if ( _Thread_Dispatch_disable_level > 0 ) + if ( _Thread_Dispatch_in_critical_section() ) return false; if ( _ISR_Nest_level > 0 ) diff --git a/cpukit/libcsupport/src/realloc.c b/cpukit/libcsupport/src/realloc.c index 3689f32e61..a21288e51c 100644 --- a/cpukit/libcsupport/src/realloc.c +++ b/cpukit/libcsupport/src/realloc.c @@ -35,7 +35,7 @@ void *realloc( */ if (_System_state_Is_up(_System_state_Get())) { - if (_Thread_Dispatch_disable_level > 0) + if (_Thread_Dispatch_in_critical_section()) return (void *) 0; if (_ISR_Nest_level > 0) |