diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-07 06:25:03 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-09 15:27:29 +0100 |
commit | 1c46b80329d5d099022d8c7e0a8c593845120729 (patch) | |
tree | 10806fd4ca26dd0a7b3410baf1187575d6bc8102 /cpukit/score/src/smp.c | |
parent | score: Avoid _Scheduler_Get_by_CPU_index( 0 ) (diff) | |
download | rtems-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.c | 10 |
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 ); } |