summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/smp.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-07 06:25:03 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-09 15:27:29 +0100
commit1c46b80329d5d099022d8c7e0a8c593845120729 (patch)
tree10806fd4ca26dd0a7b3410baf1187575d6bc8102 /cpukit/score/src/smp.c
parentscore: Avoid _Scheduler_Get_by_CPU_index( 0 ) (diff)
downloadrtems-1c46b80329d5d099022d8c7e0a8c593845120729.tar.bz2
score: Add scheduler to per-CPU information
This makes it possible to adjust the scheduler of a processor at run-time. Update #2797.
Diffstat (limited to 'cpukit/score/src/smp.c')
-rw-r--r--cpukit/score/src/smp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c
index f383f6de97..c880d7eb5d 100644
--- a/cpukit/score/src/smp.c
+++ b/cpukit/score/src/smp.c
@@ -66,11 +66,15 @@ static void _SMP_Start_processors( uint32_t cpu_count )
cpu->online = started;
if ( started ) {
- Scheduler_Context *context =
- _Scheduler_Get_context( assignment->scheduler );
+ const Scheduler_Control *scheduler;
+ Scheduler_Context *context;
+
+ scheduler = assignment->scheduler;
+ context = _Scheduler_Get_context( scheduler );
++context->processor_count;
- cpu->scheduler_context = context;
+ cpu->Scheduler.control = scheduler;
+ cpu->Scheduler.context = context;
_Processor_mask_Set( _SMP_Online_processors, cpu_index );
}