summaryrefslogtreecommitdiffstats
path: root/testsuites/tmtests/tm26/task1.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-01 11:48:59 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-03 11:13:26 +0200
commit494c2e300215c4bc539d243d6a5d060e0e2f2ef2 (patch)
tree8ba7c54667cad8331430bf719b4a1bd94ed3ac8b /testsuites/tmtests/tm26/task1.c
parentscore: Rename Priority_bit_map_Control (diff)
downloadrtems-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 'testsuites/tmtests/tm26/task1.c')
-rw-r--r--testsuites/tmtests/tm26/task1.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c
index f6cdddfa8b..925c2f501b 100644
--- a/testsuites/tmtests/tm26/task1.c
+++ b/testsuites/tmtests/tm26/task1.c
@@ -19,6 +19,7 @@
#include <tmacros.h>
#include <timesys.h>
+#include <rtems/score/schedulerpriorityimpl.h>
#include <rtems/rtems/semimpl.h>
#if defined( RTEMS_SMP ) && defined( RTEMS_DEBUG )
@@ -370,7 +371,7 @@ rtems_task Middle_task(
rtems_task_argument argument
)
{
- Chain_Control *ready_queues;
+ Scheduler_priority_Control *scheduler = _Scheduler_priority_Instance();
thread_dispatch_no_fp_time = benchmark_timer_read();
@@ -378,9 +379,8 @@ rtems_task Middle_task(
Middle_tcb = _Thread_Get_executing();
- ready_queues = (Chain_Control *) _Scheduler.information;
set_thread_executing(
- (Thread_Control *) _Chain_First(&ready_queues[LOW_PRIORITY])
+ (Thread_Control *) _Chain_First(&scheduler->Ready[LOW_PRIORITY])
);
/* do not force context switch */
@@ -403,10 +403,8 @@ rtems_task Low_task(
rtems_task_argument argument
)
{
- Thread_Control *executing;
- Chain_Control *ready_queues;
-
- ready_queues = (Chain_Control *) _Scheduler.information;
+ Scheduler_priority_Control *scheduler = _Scheduler_priority_Instance();
+ Thread_Control *executing;
context_switch_no_fp_time = benchmark_timer_read();
@@ -424,7 +422,7 @@ rtems_task Low_task(
context_switch_another_task_time = benchmark_timer_read();
set_thread_executing(
- (Thread_Control *) _Chain_First(&ready_queues[FP1_PRIORITY])
+ (Thread_Control *) _Chain_First(&scheduler->Ready[FP1_PRIORITY])
);
/* do not force context switch */
@@ -447,17 +445,16 @@ rtems_task Floating_point_task_1(
rtems_task_argument argument
)
{
- Chain_Control *ready_queues;
- Thread_Control *executing;
+ Scheduler_priority_Control *scheduler = _Scheduler_priority_Instance();
+ Thread_Control *executing;
FP_DECLARE;
context_switch_restore_1st_fp_time = benchmark_timer_read();
executing = _Thread_Get_executing();
- ready_queues = (Chain_Control *) _Scheduler.information;
set_thread_executing(
- (Thread_Control *) _Chain_First(&ready_queues[FP2_PRIORITY])
+ (Thread_Control *) _Chain_First(&scheduler->Ready[FP2_PRIORITY])
);
/* do not force context switch */
@@ -483,9 +480,8 @@ rtems_task Floating_point_task_1(
executing = _Thread_Get_executing();
- ready_queues = (Chain_Control *) _Scheduler.information;
set_thread_executing(
- (Thread_Control *) _Chain_First(&ready_queues[FP2_PRIORITY])
+ (Thread_Control *) _Chain_First(&scheduler->Ready[FP2_PRIORITY])
);
benchmark_timer_initialize();
@@ -504,17 +500,16 @@ rtems_task Floating_point_task_2(
rtems_task_argument argument
)
{
- Chain_Control *ready_queues;
- Thread_Control *executing;
+ Scheduler_priority_Control *scheduler = _Scheduler_priority_Instance();
+ Thread_Control *executing;
FP_DECLARE;
context_switch_save_restore_idle_time = benchmark_timer_read();
executing = _Thread_Get_executing();
- ready_queues = (Chain_Control *) _Scheduler.information;
set_thread_executing(
- (Thread_Control *) _Chain_First(&ready_queues[FP1_PRIORITY])
+ (Thread_Control *) _Chain_First(&scheduler->Ready[FP1_PRIORITY])
);
FP_LOAD( 1.0 );