summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-14 10:12:34 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-14 11:57:47 +0200
commit042072bfdfa6ff6a54c74cc54476c5175377bf63 (patch)
treec96a1439100a410ff55b3230529b2954d8928f89 /cpukit/score/src
parentscore: _Thread_Create_idle_for_CPU() (diff)
downloadrtems-042072bfdfa6ff6a54c74cc54476c5175377bf63.tar.bz2
score: _Scheduler_priority_Ready_queue_initialize
Use priority maximum of scheduler instance. This avoids a potential memory corruption on SMP configurations.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/schedulerpriority.c5
-rw-r--r--cpukit/score/src/schedulerprioritysmp.c5
-rw-r--r--cpukit/score/src/schedulerstrongapa.c5
3 files changed, 12 insertions, 3 deletions
diff --git a/cpukit/score/src/schedulerpriority.c b/cpukit/score/src/schedulerpriority.c
index 6dc055a536..61505a4fce 100644
--- a/cpukit/score/src/schedulerpriority.c
+++ b/cpukit/score/src/schedulerpriority.c
@@ -27,5 +27,8 @@ void _Scheduler_priority_Initialize( const Scheduler_Control *scheduler )
_Scheduler_priority_Get_context( scheduler );
_Priority_bit_map_Initialize( &context->Bit_map );
- _Scheduler_priority_Ready_queue_initialize( &context->Ready[ 0 ] );
+ _Scheduler_priority_Ready_queue_initialize(
+ &context->Ready[ 0 ],
+ scheduler->maximum_priority
+ );
}
diff --git a/cpukit/score/src/schedulerprioritysmp.c b/cpukit/score/src/schedulerprioritysmp.c
index c08799f270..bd042d2534 100644
--- a/cpukit/score/src/schedulerprioritysmp.c
+++ b/cpukit/score/src/schedulerprioritysmp.c
@@ -39,7 +39,10 @@ void _Scheduler_priority_SMP_Initialize( const Scheduler_Control *scheduler )
_Scheduler_SMP_Initialize( &self->Base );
_Priority_bit_map_Initialize( &self->Bit_map );
- _Scheduler_priority_Ready_queue_initialize( &self->Ready[ 0 ] );
+ _Scheduler_priority_Ready_queue_initialize(
+ &self->Ready[ 0 ],
+ scheduler->maximum_priority
+ );
}
void _Scheduler_priority_SMP_Node_initialize(
diff --git a/cpukit/score/src/schedulerstrongapa.c b/cpukit/score/src/schedulerstrongapa.c
index 09efde9cf9..dd4409766e 100644
--- a/cpukit/score/src/schedulerstrongapa.c
+++ b/cpukit/score/src/schedulerstrongapa.c
@@ -165,7 +165,10 @@ void _Scheduler_strong_APA_Initialize( const Scheduler_Control *scheduler )
_Scheduler_SMP_Initialize( &self->Base );
_Priority_bit_map_Initialize( &self->Bit_map );
- _Scheduler_priority_Ready_queue_initialize( &self->Ready[ 0 ] );
+ _Scheduler_priority_Ready_queue_initialize(
+ &self->Ready[ 0 ],
+ scheduler->maximum_priority
+ );
}
void _Scheduler_strong_APA_Node_initialize(