diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-09 14:31:02 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-20 10:14:03 +0200 |
commit | c1a356e9f8895584f5c99c1c020a279e69a1f7e4 (patch) | |
tree | 5630654d0663dae0247adab44d2f1f93f7bf68c0 /cpukit/score/src | |
parent | score: _Scheduler_priority_Ready_queue_initialize() (diff) | |
download | rtems-c1a356e9f8895584f5c99c1c020a279e69a1f7e4.tar.bz2 |
score: _Priority_bit_map_Handler_initialization()
Delete _Priority_bit_map_Handler_initialization() and rely on BSS
initialization. Move definition of _Priority_Major_bit_map and
_Priority_Bit_map to separate file. Move definition of __log2table also
to this file.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r-- | cpukit/score/src/prioritybitmap.c | 48 | ||||
-rw-r--r-- | cpukit/score/src/schedulerpriority.c | 6 |
2 files changed, 48 insertions, 6 deletions
diff --git a/cpukit/score/src/prioritybitmap.c b/cpukit/score/src/prioritybitmap.c new file mode 100644 index 0000000000..f0e79d80eb --- /dev/null +++ b/cpukit/score/src/prioritybitmap.c @@ -0,0 +1,48 @@ +/* + * @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.com/license/LICENSE. + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include <rtems/score/prioritybitmapimpl.h> + +Priority_bit_map_Control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT; + +/* Instantiate any global variables needed by the priority scheduler */ +volatile Priority_bit_map_Control _Priority_Major_bit_map; + +#if ( CPU_USE_GENERIC_BITFIELD_DATA == TRUE ) +const unsigned char __log2table[256] = { + 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; +#endif diff --git a/cpukit/score/src/schedulerpriority.c b/cpukit/score/src/schedulerpriority.c index ab17063008..e36a44b300 100644 --- a/cpukit/score/src/schedulerpriority.c +++ b/cpukit/score/src/schedulerpriority.c @@ -21,11 +21,6 @@ #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; - -Priority_bit_map_Control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT; - void _Scheduler_priority_Initialize(void) { /* allocate ready queue structures */ @@ -34,7 +29,6 @@ void _Scheduler_priority_Initialize(void) ); _Scheduler_priority_Ready_queue_initialize( ready_queues ); - _Priority_bit_map_Handler_initialization(); _Scheduler.information = ready_queues; } |