diff options
Diffstat (limited to 'cpukit/score/src/heapfree.c')
-rw-r--r-- | cpukit/score/src/heapfree.c | 2 |
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 ); |