summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-04 10:56:36 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-15 08:37:11 +0200
commite1598a616db1e9dadfd74abeb20b1f1ec5daaa7f (patch)
tree0aabc512f4beb2b30eba7885926d06a878988855 /testsuites
parentscore: Add and use RTEMS_ZERO_LENGTH_ARRAY (diff)
downloadrtems-e1598a616db1e9dadfd74abeb20b1f1ec5daaa7f.tar.bz2
score: Static scheduler configuration
Do not allocate the scheduler control structures from the workspace. This is a preparation step for configuration of clustered/partitioned schedulers on SMP.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/rhealstone/rhilatency/ilatency.c6
-rw-r--r--testsuites/sptests/spinternalerror01/init.c6
-rw-r--r--testsuites/sptests/spsize/size.c10
-rw-r--r--testsuites/tmtests/tm26/task1.c31
-rw-r--r--testsuites/tmtests/tm27/task1.c20
5 files changed, 39 insertions, 34 deletions
diff --git a/testsuites/rhealstone/rhilatency/ilatency.c b/testsuites/rhealstone/rhilatency/ilatency.c
index b7f5a1a83d..5024a73b6f 100644
--- a/testsuites/rhealstone/rhilatency/ilatency.c
+++ b/testsuites/rhealstone/rhilatency/ilatency.c
@@ -15,6 +15,7 @@
#define CONFIGURE_INIT
#include <timesys.h>
+#include <rtems/score/schedulerpriorityimpl.h>
#include <rtems/timerdrv.h>
#include <coverhd.h>
@@ -58,7 +59,10 @@ rtems_task Init(
puts( "*** START OF RHILATENCY ***" );
- if (_Scheduler.Operations.initialize != _Scheduler_priority_Initialize) {
+ if (
+ _Scheduler_Table[ 0 ].Operations.initialize
+ != _Scheduler_priority_Initialize
+ ) {
puts( " Error ==> " );
puts( "Test only supported for deterministic priority scheduler\n" );
rtems_test_exit( 0 );
diff --git a/testsuites/sptests/spinternalerror01/init.c b/testsuites/sptests/spinternalerror01/init.c
index 15a23159a9..a1ddc14eae 100644
--- a/testsuites/sptests/spinternalerror01/init.c
+++ b/testsuites/sptests/spinternalerror01/init.c
@@ -70,11 +70,11 @@ static void *idle_body(uintptr_t ignored)
#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
-#define CONFIGURE_SCHEDULER_ENTRY_POINTS NULL
-
#define CONFIGURE_SCHEDULER_USER
-#define CONFIGURE_MEMORY_FOR_SCHEDULER 0
+#define CONFIGURE_SCHEDULER_CONTEXT
+
+#define CONFIGURE_SCHEDULER_CONTROLS { }
#define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER 0
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
index a6e6047d9d..dc1e55b10d 100644
--- a/testsuites/sptests/spsize/size.c
+++ b/testsuites/sptests/spsize/size.c
@@ -84,9 +84,6 @@ void print_formula(void);
#include <rtems/score/prioritybitmapimpl.h>
#include <rtems/score/schedulerpriority.h>
-/* Priority scheduling uninitialized (globals) consumption */
-#define SCHEDULER_OVHD (sizeof _Scheduler)
-
/* Priority scheduling per-thread consumption. Gets
* included in the PER_TASK consumption.
*/
@@ -94,11 +91,10 @@ void print_formula(void);
/* Priority scheduling workspace consumption
*
- * Include allocation of ready queue. Pointers are already counted by
- * including _Scheduler in SCHEDULER_OVHD.
+ * Include allocation of ready queue.
*/
#define SCHEDULER_WKSP_SIZE \
- (sizeof(Scheduler_priority_Control) + \
+ (sizeof(Scheduler_priority_Context) + \
RTEMS_MAXIMUM_PRIORITY * sizeof(Chain_Control ))
/****** END OF MEMORY USAGE OF DEFAULT PRIORITY SCHEDULER ******/
@@ -352,8 +348,6 @@ uninitialized =
/*rtems.h*/ /* Not applicable */
-/*scheduler.h*/ SCHEDULER_OVHD +
-
/*semimpl.h*/ (sizeof _Semaphore_Information) +
#if defined(RTEMS_MULTIPROCESSING)
diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c
index 6325516561..6b2572ef9e 100644
--- a/testsuites/tmtests/tm26/task1.c
+++ b/testsuites/tmtests/tm26/task1.c
@@ -223,7 +223,10 @@ rtems_task Init(
TEST_BEGIN();
- if (_Scheduler.Operations.initialize != _Scheduler_priority_Initialize) {
+ if (
+ _Scheduler_Table[ 0 ].Operations.initialize
+ != _Scheduler_priority_Initialize
+ ) {
puts(" Error ==> " );
puts("Test only supported for deterministic priority scheduler\n" );
TEST_END();
@@ -371,8 +374,8 @@ rtems_task Middle_task(
rtems_task_argument argument
)
{
- Scheduler_priority_Control *scheduler =
- _Scheduler_priority_Self_from_base( _Scheduler_Get( NULL ) );
+ Scheduler_priority_Context *scheduler_context =
+ _Scheduler_priority_Get_context( _Scheduler_Get( _Thread_Get_executing() ) );
thread_dispatch_no_fp_time = benchmark_timer_read();
@@ -381,7 +384,7 @@ rtems_task Middle_task(
Middle_tcb = _Thread_Get_executing();
set_thread_executing(
- (Thread_Control *) _Chain_First(&scheduler->Ready[LOW_PRIORITY])
+ (Thread_Control *) _Chain_First(&scheduler_context->Ready[LOW_PRIORITY])
);
/* do not force context switch */
@@ -404,8 +407,8 @@ rtems_task Low_task(
rtems_task_argument argument
)
{
- Scheduler_priority_Control *scheduler =
- _Scheduler_priority_Self_from_base( _Scheduler_Get( NULL ) );
+ Scheduler_priority_Context *scheduler_context =
+ _Scheduler_priority_Get_context( _Scheduler_Get( _Thread_Get_executing() ) );
Thread_Control *executing;
context_switch_no_fp_time = benchmark_timer_read();
@@ -424,7 +427,7 @@ rtems_task Low_task(
context_switch_another_task_time = benchmark_timer_read();
set_thread_executing(
- (Thread_Control *) _Chain_First(&scheduler->Ready[FP1_PRIORITY])
+ (Thread_Control *) _Chain_First(&scheduler_context->Ready[FP1_PRIORITY])
);
/* do not force context switch */
@@ -447,8 +450,8 @@ rtems_task Floating_point_task_1(
rtems_task_argument argument
)
{
- Scheduler_priority_Control *scheduler =
- _Scheduler_priority_Self_from_base( _Scheduler_Get( NULL ) );
+ Scheduler_priority_Context *scheduler_context =
+ _Scheduler_priority_Get_context( _Scheduler_Get( _Thread_Get_executing() ) );
Thread_Control *executing;
FP_DECLARE;
@@ -457,7 +460,7 @@ rtems_task Floating_point_task_1(
executing = _Thread_Get_executing();
set_thread_executing(
- (Thread_Control *) _Chain_First(&scheduler->Ready[FP2_PRIORITY])
+ (Thread_Control *) _Chain_First(&scheduler_context->Ready[FP2_PRIORITY])
);
/* do not force context switch */
@@ -484,7 +487,7 @@ rtems_task Floating_point_task_1(
executing = _Thread_Get_executing();
set_thread_executing(
- (Thread_Control *) _Chain_First(&scheduler->Ready[FP2_PRIORITY])
+ (Thread_Control *) _Chain_First(&scheduler_context->Ready[FP2_PRIORITY])
);
benchmark_timer_initialize();
@@ -503,8 +506,8 @@ rtems_task Floating_point_task_2(
rtems_task_argument argument
)
{
- Scheduler_priority_Control *scheduler =
- _Scheduler_priority_Self_from_base( _Scheduler_Get( NULL ) );
+ Scheduler_priority_Context *scheduler_context =
+ _Scheduler_priority_Get_context( _Scheduler_Get( _Thread_Get_executing() ) );
Thread_Control *executing;
FP_DECLARE;
@@ -513,7 +516,7 @@ rtems_task Floating_point_task_2(
executing = _Thread_Get_executing();
set_thread_executing(
- (Thread_Control *) _Chain_First(&scheduler->Ready[FP1_PRIORITY])
+ (Thread_Control *) _Chain_First(&scheduler_context->Ready[FP1_PRIORITY])
);
FP_LOAD( 1.0 );
diff --git a/testsuites/tmtests/tm27/task1.c b/testsuites/tmtests/tm27/task1.c
index a6393273f2..3d02e911bf 100644
--- a/testsuites/tmtests/tm27/task1.c
+++ b/testsuites/tmtests/tm27/task1.c
@@ -20,8 +20,8 @@
#define CONFIGURE_INIT
#include "system.h"
-#include <rtems/score/schedulerpriorityimpl.h>
#include <bsp.h>
+#include <rtems/score/schedulerpriorityimpl.h>
#define _RTEMS_TMTEST27
#include <tm27.h>
@@ -55,7 +55,11 @@ rtems_task Init(
Print_Warning();
TEST_BEGIN();
- if (_Scheduler.Operations.initialize != _Scheduler_priority_Initialize) {
+
+ if (
+ _Scheduler_Table[ 0 ].Operations.initialize
+ != _Scheduler_priority_Initialize
+ ) {
puts(" Error ==> " );
puts("Test only supported for deterministic priority scheduler\n" );
TEST_END();
@@ -102,8 +106,8 @@ rtems_task Task_1(
rtems_task_argument argument
)
{
- Scheduler_priority_Control *scheduler =
- _Scheduler_priority_Self_from_base( _Scheduler_Get( NULL ) );
+ Scheduler_priority_Context *scheduler_context =
+ _Scheduler_priority_Get_context( _Scheduler_Get( _Thread_Get_executing() ) );
#if defined(RTEMS_SMP)
rtems_interrupt_level level;
#endif
@@ -188,7 +192,7 @@ rtems_task Task_1(
#endif
_Thread_Executing =
- (Thread_Control *) _Chain_First(&scheduler->Ready[LOW_PRIORITY]);
+ (Thread_Control *) _Chain_First(&scheduler_context->Ready[LOW_PRIORITY]);
_Thread_Dispatch_necessary = 1;
@@ -220,8 +224,8 @@ rtems_task Task_2(
rtems_task_argument argument
)
{
- Scheduler_priority_Control *scheduler =
- _Scheduler_priority_Self_from_base( _Scheduler_Get( NULL ) );
+ Scheduler_priority_Context *scheduler_context =
+ _Scheduler_priority_Get_context( _Scheduler_Get( _Thread_Get_executing() ) );
#if defined(RTEMS_SMP)
rtems_interrupt_level level;
#endif
@@ -258,7 +262,7 @@ rtems_task Task_2(
#endif
_Thread_Executing =
- (Thread_Control *) _Chain_First(&scheduler->Ready[LOW_PRIORITY]);
+ (Thread_Control *) _Chain_First(&scheduler_context->Ready[LOW_PRIORITY]);
_Thread_Dispatch_necessary = 1;