diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-01 11:48:59 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-03 11:13:26 +0200 |
commit | 494c2e300215c4bc539d243d6a5d060e0e2f2ef2 (patch) | |
tree | 8ba7c54667cad8331430bf719b4a1bd94ed3ac8b /cpukit/score/src | |
parent | score: Rename Priority_bit_map_Control (diff) | |
download | rtems-494c2e300215c4bc539d243d6a5d060e0e2f2ef2.tar.bz2 |
score: Move priority bit map to scheduler instance
Delete global variables _Priority_Major_bit_map and _Priority_Bit_map.
This makes it possible to use multiple priority scheduler instances for
example with clustered/partitioned scheduling on SMP.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r-- | cpukit/score/src/prioritybitmap.c | 27 | ||||
-rw-r--r-- | cpukit/score/src/schedulerpriority.c | 10 | ||||
-rw-r--r-- | cpukit/score/src/schedulerpriorityblock.c | 6 | ||||
-rw-r--r-- | cpukit/score/src/schedulerpriorityenqueue.c | 4 | ||||
-rw-r--r-- | cpukit/score/src/schedulerpriorityenqueuefirst.c | 7 | ||||
-rw-r--r-- | cpukit/score/src/schedulerpriorityextract.c | 6 | ||||
-rw-r--r-- | cpukit/score/src/schedulerprioritysmp.c | 115 | ||||
-rw-r--r-- | cpukit/score/src/schedulerpriorityunblock.c | 4 | ||||
-rw-r--r-- | cpukit/score/src/schedulerpriorityupdate.c | 8 | ||||
-rw-r--r-- | cpukit/score/src/schedulersimplesmp.c | 89 | ||||
-rw-r--r-- | cpukit/score/src/schedulersmpstartidle.c | 40 |
11 files changed, 171 insertions, 145 deletions
diff --git a/cpukit/score/src/prioritybitmap.c b/cpukit/score/src/prioritybitmap.c deleted file mode 100644 index d05ede1b7c..0000000000 --- a/cpukit/score/src/prioritybitmap.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * @file - * - * @brief Priority Bit Map Implementation - * - * @ingroup ScorePriorityBitmap - */ - -/* - * Copyright (C) 2010 Gedare Bloom. - * Copyright (C) 2011 On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <rtems/score/prioritybitmapimpl.h> - -Priority_bit_map_Word _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT; - -/* Instantiate any global variables needed by the priority scheduler */ -volatile Priority_bit_map_Word _Priority_Major_bit_map; diff --git a/cpukit/score/src/schedulerpriority.c b/cpukit/score/src/schedulerpriority.c index f393f4f59b..9d1755d024 100644 --- a/cpukit/score/src/schedulerpriority.c +++ b/cpukit/score/src/schedulerpriority.c @@ -23,12 +23,12 @@ void _Scheduler_priority_Initialize(void) { - /* allocate ready queue structures */ - Chain_Control *ready_queues = _Workspace_Allocate_or_fatal_error( - ((size_t) PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) + Scheduler_priority_Control *self = _Workspace_Allocate_or_fatal_error( + sizeof( *self ) + PRIORITY_MAXIMUM * sizeof( Chain_Control ) ); - _Scheduler_priority_Ready_queue_initialize( ready_queues ); + _Priority_bit_map_Initialize( &self->Bit_map ); + _Scheduler_priority_Ready_queue_initialize( &self->Ready[ 0 ] ); - _Scheduler.information = ready_queues; + _Scheduler.information = self; } diff --git a/cpukit/score/src/schedulerpriorityblock.c b/cpukit/score/src/schedulerpriorityblock.c index 7d24d17514..259d6f00e8 100644 --- a/cpukit/score/src/schedulerpriorityblock.c +++ b/cpukit/score/src/schedulerpriorityblock.c @@ -22,12 +22,10 @@ #include <rtems/score/schedulerpriorityimpl.h> -void _Scheduler_priority_Block( - Thread_Control *the_thread -) +void _Scheduler_priority_Block( Thread_Control *the_thread ) { _Scheduler_Generic_block( - _Scheduler_priority_Ready_queue_extract, + _Scheduler_priority_Extract_body, _Scheduler_priority_Schedule_body, the_thread ); diff --git a/cpukit/score/src/schedulerpriorityenqueue.c b/cpukit/score/src/schedulerpriorityenqueue.c index ff1c69d010..54375cde2d 100644 --- a/cpukit/score/src/schedulerpriorityenqueue.c +++ b/cpukit/score/src/schedulerpriorityenqueue.c @@ -24,5 +24,7 @@ void _Scheduler_priority_Enqueue( Thread_Control *the_thread ) { - _Scheduler_priority_Ready_queue_enqueue( the_thread ); + Scheduler_priority_Control *scheduler = _Scheduler_priority_Instance(); + + _Scheduler_priority_Ready_queue_enqueue( the_thread, &scheduler->Bit_map ); } diff --git a/cpukit/score/src/schedulerpriorityenqueuefirst.c b/cpukit/score/src/schedulerpriorityenqueuefirst.c index b9065cc1a3..8de06fa693 100644 --- a/cpukit/score/src/schedulerpriorityenqueuefirst.c +++ b/cpukit/score/src/schedulerpriorityenqueuefirst.c @@ -24,6 +24,11 @@ void _Scheduler_priority_Enqueue_first( Thread_Control *the_thread ) { - _Scheduler_priority_Ready_queue_enqueue_first( the_thread ); + Scheduler_priority_Control *scheduler = _Scheduler_priority_Instance(); + + _Scheduler_priority_Ready_queue_enqueue_first( + the_thread, + &scheduler->Bit_map + ); } diff --git a/cpukit/score/src/schedulerpriorityextract.c b/cpukit/score/src/schedulerpriorityextract.c index 7e45527ce7..e5888dc7d9 100644 --- a/cpukit/score/src/schedulerpriorityextract.c +++ b/cpukit/score/src/schedulerpriorityextract.c @@ -21,9 +21,7 @@ #include <rtems/score/schedulerpriorityimpl.h> -void _Scheduler_priority_Extract( - Thread_Control *the_thread -) +void _Scheduler_priority_Extract( Thread_Control *the_thread ) { - _Scheduler_priority_Ready_queue_extract( the_thread ); + _Scheduler_priority_Extract_body( the_thread ); } diff --git a/cpukit/score/src/schedulerprioritysmp.c b/cpukit/score/src/schedulerprioritysmp.c index dedd270747..458d87bdb7 100644 --- a/cpukit/score/src/schedulerprioritysmp.c +++ b/cpukit/score/src/schedulerprioritysmp.c @@ -7,7 +7,7 @@ */ /* - * Copyright (c) 2013 embedded brains GmbH. All rights reserved. + * Copyright (c) 2013-2014 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Dornierstr. 4 @@ -29,100 +29,141 @@ #include <rtems/score/schedulersmpimpl.h> #include <rtems/score/wkspace.h> +static Scheduler_priority_SMP_Control *_Scheduler_priority_SMP_Instance( void ) +{ + return _Scheduler.information; +} + +static Scheduler_priority_SMP_Control * +_Scheduler_priority_SMP_Self_from_SMP_base( Scheduler_SMP_Control *base ) +{ + return (Scheduler_priority_SMP_Control *) + ( (char *) base + - offsetof( Scheduler_priority_SMP_Control, Base ) ); +} + void _Scheduler_priority_SMP_Initialize( void ) { - Scheduler_SMP_Control *self = _Workspace_Allocate_or_fatal_error( + Scheduler_priority_SMP_Control *self = _Workspace_Allocate_or_fatal_error( sizeof( *self ) + PRIORITY_MAXIMUM * sizeof( Chain_Control ) ); - _Chain_Initialize_empty( &self->scheduled ); - _Scheduler_priority_Ready_queue_initialize( &self->ready[ 0 ] ); + _Scheduler_SMP_Initialize( &self->Base ); + _Priority_bit_map_Initialize( &self->Bit_map ); + _Scheduler_priority_Ready_queue_initialize( &self->Ready[ 0 ] ); _Scheduler.information = self; } void _Scheduler_priority_SMP_Update( Thread_Control *thread ) { - Scheduler_SMP_Control *self = _Scheduler_SMP_Instance(); + Scheduler_priority_SMP_Control *self = _Scheduler_priority_SMP_Instance(); - _Scheduler_priority_Update_body( thread, &self->ready[ 0 ] ); + _Scheduler_priority_Update_body( + thread, + &self->Bit_map, + &self->Ready[ 0 ] + ); } static Thread_Control *_Scheduler_priority_SMP_Get_highest_ready( - Scheduler_SMP_Control *self + Scheduler_SMP_Control *base ) { + Scheduler_priority_SMP_Control *self = + _Scheduler_priority_SMP_Self_from_SMP_base( base ); Thread_Control *highest_ready = NULL; - if ( !_Priority_bit_map_Is_empty() ) { - highest_ready = _Scheduler_priority_Ready_queue_first( &self->ready[ 0 ] ); + if ( !_Priority_bit_map_Is_empty( &self->Bit_map ) ) { + highest_ready = _Scheduler_priority_Ready_queue_first( + &self->Bit_map, + &self->Ready[ 0 ] + ); } return highest_ready; } static void _Scheduler_priority_SMP_Move_from_scheduled_to_ready( - Scheduler_SMP_Control *self, + Scheduler_SMP_Control *base, Thread_Control *scheduled_to_ready ) { + Scheduler_priority_SMP_Control *self = + _Scheduler_priority_SMP_Self_from_SMP_base( base ); + _Chain_Extract_unprotected( &scheduled_to_ready->Object.Node ); - _Scheduler_priority_Ready_queue_enqueue_first( scheduled_to_ready ); + _Scheduler_priority_Ready_queue_enqueue_first( + scheduled_to_ready, + &self->Bit_map + ); } static void _Scheduler_priority_SMP_Move_from_ready_to_scheduled( - Scheduler_SMP_Control *self, + Scheduler_SMP_Control *base, Thread_Control *ready_to_scheduled ) { - _Scheduler_priority_Ready_queue_extract( ready_to_scheduled ); + Scheduler_priority_SMP_Control *self = + _Scheduler_priority_SMP_Self_from_SMP_base( base ); + + _Scheduler_priority_Ready_queue_extract( + ready_to_scheduled, + &self->Bit_map + ); _Scheduler_simple_Insert_priority_fifo( - &self->scheduled, + &self->Base.Scheduled, ready_to_scheduled ); } static void _Scheduler_priority_SMP_Insert_ready_lifo( - Scheduler_SMP_Control *self, + Scheduler_SMP_Control *base, Thread_Control *thread ) { - _Scheduler_priority_Ready_queue_enqueue( thread ); + Scheduler_priority_SMP_Control *self = + _Scheduler_priority_SMP_Self_from_SMP_base( base ); + + _Scheduler_priority_Ready_queue_enqueue( thread, &self->Bit_map ); } static void _Scheduler_priority_SMP_Insert_ready_fifo( - Scheduler_SMP_Control *self, + Scheduler_SMP_Control *base, Thread_Control *thread ) { - _Scheduler_priority_Ready_queue_enqueue_first( thread ); + Scheduler_priority_SMP_Control *self = + _Scheduler_priority_SMP_Self_from_SMP_base( base ); + + _Scheduler_priority_Ready_queue_enqueue_first( thread, &self->Bit_map ); } static void _Scheduler_priority_SMP_Do_extract( - Scheduler_SMP_Control *self, + Scheduler_SMP_Control *base, Thread_Control *thread ) { + Scheduler_priority_SMP_Control *self = + _Scheduler_priority_SMP_Self_from_SMP_base( base ); bool is_scheduled = thread->is_scheduled; - ( void ) self; - thread->is_in_the_air = is_scheduled; thread->is_scheduled = false; if ( is_scheduled ) { _Chain_Extract_unprotected( &thread->Object.Node ); } else { - _Scheduler_priority_Ready_queue_extract( thread ); + _Scheduler_priority_Ready_queue_extract( thread, &self->Bit_map ); } } void _Scheduler_priority_SMP_Block( Thread_Control *thread ) { - Scheduler_SMP_Control *self = _Scheduler_SMP_Instance(); + Scheduler_priority_SMP_Control *self = _Scheduler_priority_SMP_Instance(); _Scheduler_SMP_Block( - self, + &self->Base, thread, _Scheduler_priority_SMP_Do_extract, _Scheduler_priority_SMP_Get_highest_ready, @@ -152,10 +193,10 @@ static void _Scheduler_priority_SMP_Enqueue_ordered( void _Scheduler_priority_SMP_Enqueue_lifo( Thread_Control *thread ) { - Scheduler_SMP_Control *self = _Scheduler_SMP_Instance(); + Scheduler_priority_SMP_Control *self = _Scheduler_priority_SMP_Instance(); _Scheduler_priority_SMP_Enqueue_ordered( - self, + &self->Base, thread, _Scheduler_simple_Insert_priority_lifo_order, _Scheduler_priority_SMP_Insert_ready_lifo, @@ -165,10 +206,10 @@ void _Scheduler_priority_SMP_Enqueue_lifo( Thread_Control *thread ) void _Scheduler_priority_SMP_Enqueue_fifo( Thread_Control *thread ) { - Scheduler_SMP_Control *self = _Scheduler_SMP_Instance(); + Scheduler_priority_SMP_Control *self = _Scheduler_priority_SMP_Instance(); _Scheduler_priority_SMP_Enqueue_ordered( - self, + &self->Base, thread, _Scheduler_simple_Insert_priority_fifo_order, _Scheduler_priority_SMP_Insert_ready_fifo, @@ -178,10 +219,10 @@ void _Scheduler_priority_SMP_Enqueue_fifo( Thread_Control *thread ) void _Scheduler_priority_SMP_Extract( Thread_Control *thread ) { - Scheduler_SMP_Control *self = _Scheduler_SMP_Instance(); + Scheduler_priority_SMP_Control *self = _Scheduler_priority_SMP_Instance(); _Scheduler_SMP_Extract( - self, + &self->Base, thread, _Scheduler_priority_SMP_Do_extract ); @@ -201,12 +242,22 @@ void _Scheduler_priority_SMP_Yield( Thread_Control *thread ) void _Scheduler_priority_SMP_Schedule( Thread_Control *thread ) { - Scheduler_SMP_Control *self = _Scheduler_SMP_Instance(); + Scheduler_priority_SMP_Control *self = _Scheduler_priority_SMP_Instance(); _Scheduler_SMP_Schedule( - self, + &self->Base, thread, _Scheduler_priority_SMP_Get_highest_ready, _Scheduler_priority_SMP_Move_from_ready_to_scheduled ); } + +void _Scheduler_priority_SMP_Start_idle( + Thread_Control *thread, + Per_CPU_Control *cpu +) +{ + Scheduler_priority_SMP_Control *self = _Scheduler_priority_SMP_Instance(); + + _Scheduler_SMP_Start_idle( &self->Base, thread, cpu ); +} diff --git a/cpukit/score/src/schedulerpriorityunblock.c b/cpukit/score/src/schedulerpriorityunblock.c index ad26820bc3..f69c1e2689 100644 --- a/cpukit/score/src/schedulerpriorityunblock.c +++ b/cpukit/score/src/schedulerpriorityunblock.c @@ -26,7 +26,9 @@ void _Scheduler_priority_Unblock ( Thread_Control *the_thread ) { - _Scheduler_priority_Ready_queue_enqueue(the_thread); + Scheduler_priority_Control *scheduler = _Scheduler_priority_Instance(); + + _Scheduler_priority_Ready_queue_enqueue( the_thread, &scheduler->Bit_map ); /* TODO: flash critical section? */ diff --git a/cpukit/score/src/schedulerpriorityupdate.c b/cpukit/score/src/schedulerpriorityupdate.c index 8ebaac7f75..a56acd08d1 100644 --- a/cpukit/score/src/schedulerpriorityupdate.c +++ b/cpukit/score/src/schedulerpriorityupdate.c @@ -25,7 +25,11 @@ void _Scheduler_priority_Update( Thread_Control *the_thread ) { - Chain_Control *ready_queues = _Scheduler_priority_Get_ready_queues(); + Scheduler_priority_Control *scheduler = _Scheduler_priority_Instance(); - _Scheduler_priority_Update_body( the_thread, ready_queues ); + _Scheduler_priority_Update_body( + the_thread, + &scheduler->Bit_map, + &scheduler->Ready[ 0 ] + ); } diff --git a/cpukit/score/src/schedulersimplesmp.c b/cpukit/score/src/schedulersimplesmp.c index f4a20c104b..d222d02d42 100644 --- a/cpukit/score/src/schedulersimplesmp.c +++ b/cpukit/score/src/schedulersimplesmp.c @@ -7,7 +7,7 @@ */ /* - * Copyright (c) 2013 embedded brains GmbH. + * Copyright (c) 2013-2014 embedded brains GmbH. * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -22,23 +22,37 @@ #include <rtems/score/schedulersmpimpl.h> #include <rtems/score/wkspace.h> +static Scheduler_simple_SMP_Control *_Scheduler_simple_SMP_Instance( void ) +{ + return _Scheduler.information; +} + +static Scheduler_simple_SMP_Control * +_Scheduler_simple_SMP_Self_from_SMP_base( Scheduler_SMP_Control *base ) +{ + return (Scheduler_simple_SMP_Control *) + ( (char *) base - offsetof( Scheduler_simple_SMP_Control, Base ) ); +} + void _Scheduler_simple_smp_Initialize( void ) { - Scheduler_SMP_Control *self = + Scheduler_simple_SMP_Control *self = _Workspace_Allocate_or_fatal_error( sizeof( *self ) ); - _Chain_Initialize_empty( &self->ready[ 0 ] ); - _Chain_Initialize_empty( &self->scheduled ); + _Scheduler_SMP_Initialize( &self->Base ); + _Chain_Initialize_empty( &self->Ready ); _Scheduler.information = self; } static Thread_Control *_Scheduler_simple_smp_Get_highest_ready( - Scheduler_SMP_Control *self + Scheduler_SMP_Control *base ) { + Scheduler_simple_SMP_Control *self = + _Scheduler_simple_SMP_Self_from_SMP_base( base ); Thread_Control *highest_ready = NULL; - Chain_Control *ready = &self->ready[ 0 ]; + Chain_Control *ready = &self->Ready; if ( !_Chain_Is_empty( ready ) ) { highest_ready = (Thread_Control *) _Chain_First( ready ); @@ -48,59 +62,68 @@ static Thread_Control *_Scheduler_simple_smp_Get_highest_ready( } static void _Scheduler_simple_smp_Move_from_scheduled_to_ready( - Scheduler_SMP_Control *self, + Scheduler_SMP_Control *base, Thread_Control *scheduled_to_ready ) { + Scheduler_simple_SMP_Control *self = + _Scheduler_simple_SMP_Self_from_SMP_base( base ); + _Chain_Extract_unprotected( &scheduled_to_ready->Object.Node ); _Scheduler_simple_Insert_priority_lifo( - &self->ready[ 0 ], + &self->Ready, scheduled_to_ready ); } static void _Scheduler_simple_smp_Move_from_ready_to_scheduled( - Scheduler_SMP_Control *self, + Scheduler_SMP_Control *base, Thread_Control *ready_to_scheduled ) { _Chain_Extract_unprotected( &ready_to_scheduled->Object.Node ); _Scheduler_simple_Insert_priority_fifo( - &self->scheduled, + &base->Scheduled, ready_to_scheduled ); } static void _Scheduler_simple_smp_Insert_ready_lifo( - Scheduler_SMP_Control *self, + Scheduler_SMP_Control *base, Thread_Control *thread ) { + Scheduler_simple_SMP_Control *self = + _Scheduler_simple_SMP_Self_from_SMP_base( base ); + _Chain_Insert_ordered_unprotected( - &self->ready[ 0 ], + &self->Ready, &thread->Object.Node, _Scheduler_simple_Insert_priority_lifo_order ); } static void _Scheduler_simple_smp_Insert_ready_fifo( - Scheduler_SMP_Control *self, + Scheduler_SMP_Control *base, Thread_Control *thread ) { + Scheduler_simple_SMP_Control *self = + _Scheduler_simple_SMP_Self_from_SMP_base( base ); + _Chain_Insert_ordered_unprotected( - &self->ready[ 0 ], + &self->Ready, &thread->Object.Node, _Scheduler_simple_Insert_priority_fifo_order ); } static void _Scheduler_simple_smp_Do_extract( - Scheduler_SMP_Control *self, + Scheduler_SMP_Control *base, Thread_Control *thread ) { - ( void ) self; + (void) base; thread->is_in_the_air = thread->is_scheduled; thread->is_scheduled = false; @@ -110,10 +133,10 @@ static void _Scheduler_simple_smp_Do_extract( void _Scheduler_simple_smp_Block( Thread_Control *thread ) { - Scheduler_SMP_Control *self = _Scheduler_SMP_Instance(); + Scheduler_simple_SMP_Control *self = _Scheduler_simple_SMP_Instance(); _Scheduler_SMP_Block( - self, + &self->Base, thread, _Scheduler_simple_smp_Do_extract, _Scheduler_simple_smp_Get_highest_ready, @@ -122,7 +145,7 @@ void _Scheduler_simple_smp_Block( Thread_Control *thread ) } static void _Scheduler_simple_smp_Enqueue_ordered( - Scheduler_SMP_Control *self, + Scheduler_SMP_Control *base, Thread_Control *thread, Chain_Node_order order, Scheduler_SMP_Insert insert_ready, @@ -130,7 +153,7 @@ static void _Scheduler_simple_smp_Enqueue_ordered( ) { _Scheduler_SMP_Enqueue_ordered( - self, + base, thread, order, _Scheduler_simple_smp_Get_highest_ready, @@ -143,10 +166,10 @@ static void _Scheduler_simple_smp_Enqueue_ordered( void _Scheduler_simple_smp_Enqueue_priority_lifo( Thread_Control *thread ) { - Scheduler_SMP_Control *self = _Scheduler_SMP_Instance(); + Scheduler_simple_SMP_Control *self = _Scheduler_simple_SMP_Instance(); _Scheduler_simple_smp_Enqueue_ordered( - self, + &self->Base, thread, _Scheduler_simple_Insert_priority_lifo_order, _Scheduler_simple_smp_Insert_ready_lifo, @@ -156,10 +179,10 @@ void _Scheduler_simple_smp_Enqueue_priority_lifo( Thread_Control *thread ) void _Scheduler_simple_smp_Enqueue_priority_fifo( Thread_Control *thread ) { - Scheduler_SMP_Control *self = _Scheduler_SMP_Instance(); + Scheduler_simple_SMP_Control *self = _Scheduler_simple_SMP_Instance(); _Scheduler_simple_smp_Enqueue_ordered( - self, + &self->Base, thread, _Scheduler_simple_Insert_priority_fifo_order, _Scheduler_simple_smp_Insert_ready_fifo, @@ -169,10 +192,10 @@ void _Scheduler_simple_smp_Enqueue_priority_fifo( Thread_Control *thread ) void _Scheduler_simple_smp_Extract( Thread_Control *thread ) { - Scheduler_SMP_Control *self = _Scheduler_SMP_Instance(); + Scheduler_simple_SMP_Control *self = _Scheduler_simple_SMP_Instance(); _Scheduler_SMP_Extract( - self, + &self->Base, thread, _Scheduler_simple_smp_Do_extract ); @@ -192,12 +215,22 @@ void _Scheduler_simple_smp_Yield( Thread_Control *thread ) void _Scheduler_simple_smp_Schedule( Thread_Control *thread ) { - Scheduler_SMP_Control *self = _Scheduler_SMP_Instance(); + Scheduler_simple_SMP_Control *self = _Scheduler_simple_SMP_Instance(); _Scheduler_SMP_Schedule( - self, + &self->Base, thread, _Scheduler_simple_smp_Get_highest_ready, _Scheduler_simple_smp_Move_from_ready_to_scheduled ); } + +void _Scheduler_simple_smp_Start_idle( + Thread_Control *thread, + Per_CPU_Control *cpu +) +{ + Scheduler_simple_SMP_Control *self = _Scheduler_simple_SMP_Instance(); + + _Scheduler_SMP_Start_idle( &self->Base, thread, cpu ); +} diff --git a/cpukit/score/src/schedulersmpstartidle.c b/cpukit/score/src/schedulersmpstartidle.c deleted file mode 100644 index 75d1c8f8f5..0000000000 --- a/cpukit/score/src/schedulersmpstartidle.c +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @file - * - * @brief SMP Scheduler Start Idle Operation - * - * @ingroup ScoreSchedulerSMP - */ - -/* - * Copyright (c) 2013 embedded brains GmbH. All rights reserved. - * - * embedded brains GmbH - * Dornierstr. 4 - * 82178 Puchheim - * Germany - * <rtems@embedded-brains.de> - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#if HAVE_CONFIG_H - #include "config.h" -#endif - -#include <rtems/score/schedulersmpimpl.h> -#include <rtems/score/chainimpl.h> - -void _Scheduler_SMP_Start_idle( - Thread_Control *thread, - Per_CPU_Control *cpu -) -{ - Scheduler_SMP_Control *self = _Scheduler_SMP_Instance(); - - thread->is_scheduled = true; - _Thread_Set_CPU( thread, cpu ); - _Chain_Append_unprotected( &self->scheduled, &thread->Object.Node ); -} |