summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score
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/include/rtems/score
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/include/rtems/score')
-rw-r--r--cpukit/score/include/rtems/score/coremutex.h2
-rw-r--r--cpukit/score/include/rtems/score/thread.h12
2 files changed, 13 insertions, 1 deletions
diff --git a/cpukit/score/include/rtems/score/coremutex.h b/cpukit/score/include/rtems/score/coremutex.h
index 084532f36d..e7174e3164 100644
--- a/cpukit/score/include/rtems/score/coremutex.h
+++ b/cpukit/score/include/rtems/score/coremutex.h
@@ -368,7 +368,7 @@ void _CORE_mutex_Seize_interrupt_blocking(
#define _CORE_mutex_Seize_body( \
_the_mutex, _id, _wait, _timeout, _level ) \
do { \
- if ( _Thread_Dispatch_disable_level \
+ if ( _Thread_Dispatch_in_critical_section() \
&& (_wait) \
&& (_System_state_Get() >= SYSTEM_STATE_BEGIN_MULTITASKING ) \
) { \
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index 8754ee931d..237fbde59c 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -46,6 +46,18 @@
#define RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API
#endif
+#if defined(RTEMS_SMP) || \
+ defined(RTEMS_HEAVY_STACK_DEBUG) || \
+ defined(RTEMS_HEAVY_MALLOC_DEBUG)
+ #define __THREAD_DO_NOT_INLINE_DISABLE_DISPATCH__
+#endif
+
+#if defined(RTEMS_SMP) || \
+ (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \
+ (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1)
+ #define __THREAD_DO_NOT_INLINE_ENABLE_DISPATCH__
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif