summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/threadimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-12-10 14:10:48 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-12-11 08:20:48 +0100
commitdf55d07f2e5c4b1c3d73c4f26a2cbb82f2af261c (patch)
tree7e1ef06ab4df2f97afdc676b7912886aba91d703 /cpukit/score/include/rtems/score/threadimpl.h
parentUse linker set for system initialization (diff)
downloadrtems-df55d07f2e5c4b1c3d73c4f26a2cbb82f2af261c.tar.bz2
score: Untangle thread actions
Remove the thread action handler parameter from _Thread_Action_initialize() and instead set it later in _Thread_Add_post_switch_action(). This avoids a dependency on the thread action handler via the thread initialization.
Diffstat (limited to 'cpukit/score/include/rtems/score/threadimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/threadimpl.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h
index cf32082340..c61dd89f12 100644
--- a/cpukit/score/include/rtems/score/threadimpl.h
+++ b/cpukit/score/include/rtems/score/threadimpl.h
@@ -847,11 +847,9 @@ RTEMS_INLINE_ROUTINE void _Thread_Action_control_initialize(
}
RTEMS_INLINE_ROUTINE void _Thread_Action_initialize(
- Thread_Action *action,
- Thread_Action_handler handler
+ Thread_Action *action
)
{
- action->handler = handler;
_Chain_Set_off_chain( &action->Node );
}
@@ -890,8 +888,9 @@ RTEMS_INLINE_ROUTINE void _Thread_Action_release_and_ISR_enable(
}
RTEMS_INLINE_ROUTINE void _Thread_Add_post_switch_action(
- Thread_Control *thread,
- Thread_Action *action
+ Thread_Control *thread,
+ Thread_Action *action,
+ Thread_Action_handler handler
)
{
Per_CPU_Control *cpu_of_thread;
@@ -899,6 +898,8 @@ RTEMS_INLINE_ROUTINE void _Thread_Add_post_switch_action(
cpu_of_thread = _Thread_Action_ISR_disable_and_acquire( thread, &level );
+ action->handler = handler;
+
#if defined(RTEMS_SMP)
if ( _Per_CPU_Get() == cpu_of_thread ) {
cpu_of_thread->dispatch_necessary = true;