From 6eba7c857b9e72bc4ed8e55f0c9538c45631484f Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 10 Jun 2013 16:15:46 +0200 Subject: scheduler: Specify thread of yield operation The yielding thread of the yield operation is now specified by a parameter. The tick operation may be performed for each executing thread in a SMP configuration. --- cpukit/score/inline/rtems/score/scheduler.inl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'cpukit/score/inline') diff --git a/cpukit/score/inline/rtems/score/scheduler.inl b/cpukit/score/inline/rtems/score/scheduler.inl index 3201c23e99..dc5bdcc7d2 100644 --- a/cpukit/score/inline/rtems/score/scheduler.inl +++ b/cpukit/score/inline/rtems/score/scheduler.inl @@ -55,16 +55,18 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) } /** - * @brief Scheduler yield. + * @brief Scheduler yield with a particular thread. * - * This routine is invoked when a thread wishes to voluntarily - * transfer control of the processor to another thread. This routine - * always operates on the scheduler that 'owns' the currently executing - * thread. + * This routine is invoked when a thread wishes to voluntarily transfer control + * of the processor to another thread. + * + * @param[in] thread The yielding thread. */ -RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) +RTEMS_INLINE_ROUTINE void _Scheduler_Yield( + Thread_Control *thread +) { - _Scheduler.Operations.yield(); + ( *_Scheduler.Operations.yield )( thread ); } /** -- cgit v1.2.3