From 1c46b80329d5d099022d8c7e0a8c593845120729 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 7 Nov 2016 06:25:03 +0100 Subject: score: Add scheduler to per-CPU information This makes it possible to adjust the scheduler of a processor at run-time. Update #2797. --- cpukit/score/src/smp.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'cpukit/score/src/smp.c') 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 ); } -- cgit v1.2.3