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/libcsupport | |
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/libcsupport')
-rw-r--r-- | cpukit/libcsupport/src/malloc_deferred.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/realloc.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/sup_fs_location.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/libcsupport/src/malloc_deferred.c b/cpukit/libcsupport/src/malloc_deferred.c index d1ad56f64b..a2e95ea9ce 100644 --- a/cpukit/libcsupport/src/malloc_deferred.c +++ b/cpukit/libcsupport/src/malloc_deferred.c @@ -31,7 +31,7 @@ RTEMS_CHAIN_DEFINE_EMPTY(RTEMS_Malloc_GC_list); bool malloc_is_system_state_OK(void) { - if ( _Thread_Dispatch_in_critical_section() ) + if ( !_Thread_Dispatch_is_enabled() ) return false; if ( _ISR_Nest_level > 0 ) diff --git a/cpukit/libcsupport/src/realloc.c b/cpukit/libcsupport/src/realloc.c index eee6f79e69..a831cae110 100644 --- a/cpukit/libcsupport/src/realloc.c +++ b/cpukit/libcsupport/src/realloc.c @@ -38,7 +38,7 @@ void *realloc( */ if (_System_state_Is_up(_System_state_Get())) { - if (_Thread_Dispatch_in_critical_section()) + if (!_Thread_Dispatch_is_enabled()) return (void *) 0; if (_ISR_Nest_level > 0) diff --git a/cpukit/libcsupport/src/sup_fs_location.c b/cpukit/libcsupport/src/sup_fs_location.c index 2ce514549e..b4713c554c 100644 --- a/cpukit/libcsupport/src/sup_fs_location.c +++ b/cpukit/libcsupport/src/sup_fs_location.c @@ -178,7 +178,7 @@ void rtems_filesystem_global_location_release( rtems_filesystem_global_location_t *global_loc ) { - if (!_Thread_Dispatch_in_critical_section()) { + if (_Thread_Dispatch_is_enabled()) { release_with_count(global_loc, 1); } else { if (global_loc->deferred_released_count == 0) { |