summaryrefslogtreecommitdiffstats
path: root/cpukit/score/inline/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-05 11:48:57 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-07 17:06:43 +0200
commit2d2352bab92c51c2fd857b9555242545bd08c95e (patch)
treede11a05e5b361a161e93c98866aa704ed24ed3ae /cpukit/score/inline/rtems
parentscore: Add _Objects_Put_for_get_isr_disable() (diff)
downloadrtems-2d2352bab92c51c2fd857b9555242545bd08c95e.tar.bz2
score: Add and use _Objects_Put()
Add and use _Objects_Put_without_thread_dispatch(). These two functions pair with the _Objects_Get() function. This helps to introduce object specific SMP locks to avoid lock contention.
Diffstat (limited to 'cpukit/score/inline/rtems')
-rw-r--r--cpukit/score/inline/rtems/score/object.inl29
1 files changed, 29 insertions, 0 deletions
diff --git a/cpukit/score/inline/rtems/score/object.inl b/cpukit/score/inline/rtems/score/object.inl
index 54365fa8eb..bab5f984e3 100644
--- a/cpukit/score/inline/rtems/score/object.inl
+++ b/cpukit/score/inline/rtems/score/object.inl
@@ -377,6 +377,35 @@ RTEMS_INLINE_ROUTINE bool _Objects_Is_unlimited( uint32_t maximum )
#endif
/**
+ * @brief Puts back an object obtained with _Objects_Get().
+ *
+ * This function decrements the thread dispatch disable level. The
+ * _Thread_Dispatch() is called if the level reaches zero.
+ */
+RTEMS_INLINE_ROUTINE void _Objects_Put(
+ Objects_Control *the_object
+)
+{
+ (void) the_object;
+ _Thread_Enable_dispatch();
+}
+
+/**
+ * @brief Puts back an object obtained with _Objects_Get().
+ *
+ * This function decrements the thread dispatch disable level. The
+ * _Thread_Dispatch() is not called if the level reaches zero, thus a thread
+ * dispatch will not take place immediately on the current processor.
+ */
+RTEMS_INLINE_ROUTINE void _Objects_Put_without_thread_dispatch(
+ Objects_Control *the_object
+)
+{
+ (void) the_object;
+ _Thread_Unnest_dispatch();
+}
+
+/**
* @brief Puts back an object obtained with _Objects_Get_isr_disable().
*/
RTEMS_INLINE_ROUTINE void _Objects_Put_for_get_isr_disable(