summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2011-05-23 13:30:15 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2011-05-23 13:30:15 +0000
commit3a8a9997866ded736b038322be6adccee63eb3bd (patch)
tree64909329b677082e99d3d8bcb71795a43e70192d /cpukit/score/include
parentFix typo. (diff)
downloadrtems-3a8a9997866ded736b038322be6adccee63eb3bd.tar.bz2
2011-05-23 Jennifer Averett <Jennifer.Averett@OARcorp.com>
* score/Makefile.am, score/include/rtems/score/thread.h, score/inline/rtems/score/thread.inl: Add smp support to dispable dispatch level accesses. * score/src/threaddispatchdisablelevel.c: New file.
Diffstat (limited to 'cpukit/score/include')
-rw-r--r--cpukit/score/include/rtems/score/thread.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index 785d8a149e..c3462024d9 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -464,6 +464,14 @@ SCORE_EXTERN Context_Control _Thread_BSP_context;
*/
SCORE_EXTERN volatile uint32_t _Thread_Dispatch_disable_level;
+#if defined(RTEMS_SMP)
+ /**
+ * The following declares the smp spinlock to be used to control
+ * the dispatch critical section accesses across cpus.
+ */
+ SCORE_EXTERN SMP_lock_spinlock_nested_Control _Thread_Dispatch_disable_level_lock;
+#endif
+
/**
* The following holds how many user extensions are in the system. This
* is used to determine how many user extension data areas to allocate
@@ -784,6 +792,53 @@ void _Thread_blocking_operation_Cancel(
ISR_Level level
);
+
+#if defined(RTEMS_SMP)
+
+ /** @brief _Thread_Dispatch_initialization
+ *
+ * This routine initializes the thread dispatching subsystem.
+ */
+ void _Thread_Dispatch_initialization(void);
+
+ /** @brief _Thread_Dispatch_in_critical_section
+ *
+ * This routine returns true if thread dispatch indicates
+ * that we are in a critical section.
+ */
+ bool _Thread_Dispatch_in_critical_section(void);
+
+ /** @brief _Thread_Dispatch_get_disable_level
+ *
+ * This routine returns value of the the thread dispatch level.
+ */
+ uint32_t _Thread_Dispatch_get_disable_level(void);
+
+ /** @brief _Thread_Dispatch_set_disable_level
+ *
+ * This routine sets thread dispatch level to the
+ * value passed in.
+ */
+ uint32_t _Thread_Dispatch_set_disable_level(uint32_t value);
+
+ /** @brief _Thread_Dispatch_increment_disable_level
+ *
+ * This rountine increments the thread dispatch level
+ */
+ uint32_t _Thread_Dispatch_increment_disable_level(void);
+
+ /** @brief _Thread_Dispatch_decrement_disable_level
+ *
+ * This routine decrements the thread dispatch level.
+ */
+ uint32_t _Thread_Dispatch_decrement_disable_level(void);
+
+#else
+ /*
+ * The _Thread_Dispatch_... functions are in thread.inl
+ */
+#endif
+
#ifndef __RTEMS_APPLICATION__
#include <rtems/score/thread.inl>
#endif