summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/heapfree.c
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2011-04-21 19:05:15 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2011-04-21 19:05:15 +0000
commitd7c388321ad2f250cb35f01dc4c8dda7489c3416 (patch)
tree292c6c350e7f96ddb3cc0a910433ceb296c24db1 /cpukit/score/src/heapfree.c
parent2011-04-21 Jennifer Averett <Jennifer.Averett@OARcorp.com (diff)
downloadrtems-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/score/src/heapfree.c')
-rw-r--r--cpukit/score/src/heapfree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/score/src/heapfree.c b/cpukit/score/src/heapfree.c
index 25a1e6964d..d7ed523a3c 100644
--- a/cpukit/score/src/heapfree.c
+++ b/cpukit/score/src/heapfree.c
@@ -89,7 +89,7 @@
* is the task stack of a thread that deletes itself. The thread dispatch
* disable level is a way to detect this use case.
*/
- if ( _Thread_Dispatch_disable_level == 0 ) {
+ if ( !_Thread_Dispatch_in_critical_section() ) {
Heap_Block *const next = block->Protection_begin.next_delayed_free_block;
if ( next == NULL ) {
_Heap_Protection_delay_block_free( heap, block );