summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/threaddispatch.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-13 10:16:32 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-20 07:49:38 +0200
commit0475cca9a015a7b43209270ca6e40aebf177639a (patch)
treeb00c86af4e0725c040f02cabf506ca42ad413dd8 /cpukit/score/include/rtems/score/threaddispatch.h
parentscore: Add _Thread_Clear_state_locked() (diff)
downloadrtems-0475cca9a015a7b43209270ca6e40aebf177639a.tar.bz2
score: Add _Thread_Dispatch_disable_with_CPU()
Update #2555. Update #2626.
Diffstat (limited to 'cpukit/score/include/rtems/score/threaddispatch.h')
-rw-r--r--cpukit/score/include/rtems/score/threaddispatch.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/cpukit/score/include/rtems/score/threaddispatch.h b/cpukit/score/include/rtems/score/threaddispatch.h
index 4ef5538f7e..bf846e3497 100644
--- a/cpukit/score/include/rtems/score/threaddispatch.h
+++ b/cpukit/score/include/rtems/score/threaddispatch.h
@@ -238,23 +238,23 @@ void _Thread_Do_dispatch( Per_CPU_Control *cpu_self, ISR_Level level );
/**
* @brief Disables thread dispatching inside a critical section (interrupts
- * disabled).
+ * disabled) with the current processor.
*
* This function does not acquire the Giant lock.
*
+ * @param[in] cpu_self The current processor.
* @param[in] lock_context The lock context of the corresponding
* _ISR_lock_ISR_disable() that started the critical section.
*
* @return The current processor.
*/
-RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_critical(
+RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_with_CPU(
+ Per_CPU_Control *cpu_self,
const ISR_lock_Context *lock_context
)
{
- Per_CPU_Control *cpu_self;
- uint32_t disable_level;
+ uint32_t disable_level;
- cpu_self = _Per_CPU_Get();
disable_level = cpu_self->thread_dispatch_disable_level;
_Profiling_Thread_dispatch_disable_critical(
cpu_self,
@@ -267,6 +267,24 @@ RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_critical(
}
/**
+ * @brief Disables thread dispatching inside a critical section (interrupts
+ * disabled).
+ *
+ * This function does not acquire the Giant lock.
+ *
+ * @param[in] lock_context The lock context of the corresponding
+ * _ISR_lock_ISR_disable() that started the critical section.
+ *
+ * @return The current processor.
+ */
+RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_critical(
+ const ISR_lock_Context *lock_context
+)
+{
+ return _Thread_Dispatch_disable_with_CPU( _Per_CPU_Get(), lock_context );
+}
+
+/**
* @brief Disables thread dispatching.
*
* This function does not acquire the Giant lock.