diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-12 09:25:39 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-14 16:26:06 +0200 |
commit | 49cdf40afa1b67b1eedbec26b73c59f54dc882cd (patch) | |
tree | d5f27895d8bb30533150c66fd019a18291a52e6a /cpukit/score/src | |
parent | score: Add _Chain_Insert_ordered_unprotected() (diff) | |
download | rtems-49cdf40afa1b67b1eedbec26b73c59f54dc882cd.tar.bz2 |
score: Add and use _Thread_Dispatch_is_enabled()
Delete _Thread_Dispatch_in_critical_section() and
_Thread_Is_dispatching_enabled().
Diffstat (limited to 'cpukit/score/src')
-rw-r--r-- | cpukit/score/src/heapfree.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/pheapwalk.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/threaddispatchdisablelevel.c | 8 |
3 files changed, 2 insertions, 10 deletions
diff --git a/cpukit/score/src/heapfree.c b/cpukit/score/src/heapfree.c index d53a54de77..30a84a08b4 100644 --- a/cpukit/score/src/heapfree.c +++ b/cpukit/score/src/heapfree.c @@ -87,7 +87,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_in_critical_section() ) { + if ( _Thread_Dispatch_is_enabled() ) { Heap_Block *const next = block->Protection_begin.next_delayed_free_block; if ( next == NULL ) { _Heap_Protection_delay_block_free( heap, block ); diff --git a/cpukit/score/src/pheapwalk.c b/cpukit/score/src/pheapwalk.c index 12b2a6d2a8..d06d8bca67 100644 --- a/cpukit/score/src/pheapwalk.c +++ b/cpukit/score/src/pheapwalk.c @@ -37,7 +37,7 @@ bool _Protected_heap_Walk( * * NOTE: Dispatching is also disabled during initialization. */ - if ( _Thread_Dispatch_in_critical_section() == false ) { + if ( _Thread_Dispatch_is_enabled() ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); diff --git a/cpukit/score/src/threaddispatchdisablelevel.c b/cpukit/score/src/threaddispatchdisablelevel.c index 154a6af637..1f84bfe65c 100644 --- a/cpukit/score/src/threaddispatchdisablelevel.c +++ b/cpukit/score/src/threaddispatchdisablelevel.c @@ -39,14 +39,6 @@ void _Thread_Dispatch_initialization( void ) _Thread_Dispatch_set_disable_level( 1 ); } -bool _Thread_Dispatch_in_critical_section(void) -{ - if ( _Thread_Dispatch_disable_level == 0 ) - return false; - - return true; -} - uint32_t _Thread_Dispatch_get_disable_level(void) { return _Thread_Dispatch_disable_level; |