diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-09 14:16:59 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-20 10:14:03 +0200 |
commit | a78e575ba58250b35787bfa19a8770c075db5e8b (patch) | |
tree | 4b17cd95ecdf7ef93552dc11fad85fe76649079a /cpukit/score/src/schedulerpriority.c | |
parent | score: _Scheduler_priority_Ready_queue_first() (diff) | |
download | rtems-a78e575ba58250b35787bfa19a8770c075db5e8b.tar.bz2 |
score: _Scheduler_priority_Ready_queue_initialize()
Move workspace allocation to _Scheduler_priority_Initialize().
Diffstat (limited to 'cpukit/score/src/schedulerpriority.c')
-rw-r--r-- | cpukit/score/src/schedulerpriority.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cpukit/score/src/schedulerpriority.c b/cpukit/score/src/schedulerpriority.c index 7314da4965..ab17063008 100644 --- a/cpukit/score/src/schedulerpriority.c +++ b/cpukit/score/src/schedulerpriority.c @@ -19,6 +19,7 @@ #endif #include <rtems/score/schedulerpriorityimpl.h> +#include <rtems/score/wkspace.h> /* Instantiate any global variables needed by the priority scheduler */ volatile Priority_bit_map_Control _Priority_Major_bit_map; @@ -27,6 +28,13 @@ Priority_bit_map_Control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT; void _Scheduler_priority_Initialize(void) { - _Scheduler_priority_Ready_queue_initialize(); + /* allocate ready queue structures */ + Chain_Control *ready_queues = _Workspace_Allocate_or_fatal_error( + ((size_t) PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) + ); + + _Scheduler_priority_Ready_queue_initialize( ready_queues ); _Priority_bit_map_Handler_initialization(); + + _Scheduler.information = ready_queues; } |