summaryrefslogtreecommitdiffstats
path: root/testsuites/tmtests
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-14 18:38:45 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-14 18:38:45 +0000
commit4389287a3964ae5b8e08f5268823e832272c78e1 (patch)
treee6eb439c43b388701c3a47908f78108abf290517 /testsuites/tmtests
parent2008-12-14 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-4389287a3964ae5b8e08f5268823e832272c78e1.tar.bz2
2008-12-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* tm01/task1.c, tm02/task1.c, tm03/task1.c, tm04/task1.c, tm05/task1.c, tm06/task1.c, tm07/task1.c, tm08/task1.c, tm09/task1.c, tm10/task1.c, tm11/task1.c, tm12/task1.c, tm13/task1.c, tm14/task1.c, tm16/task1.c, tm17/task1.c, tm18/task1.c, tm19/task1.c, tm20/task1.c, tm21/task1.c, tm23/task1.c, tm24/task1.c, tm25/task1.c, tm26/task1.c, tm27/task1.c, tm28/task1.c, tm29/task1.c, tmoverhd/testtask.c: Run all tests successfully with maxixum number of priorities as 16 instead of 256. This was done by temporarily modifying the score priority.h maximum. This allowed testing of all API code to ensure that it worked properly with a reduced number of priorities. Most modifications were to switch from hard-coded maximum to using the API provided methods to determine maximum number of priority levels.
Diffstat (limited to 'testsuites/tmtests')
-rw-r--r--testsuites/tmtests/ChangeLog15
-rw-r--r--testsuites/tmtests/tm01/task1.c5
-rw-r--r--testsuites/tmtests/tm02/task1.c14
-rw-r--r--testsuites/tmtests/tm03/task1.c16
-rw-r--r--testsuites/tmtests/tm04/task1.c19
-rw-r--r--testsuites/tmtests/tm05/task1.c20
-rw-r--r--testsuites/tmtests/tm06/task1.c7
-rw-r--r--testsuites/tmtests/tm07/task1.c16
-rw-r--r--testsuites/tmtests/tm08/task1.c14
-rw-r--r--testsuites/tmtests/tm09/task1.c5
-rw-r--r--testsuites/tmtests/tm10/task1.c26
-rw-r--r--testsuites/tmtests/tm11/task1.c16
-rw-r--r--testsuites/tmtests/tm12/task1.c26
-rw-r--r--testsuites/tmtests/tm13/task1.c20
-rw-r--r--testsuites/tmtests/tm14/task1.c23
-rw-r--r--testsuites/tmtests/tm16/task1.c21
-rw-r--r--testsuites/tmtests/tm17/task1.c21
-rw-r--r--testsuites/tmtests/tm18/task1.c7
-rw-r--r--testsuites/tmtests/tm19/task1.c9
-rw-r--r--testsuites/tmtests/tm20/task1.c10
-rw-r--r--testsuites/tmtests/tm21/task1.c7
-rw-r--r--testsuites/tmtests/tm23/task1.c16
-rw-r--r--testsuites/tmtests/tm24/task1.c7
-rw-r--r--testsuites/tmtests/tm25/task1.c7
-rw-r--r--testsuites/tmtests/tm26/task1.c27
-rw-r--r--testsuites/tmtests/tm27/task1.c12
-rw-r--r--testsuites/tmtests/tm28/task1.c5
-rw-r--r--testsuites/tmtests/tm29/task1.c9
-rw-r--r--testsuites/tmtests/tmoverhd/testtask.c5
29 files changed, 227 insertions, 178 deletions
diff --git a/testsuites/tmtests/ChangeLog b/testsuites/tmtests/ChangeLog
index e4897ec5c4..7ed039edc7 100644
--- a/testsuites/tmtests/ChangeLog
+++ b/testsuites/tmtests/ChangeLog
@@ -1,3 +1,18 @@
+2008-12-14 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * tm01/task1.c, tm02/task1.c, tm03/task1.c, tm04/task1.c, tm05/task1.c,
+ tm06/task1.c, tm07/task1.c, tm08/task1.c, tm09/task1.c, tm10/task1.c,
+ tm11/task1.c, tm12/task1.c, tm13/task1.c, tm14/task1.c, tm16/task1.c,
+ tm17/task1.c, tm18/task1.c, tm19/task1.c, tm20/task1.c, tm21/task1.c,
+ tm23/task1.c, tm24/task1.c, tm25/task1.c, tm26/task1.c, tm27/task1.c,
+ tm28/task1.c, tm29/task1.c, tmoverhd/testtask.c: Run all tests
+ successfully with maxixum number of priorities as 16 instead of 256.
+ This was done by temporarily modifying the score priority.h maximum.
+ This allowed testing of all API code to ensure that it worked
+ properly with a reduced number of priorities. Most modifications were
+ to switch from hard-coded maximum to using the API provided methods
+ to determine maximum number of priority levels.
+
2008-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* tm26/task1.c: Fix typo.
diff --git a/testsuites/tmtests/tm01/task1.c b/testsuites/tmtests/tm01/task1.c
index c58dd7e353..9ff286b246 100644
--- a/testsuites/tmtests/tm01/task1.c
+++ b/testsuites/tmtests/tm01/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -33,7 +32,7 @@ rtems_task Init(
status = rtems_task_create(
Task_name[ 1 ],
- 128,
+ (RTEMS_MAXIMUM_PRIORITY / 2) + 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
diff --git a/testsuites/tmtests/tm02/task1.c b/testsuites/tmtests/tm02/task1.c
index b26f638167..618aea8a14 100644
--- a/testsuites/tmtests/tm02/task1.c
+++ b/testsuites/tmtests/tm02/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -29,6 +28,7 @@ rtems_task Low_task(
rtems_task_argument argument
);
+int operation_count = OPERATION_COUNT;
void test_init();
@@ -51,10 +51,10 @@ rtems_task Init(
void test_init()
{
rtems_status_code status;
- uint32_t index;
+ uint32_t index;
rtems_task_priority priority;
- priority = 5;
+ priority = 2;
status = rtems_task_create(
rtems_build_name( 'H', 'I', 'G', 'H' ),
@@ -71,7 +71,9 @@ void test_init()
status = rtems_task_start( High_id, High_task, 0 );
directive_failed( status, "rtems_task_start of high task" );
- for ( index=2 ; index <= OPERATION_COUNT ; index++ ) {
+ if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 )
+ operation_count = RTEMS_MAXIMUM_PRIORITY - 2;
+ for ( index=2 ; index < operation_count ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'M', 'I', 'D', ' ' ),
priority,
@@ -147,7 +149,7 @@ rtems_task Low_task(
put_time(
"rtems_semaphore_obtain: not available -- caller blocks",
end_time,
- OPERATION_COUNT,
+ operation_count - 1,
0,
CALLING_OVERHEAD_SEMAPHORE_OBTAIN
);
diff --git a/testsuites/tmtests/tm03/task1.c b/testsuites/tmtests/tm03/task1.c
index 332081422b..bdd52cb403 100644
--- a/testsuites/tmtests/tm03/task1.c
+++ b/testsuites/tmtests/tm03/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -26,6 +25,7 @@ rtems_task High_task(
rtems_task_argument argument
);
+int operation_count = OPERATION_COUNT;
rtems_task Init(
rtems_task_argument argument
@@ -39,7 +39,7 @@ rtems_task Init(
puts( "\n\n*** TIME TEST 3 ***" );
status = rtems_task_create(
rtems_build_name( 'T', 'A', '1', ' ' ),
- 252,
+ RTEMS_MAXIMUM_PRIORITY - 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -59,11 +59,11 @@ rtems_task test_init(
)
{
rtems_status_code status;
- uint32_t index;
+ int index;
rtems_id task_id;
rtems_task_priority priority;
- priority = 250;
+ priority = RTEMS_MAXIMUM_PRIORITY - 2;
status = rtems_semaphore_create(
rtems_build_name( 'S', 'M', '1', '\0'),
@@ -74,7 +74,9 @@ rtems_task test_init(
);
directive_failed( status, "rtems_semaphore_create of SM1" );
- for ( index = 2 ; index <= OPERATION_COUNT ; index ++ ) {
+ if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 )
+ operation_count = RTEMS_MAXIMUM_PRIORITY - 2;
+ for ( index = 2 ; index < operation_count ; index ++ ) {
rtems_task_create(
rtems_build_name( 'M', 'I', 'D', ' ' ),
priority,
@@ -140,7 +142,7 @@ rtems_task High_task(
put_time(
"rtems_semaphore_release: task readied -- preempts caller",
end_time,
- OPERATION_COUNT,
+ operation_count - 1,
0,
CALLING_OVERHEAD_SEMAPHORE_RELEASE
);
diff --git a/testsuites/tmtests/tm04/task1.c b/testsuites/tmtests/tm04/task1.c
index 45eac3e012..f60246270e 100644
--- a/testsuites/tmtests/tm04/task1.c
+++ b/testsuites/tmtests/tm04/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -102,7 +101,7 @@ rtems_task Highest_task(
status = rtems_task_set_priority(
RTEMS_CURRENT_PRIORITY,
- 254,
+ RTEMS_MAXIMUM_PRIORITY - 1,
&old_priority
);
directive_failed( status, "rtems_task_set_priority" );
@@ -215,19 +214,19 @@ rtems_task High_task(
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
status = rtems_task_create(
name,
- 250,
+ RTEMS_MAXIMUM_PRIORITY - 4,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_NO_PREEMPT,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ index ]
);
- directive_failed( status, "rtems_task_create LOOP" );
+ directive_failed( status, "rtems_task_create LOOP 1" );
status = rtems_task_start( Task_id[ index ], Restart_task, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
+ directive_failed( status, "rtems_task_start LOOP 1" );
status = rtems_task_suspend( Task_id[ index ] );
- directive_failed( status, "rtems_task_suspend LOOP" );
+ directive_failed( status, "rtems_task_suspend LOOP 1" );
}
benchmark_timer_initialize();
@@ -262,16 +261,16 @@ rtems_task High_task(
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
status = rtems_task_create(
name,
- 250,
+ RTEMS_MAXIMUM_PRIORITY - 4,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ index ]
);
- directive_failed( status, "rtems_task_create LOOP" );
+ directive_failed( status, "rtems_task_create LOOP 2" );
status = rtems_task_start( Task_id[ index ], Restart_task, 0 );
- directive_failed( status, "rtems_task_start LOOP" );
+ directive_failed( status, "rtems_task_start LOOP 2" );
}
benchmark_timer_initialize();
diff --git a/testsuites/tmtests/tm05/task1.c b/testsuites/tmtests/tm05/task1.c
index 295a649840..fcaf56b8f9 100644
--- a/testsuites/tmtests/tm05/task1.c
+++ b/testsuites/tmtests/tm05/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,7 +12,7 @@
#define CONFIGURE_INIT
#include "system.h"
-rtems_id Task_id[OPERATION_COUNT+1];
+rtems_id Task_id[OPERATION_COUNT+1];
uint32_t Task_index;
rtems_task High_task(
@@ -30,6 +29,8 @@ rtems_task Low_task(
void test_init();
+int operation_count = OPERATION_COUNT;
+
rtems_task Init(
rtems_task_argument argument
)
@@ -53,9 +54,12 @@ void test_init()
rtems_task_priority priority;
uint32_t index;
- priority = 250;
+ priority = RTEMS_MAXIMUM_PRIORITY - 1;
+
+ if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 )
+ operation_count = RTEMS_MAXIMUM_PRIORITY - 2;
- for( index = 0; index <= OPERATION_COUNT ; index++ ) {
+ for( index = 0; index <= operation_count ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
@@ -70,7 +74,7 @@ void test_init()
priority--;
if ( index==0 ) task_entry = Low_task;
- else if ( index==OPERATION_COUNT ) task_entry = High_task;
+ else if ( index==operation_count ) task_entry = High_task;
else task_entry = Middle_tasks;
status = rtems_task_start( Task_id[ index ], task_entry, 0 );
@@ -91,7 +95,7 @@ rtems_task High_task(
put_time(
"rtems_task_resume: task readied -- preempts caller",
end_time,
- OPERATION_COUNT,
+ operation_count,
0,
CALLING_OVERHEAD_TASK_RESUME
);
@@ -120,7 +124,7 @@ rtems_task Low_task(
put_time(
"rtems_task_suspend: calling task",
end_time,
- OPERATION_COUNT,
+ operation_count,
0,
CALLING_OVERHEAD_TASK_SUSPEND
);
diff --git a/testsuites/tmtests/tm06/task1.c b/testsuites/tmtests/tm06/task1.c
index 0429651947..c8aa71e138 100644
--- a/testsuites/tmtests/tm06/task1.c
+++ b/testsuites/tmtests/tm06/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -52,7 +51,7 @@ void test_init( void )
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
- 128,
+ (RTEMS_MAXIMUM_PRIORITY / 2) + 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -97,7 +96,7 @@ rtems_task Task_1(
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
- 254,
+ RTEMS_MAXIMUM_PRIORITY - 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
diff --git a/testsuites/tmtests/tm07/task1.c b/testsuites/tmtests/tm07/task1.c
index f6247f4a2b..a776e5ad24 100644
--- a/testsuites/tmtests/tm07/task1.c
+++ b/testsuites/tmtests/tm07/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -29,6 +28,8 @@ rtems_task Low_task(
void test_init();
+int operation_count = OPERATION_COUNT;
+
rtems_task Init(
rtems_task_argument argument
)
@@ -52,9 +53,12 @@ void test_init()
rtems_task_entry task_entry;
uint32_t index;
- priority = 250;
+ priority = RTEMS_MAXIMUM_PRIORITY - 1;
+
+ if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 )
+ operation_count = RTEMS_MAXIMUM_PRIORITY - 2;
- for( index=0 ; index <= OPERATION_COUNT ; index++ ) {
+ for( index=0 ; index <= operation_count ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
priority,
@@ -67,7 +71,7 @@ void test_init()
priority--;
if ( index == 0 ) task_entry = Low_task;
- else if ( index == OPERATION_COUNT ) task_entry = High_task;
+ else if ( index == operation_count ) task_entry = High_task;
else task_entry = Middle_tasks;
status = rtems_task_start( Task_id[index], task_entry, 0 );
@@ -85,7 +89,7 @@ rtems_task High_task(
put_time(
"rtems_task_restart: suspended task -- preempts caller",
end_time,
- OPERATION_COUNT,
+ operation_count,
0,
CALLING_OVERHEAD_TASK_RESTART
);
diff --git a/testsuites/tmtests/tm08/task1.c b/testsuites/tmtests/tm08/task1.c
index 13f1047d24..70a8f75bbc 100644
--- a/testsuites/tmtests/tm08/task1.c
+++ b/testsuites/tmtests/tm08/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -45,7 +44,7 @@ void test_init()
status = rtems_task_create(
1,
- 128,
+ (RTEMS_MAXIMUM_PRIORITY / 2) + 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -58,7 +57,7 @@ void test_init()
status = rtems_task_create(
1,
- 254,
+ RTEMS_MAXIMUM_PRIORITY - 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -105,7 +104,12 @@ rtems_task test_task(
benchmark_timer_initialize();
for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) rtems_task_set_priority( Test_task_id, 253, &old_priority );
+ (void) rtems_task_set_priority(
+ Test_task_id,
+ RTEMS_MAXIMUM_PRIORITY - 2,
+ &old_priority
+ );
+
end_time = benchmark_timer_read();
put_time(
diff --git a/testsuites/tmtests/tm09/task1.c b/testsuites/tmtests/tm09/task1.c
index 0feee762e8..8ead82646e 100644
--- a/testsuites/tmtests/tm09/task1.c
+++ b/testsuites/tmtests/tm09/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -32,7 +31,7 @@ rtems_task Init(
status = rtems_task_create(
1,
- 128,
+ (RTEMS_MAXIMUM_PRIORITY / 2) + 1,
RTEMS_MINIMUM_STACK_SIZE * 2,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
diff --git a/testsuites/tmtests/tm10/task1.c b/testsuites/tmtests/tm10/task1.c
index 3edabf6c86..ae41ff6525 100644
--- a/testsuites/tmtests/tm10/task1.c
+++ b/testsuites/tmtests/tm10/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -30,6 +29,8 @@ rtems_task Low_task(
void test_init();
+int operation_count = OPERATION_COUNT;
+
rtems_task Init(
rtems_task_argument argument
)
@@ -48,16 +49,19 @@ rtems_task Init(
void test_init()
{
- uint32_t index;
+ int index;
size_t size;
rtems_task_entry task_entry;
rtems_status_code status;
rtems_task_priority priority;
rtems_id task_id;
- priority = 5;
+ priority = 2;
+
+ if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 )
+ operation_count = RTEMS_MAXIMUM_PRIORITY - 2;
- for( index = 0; index <= OPERATION_COUNT ; index++ ) {
+ for( index = 0; index < operation_count ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
priority,
@@ -71,7 +75,7 @@ void test_init()
priority++;
if ( index==0 ) task_entry = High_task;
- else if ( index==OPERATION_COUNT ) task_entry = Low_task;
+ else if ( index==operation_count-1 ) task_entry = Low_task;
else task_entry = Middle_tasks;
status = rtems_task_start( task_id, task_entry, 0 );
@@ -80,7 +84,7 @@ void test_init()
status = rtems_message_queue_create(
1,
- OPERATION_COUNT,
+ operation_count,
16,
RTEMS_DEFAULT_ATTRIBUTES,
&Queue_id
@@ -88,12 +92,12 @@ void test_init()
directive_failed( status, "rtems_message_queue_create" );
benchmark_timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
+ for ( index=1 ; index < operation_count ; index++ )
(void) benchmark_timer_empty_function();
overhead = benchmark_timer_read();
benchmark_timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
+ for ( index=1 ; index < operation_count ; index++ )
(void) rtems_message_queue_receive(
Queue_id,
(long (*)[4]) Buffer,
@@ -106,7 +110,7 @@ void test_init()
put_time(
"rtems_message_queue_receive: not available -- NO_WAIT",
end_time,
- OPERATION_COUNT,
+ operation_count,
overhead,
CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE
);
@@ -154,7 +158,7 @@ rtems_task Low_task(
put_time(
"rtems_message_queue_receive: not available -- caller blocks",
end_time,
- OPERATION_COUNT,
+ operation_count - 1,
0,
CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE
);
diff --git a/testsuites/tmtests/tm11/task1.c b/testsuites/tmtests/tm11/task1.c
index 5bf8bc5415..65e353ac98 100644
--- a/testsuites/tmtests/tm11/task1.c
+++ b/testsuites/tmtests/tm11/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -29,6 +28,7 @@ rtems_task High_task(
rtems_task_argument argument
);
+int operation_count = OPERATION_COUNT;
void Init(
rtems_task_argument argument
@@ -43,7 +43,7 @@ void Init(
status = rtems_task_create(
1,
- 251,
+ RTEMS_MAXIMUM_PRIORITY - 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -84,9 +84,11 @@ rtems_task test_init(
);
directive_failed( status, "rtems_message_queue_create" );
- priority = 250;
+ priority = RTEMS_MAXIMUM_PRIORITY - 2;
- for( index = 0; index < OPERATION_COUNT ; index++ ) {
+ if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 )
+ operation_count = RTEMS_MAXIMUM_PRIORITY - 2;
+ for( index = 0; index < operation_count ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
priority,
@@ -99,7 +101,7 @@ rtems_task test_init(
priority--;
- if ( index==OPERATION_COUNT-1 ) task_entry = High_task;
+ if ( index==operation_count-1 ) task_entry = High_task;
else task_entry = Middle_tasks;
status = rtems_task_start( task_id, task_entry, 0 );
@@ -146,7 +148,7 @@ rtems_task High_task(
put_time(
"rtems_message_queue_send: task readied -- preempts caller",
end_time,
- OPERATION_COUNT,
+ operation_count,
0,
CALLING_OVERHEAD_MESSAGE_QUEUE_SEND
);
diff --git a/testsuites/tmtests/tm12/task1.c b/testsuites/tmtests/tm12/task1.c
index 8aac9f06d4..a79cefdfe5 100644
--- a/testsuites/tmtests/tm12/task1.c
+++ b/testsuites/tmtests/tm12/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -31,6 +30,8 @@ rtems_task Low_tasks(
#define MESSAGE_SIZE (sizeof(long) * 4)
+int operation_count = OPERATION_COUNT;
+
rtems_task Init(
rtems_task_argument argument
)
@@ -44,7 +45,7 @@ rtems_task Init(
status = rtems_task_create(
1,
- 251,
+ RTEMS_MAXIMUM_PRIORITY - 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -72,16 +73,19 @@ rtems_task test_init(
status = rtems_message_queue_create(
rtems_build_name( 'M', 'Q', '1', ' ' ),
- OPERATION_COUNT,
+ operation_count,
MESSAGE_SIZE,
RTEMS_DEFAULT_ATTRIBUTES,
&Queue_id
);
directive_failed( status, "rtems_message_queue_create" );
- priority = 250;
+ priority = RTEMS_MAXIMUM_PRIORITY - 1;
+
+ if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 )
+ operation_count = RTEMS_MAXIMUM_PRIORITY - 2;
- for( index = 0; index <= OPERATION_COUNT ; index++ ) {
+ for( index = 0; index < operation_count ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
priority,
@@ -94,8 +98,8 @@ rtems_task test_init(
priority--;
- if ( index==OPERATION_COUNT ) task_entry = High_task;
- else task_entry = Low_tasks;
+ if ( index==operation_count-1 ) task_entry = High_task;
+ else task_entry = Low_tasks;
status = rtems_task_start( task_id, task_entry, 0 );
directive_failed( status, "rtems_task_start LOOP" );
@@ -109,19 +113,19 @@ rtems_task High_task(
uint32_t index;
benchmark_timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
+ for ( index=1 ; index < operation_count ; index++ )
(void) benchmark_timer_empty_function();
overhead = benchmark_timer_read();
benchmark_timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
+ for ( index=1 ; index < operation_count ; index++ )
(void) rtems_message_queue_send( Queue_id, Buffer, MESSAGE_SIZE );
end_time = benchmark_timer_read();
put_time(
"rtems_message_queue_send: task readied -- returns to caller",
end_time,
- OPERATION_COUNT,
+ operation_count - 1,
overhead,
CALLING_OVERHEAD_MESSAGE_QUEUE_SEND
);
diff --git a/testsuites/tmtests/tm13/task1.c b/testsuites/tmtests/tm13/task1.c
index 482029d92b..a687d8004e 100644
--- a/testsuites/tmtests/tm13/task1.c
+++ b/testsuites/tmtests/tm13/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -31,6 +30,8 @@ rtems_task High_task(
#define MESSAGE_SIZE (sizeof(long) * 4)
+int operation_count = OPERATION_COUNT;
+
void Init(
rtems_task_argument argument
)
@@ -44,7 +45,7 @@ void Init(
status = rtems_task_create(
1,
- 251,
+ RTEMS_MAXIMUM_PRIORITY - 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -63,7 +64,7 @@ rtems_task test_init(
rtems_task_argument argument
)
{
- uint32_t index;
+ uint32_t index;
rtems_task_entry task_entry;
rtems_task_priority priority;
rtems_id task_id;
@@ -83,9 +84,12 @@ rtems_task test_init(
);
directive_failed( status, "rtems_message_queue_create" );
- priority = 250;
+ priority = RTEMS_MAXIMUM_PRIORITY - 2;
- for( index = 0; index < OPERATION_COUNT ; index++ ) {
+ if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 )
+ operation_count = RTEMS_MAXIMUM_PRIORITY - 2;
+
+ for( index = 0; index < operation_count ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
priority,
@@ -98,7 +102,7 @@ rtems_task test_init(
priority--;
- if ( index==OPERATION_COUNT-1 ) task_entry = High_task;
+ if ( index==operation_count-1 ) task_entry = High_task;
else task_entry = Middle_tasks;
status = rtems_task_start( task_id, task_entry, 0 );
@@ -145,7 +149,7 @@ rtems_task High_task(
put_time(
"rtems_message_queue_urgent: task readied -- preempts caller",
end_time,
- OPERATION_COUNT,
+ operation_count,
0,
CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT
);
diff --git a/testsuites/tmtests/tm14/task1.c b/testsuites/tmtests/tm14/task1.c
index fb897699dc..40260d1705 100644
--- a/testsuites/tmtests/tm14/task1.c
+++ b/testsuites/tmtests/tm14/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -31,6 +30,8 @@ rtems_task Low_tasks(
#define MESSAGE_SIZE (sizeof(long) * 4)
+int operation_count = OPERATION_COUNT;
+
rtems_task Init(
rtems_task_argument argument
)
@@ -44,7 +45,7 @@ rtems_task Init(
status = rtems_task_create(
1,
- 251,
+ RTEMS_MAXIMUM_PRIORITY - 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -79,9 +80,11 @@ rtems_task test_init(
);
directive_failed( status, "rtems_message_queue_create" );
- priority = 250;
+ priority = RTEMS_MAXIMUM_PRIORITY - 2;
+ if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 )
+ operation_count = RTEMS_MAXIMUM_PRIORITY - 2;
- for( index = 0; index <= OPERATION_COUNT ; index++ ) {
+ for( index = 0; index < operation_count ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
priority,
@@ -94,8 +97,8 @@ rtems_task test_init(
priority--;
- if ( index==OPERATION_COUNT ) task_entry = High_task;
- else task_entry = Low_tasks;
+ if ( index==operation_count-1 ) task_entry = High_task;
+ else task_entry = Low_tasks;
status = rtems_task_start( task_id, task_entry, 0 );
directive_failed( status, "rtems_task_start LOOP" );
@@ -109,19 +112,19 @@ rtems_task High_task(
uint32_t index;
benchmark_timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
+ for ( index=1 ; index < operation_count ; index++ )
(void) benchmark_timer_empty_function();
overhead = benchmark_timer_read();
benchmark_timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
+ for ( index=1 ; index <= operation_count ; index++ )
(void) rtems_message_queue_urgent( Queue_id, Buffer, MESSAGE_SIZE );
end_time = benchmark_timer_read();
put_time(
"rtems_message_queue_urgent: task readied -- returns to caller",
end_time,
- OPERATION_COUNT,
+ operation_count,
overhead,
CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT
);
diff --git a/testsuites/tmtests/tm16/task1.c b/testsuites/tmtests/tm16/task1.c
index c5645a5e4f..2f1cc1981b 100644
--- a/testsuites/tmtests/tm16/task1.c
+++ b/testsuites/tmtests/tm16/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -27,6 +26,8 @@ rtems_task High_task(
rtems_task_argument argument
);
+int operation_count = OPERATION_COUNT;
+
rtems_task Init(
rtems_task_argument argument
)
@@ -40,7 +41,7 @@ rtems_task Init(
status = rtems_task_create(
rtems_build_name( 'T', 'E', 'S', 'T' ),
- 251,
+ RTEMS_MAXIMUM_PRIORITY - 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -61,7 +62,7 @@ rtems_task test_init(
{
rtems_task_priority priority;
rtems_status_code status;
- uint32_t index;
+ uint32_t index;
rtems_task_entry task_entry;
/* As each task is started, it preempts this task and
@@ -69,9 +70,11 @@ rtems_task test_init(
* this loop all created tasks are blocked.
*/
- priority = 250;
+ priority = RTEMS_MAXIMUM_PRIORITY - 2;
+ if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 )
+ operation_count = RTEMS_MAXIMUM_PRIORITY - 2;
- for( index = 0 ; index <= OPERATION_COUNT ; index++ ) {
+ for( index = 0 ; index < operation_count ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'M', 'I', 'D', ' ' ),
priority,
@@ -82,8 +85,8 @@ rtems_task test_init(
);
directive_failed( status, "rtems_task_create LOOP" );
- if ( index == OPERATION_COUNT ) task_entry = High_task;
- else task_entry = Middle_tasks;
+ if ( index == operation_count-1 ) task_entry = High_task;
+ else task_entry = Middle_tasks;
status = rtems_task_start( Task_id[ index ], task_entry, 0 );
directive_failed( status, "rtems_task_start LOOP" );
@@ -137,7 +140,7 @@ rtems_task High_task(
put_time(
"rtems_event_send: task readied -- preempts caller",
end_time,
- OPERATION_COUNT,
+ operation_count - 1,
0,
CALLING_OVERHEAD_EVENT_SEND
);
diff --git a/testsuites/tmtests/tm17/task1.c b/testsuites/tmtests/tm17/task1.c
index fda21528f1..028ce4e7b8 100644
--- a/testsuites/tmtests/tm17/task1.c
+++ b/testsuites/tmtests/tm17/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -28,6 +27,8 @@ rtems_task Last_task(
rtems_task_argument argument
);
+int operation_count = OPERATION_COUNT;
+
rtems_task Init(
rtems_task_argument argument
)
@@ -40,9 +41,11 @@ rtems_task Init(
puts( "\n\n*** TIME TEST 17 ***" );
- Task_priority = 254;
+ Task_priority = RTEMS_MAXIMUM_PRIORITY - 1;
+ if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 )
+ operation_count = RTEMS_MAXIMUM_PRIORITY - 2;
- for( index = 0; index <= OPERATION_COUNT ; index++ ) {
+ for( index = 0; index < operation_count ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
Task_priority,
@@ -53,9 +56,9 @@ rtems_task Init(
);
directive_failed( status, "rtems_task_create loop" );
- if ( index == OPERATION_COUNT ) task_entry = Last_task;
- else if ( index == 0 ) task_entry = First_task;
- else task_entry = Middle_tasks;
+ if ( index == operation_count-1 ) task_entry = Last_task;
+ else if ( index == 0 ) task_entry = First_task;
+ else task_entry = Middle_tasks;
status = rtems_task_start( Task_id[ index ], task_entry, 0 );
directive_failed( status, "rtems_task_start loop" );
@@ -109,14 +112,14 @@ rtems_task Last_task(
end_time = benchmark_timer_read();
benchmark_timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
+ for ( index=1 ; index < operation_count ; index++ )
(void) benchmark_timer_empty_function();
overhead = benchmark_timer_read();
put_time(
"rtems_task_set_priority: preempts caller",
end_time,
- OPERATION_COUNT,
+ operation_count - 1,
overhead,
CALLING_OVERHEAD_TASK_SET_PRIORITY
);
diff --git a/testsuites/tmtests/tm18/task1.c b/testsuites/tmtests/tm18/task1.c
index 02913cd194..fb1b7d4533 100644
--- a/testsuites/tmtests/tm18/task1.c
+++ b/testsuites/tmtests/tm18/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -51,13 +50,13 @@ void test_init()
{
rtems_id id;
rtems_task_entry task_entry;
- uint32_t index;
+ uint32_t index;
rtems_status_code status;
for ( index = 0 ; index <= OPERATION_COUNT ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
- 128,
+ (RTEMS_MAXIMUM_PRIORITY / 2) + 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
diff --git a/testsuites/tmtests/tm19/task1.c b/testsuites/tmtests/tm19/task1.c
index 533356ee6b..152327c7d1 100644
--- a/testsuites/tmtests/tm19/task1.c
+++ b/testsuites/tmtests/tm19/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -45,7 +44,7 @@ rtems_task Init(
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
- 128,
+ (RTEMS_MAXIMUM_PRIORITY / 2) + 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -58,7 +57,7 @@ rtems_task Init(
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
- 127,
+ (RTEMS_MAXIMUM_PRIORITY / 2),
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -71,7 +70,7 @@ rtems_task Init(
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
- 126,
+ (RTEMS_MAXIMUM_PRIORITY / 2) - 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
diff --git a/testsuites/tmtests/tm20/task1.c b/testsuites/tmtests/tm20/task1.c
index 7e28272eb8..b1be3afd30 100644
--- a/testsuites/tmtests/tm20/task1.c
+++ b/testsuites/tmtests/tm20/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -58,7 +57,7 @@ rtems_task Init(
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', '1' ),
- 128,
+ (RTEMS_MAXIMUM_PRIORITY / 2) + 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -71,7 +70,7 @@ rtems_task Init(
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', '2' ),
- 129,
+ (RTEMS_MAXIMUM_PRIORITY / 2) + 2,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -310,7 +309,8 @@ rtems_task Task_1(
);
directive_failed( status, "rtems_task_mode" );
- status = rtems_task_set_priority( RTEMS_SELF, 254, &previous_priority );
+ status = rtems_task_set_priority(
+ RTEMS_SELF, RTEMS_MAXIMUM_PRIORITY - 1, &previous_priority );
directive_failed( status, "rtems_task_set_priority" );
status = rtems_region_get_segment(
diff --git a/testsuites/tmtests/tm21/task1.c b/testsuites/tmtests/tm21/task1.c
index 03dc212556..c6ffcb3d69 100644
--- a/testsuites/tmtests/tm21/task1.c
+++ b/testsuites/tmtests/tm21/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -33,7 +32,7 @@ rtems_task Init(
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
- 250,
+ RTEMS_MAXIMUM_PRIORITY - 5,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -61,7 +60,7 @@ rtems_task Task_1(
for( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
status = rtems_task_create (
index,
- 254,
+ RTEMS_MAXIMUM_PRIORITY - 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
diff --git a/testsuites/tmtests/tm23/task1.c b/testsuites/tmtests/tm23/task1.c
index cc10abb987..348b1a2aa7 100644
--- a/testsuites/tmtests/tm23/task1.c
+++ b/testsuites/tmtests/tm23/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -34,6 +33,7 @@ rtems_task High_task(
rtems_task_argument argument
);
+int operation_count = OPERATION_COUNT;
rtems_task Init(
rtems_task_argument argument
@@ -55,9 +55,11 @@ rtems_task Init(
(void) benchmark_timer_empty_function();
overhead = benchmark_timer_read();
- priority = 5;
+ priority = 2;
+ if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 )
+ operation_count = RTEMS_MAXIMUM_PRIORITY - 2;
- for( index=1 ; index <= OPERATION_COUNT ; index++ ) {
+ for( index=1 ; index <= operation_count ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
priority,
@@ -69,7 +71,7 @@ rtems_task Init(
directive_failed( status, "rtems_task_create LOOP" );
if ( index == 1 ) task_entry = High_task;
- else if ( index == OPERATION_COUNT ) task_entry = Low_task;
+ else if ( index == operation_count ) task_entry = Low_task;
else task_entry = Middle_tasks;
status = rtems_task_start( id, task_entry, 0 );
@@ -291,8 +293,8 @@ rtems_task Low_task(
put_time(
"rtems_task_wake_when",
end_time,
- OPERATION_COUNT,
- 0,
+ operation_count,
+ 0,
CALLING_OVERHEAD_TASK_WAKE_WHEN
);
diff --git a/testsuites/tmtests/tm24/task1.c b/testsuites/tmtests/tm24/task1.c
index e67178f88c..737bc822e5 100644
--- a/testsuites/tmtests/tm24/task1.c
+++ b/testsuites/tmtests/tm24/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -37,7 +36,7 @@ rtems_task Init(
status = rtems_task_create(
rtems_build_name( 'H', 'I', 'G', 'H' ),
- 10,
+ 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -51,7 +50,7 @@ rtems_task Init(
for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'R', 'E', 'S', 'T' ),
- 128,
+ (RTEMS_MAXIMUM_PRIORITY / 2) + 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
diff --git a/testsuites/tmtests/tm25/task1.c b/testsuites/tmtests/tm25/task1.c
index 1627c1a95f..c853d97b95 100644
--- a/testsuites/tmtests/tm25/task1.c
+++ b/testsuites/tmtests/tm25/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -46,7 +45,7 @@ rtems_task Init(
status = rtems_task_create(
rtems_build_name( 'L', 'O', 'W', ' ' ),
- 254,
+ RTEMS_MAXIMUM_PRIORITY - 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -60,7 +59,7 @@ rtems_task Init(
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
- 128,
+ (RTEMS_MAXIMUM_PRIORITY / 2) + 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c
index bb26520eed..ec1193b90c 100644
--- a/testsuites/tmtests/tm26/task1.c
+++ b/testsuites/tmtests/tm26/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -95,9 +94,10 @@ rtems_task Init(
puts( "\n\n*** TIME TEST 26 ***" );
+#define FP1_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 3) /* 201, */
status = rtems_task_create(
rtems_build_name( 'F', 'P', '1', ' ' ),
- 201,
+ FP1_PRIORITY,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_FLOATING_POINT,
@@ -108,9 +108,10 @@ rtems_task Init(
status = rtems_task_start( task_id, Floating_point_task_1, 0 );
directive_failed( status, "rtems_task_start of FP1" );
+#define FP2_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 2) /* 202, */
status = rtems_task_create(
rtems_build_name( 'F', 'P', '2', ' ' ),
- 202,
+ FP2_PRIORITY,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_FLOATING_POINT,
@@ -121,9 +122,10 @@ rtems_task Init(
status = rtems_task_start( task_id, Floating_point_task_2, 0 );
directive_failed( status, "rtems_task_start of FP2" );
+#define LOW_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 4) /* 200, */
status = rtems_task_create(
rtems_build_name( 'L', 'O', 'W', ' ' ),
- 200,
+ LOW_PRIORITY,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -134,9 +136,10 @@ rtems_task Init(
status = rtems_task_start( task_id, Low_task, 0 );
directive_failed( status, "rtems_task_start of LOW" );
+#define MIDDLE_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 5) /* 128, */
status = rtems_task_create(
rtems_build_name( 'M', 'I', 'D', ' ' ),
- 128,
+ MIDDLE_PRIORITY,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -172,7 +175,7 @@ rtems_task Init(
for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'N', 'U', 'L', 'L' ),
- 254,
+ RTEMS_MAXIMUM_PRIORITY - 1, /* 254, */
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -235,7 +238,7 @@ rtems_task Middle_task(
Middle_tcb = _Thread_Executing;
_Thread_Executing =
- (Thread_Control *) _Thread_Ready_chain[200].first;
+ (Thread_Control *) _Thread_Ready_chain[LOW_PRIORITY].first;
/* do not force context switch */
@@ -272,7 +275,7 @@ rtems_task Low_task(
context_switch_another_task_time = benchmark_timer_read();
_Thread_Executing =
- (Thread_Control *) _Thread_Ready_chain[201].first;
+ (Thread_Control *) _Thread_Ready_chain[FP1_PRIORITY].first;
/* do not force context switch */
@@ -299,7 +302,7 @@ rtems_task Floating_point_task_1(
executing = _Thread_Executing;
_Thread_Executing =
- (Thread_Control *) _Thread_Ready_chain[202].first;
+ (Thread_Control *) _Thread_Ready_chain[FP2_PRIORITY].first;
/* do not force context switch */
@@ -322,7 +325,7 @@ rtems_task Floating_point_task_1(
executing = _Thread_Executing;
_Thread_Executing =
- (Thread_Control *) _Thread_Ready_chain[202].first;
+ (Thread_Control *) _Thread_Ready_chain[FP2_PRIORITY].first;
/* do not force context switch */
@@ -351,7 +354,7 @@ rtems_task Floating_point_task_2(
executing = _Thread_Executing;
_Thread_Executing =
- (Thread_Control *) _Thread_Ready_chain[201].first;
+ (Thread_Control *) _Thread_Ready_chain[FP1_PRIORITY].first;
FP_LOAD( 1.0 );
diff --git a/testsuites/tmtests/tm27/task1.c b/testsuites/tmtests/tm27/task1.c
index 3794c51354..9d63cf2fd5 100644
--- a/testsuites/tmtests/tm27/task1.c
+++ b/testsuites/tmtests/tm27/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -52,9 +51,10 @@ rtems_task Init(
puts( "\n\n*** TIME TEST 27 ***" );
+#define LOW_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 1)
status = rtems_task_create(
rtems_build_name( 'T', 'A', '1', ' ' ),
- 254,
+ LOW_PRIORITY,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -67,7 +67,7 @@ rtems_task Init(
status = rtems_task_create(
rtems_build_name( 'T', 'A', '2', ' ' ),
- 254,
+ LOW_PRIORITY,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -170,7 +170,7 @@ rtems_task Task_1(
_Thread_Dispatch_disable_level = 0;
- _Thread_Heir = (rtems_tcb *) _Thread_Ready_chain[254].last;
+ _Thread_Heir = (rtems_tcb *) _Thread_Ready_chain[LOW_PRIORITY].last;
_Context_Switch_necessary = 1;
@@ -227,7 +227,7 @@ rtems_task Task_2(
_Thread_Dispatch_disable_level = 0;
- _Thread_Heir = (rtems_tcb *) _Thread_Ready_chain[254].first;
+ _Thread_Heir = (rtems_tcb *) _Thread_Ready_chain[LOW_PRIORITY].first;
_Context_Switch_necessary = 1;
diff --git a/testsuites/tmtests/tm28/task1.c b/testsuites/tmtests/tm28/task1.c
index 46242da61f..166d67eb5b 100644
--- a/testsuites/tmtests/tm28/task1.c
+++ b/testsuites/tmtests/tm28/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -34,7 +33,7 @@ rtems_task Init(
status = rtems_task_create(
rtems_build_name( 'T', 'I', 'M', 'E' ),
- 128,
+ (RTEMS_MAXIMUM_PRIORITY / 2) + 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
diff --git a/testsuites/tmtests/tm29/task1.c b/testsuites/tmtests/tm29/task1.c
index 2b3241f8c9..aff621dc9e 100644
--- a/testsuites/tmtests/tm29/task1.c
+++ b/testsuites/tmtests/tm29/task1.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -117,10 +116,11 @@ rtems_task Init(
CALLING_OVERHEAD_RATE_MONOTONIC_DELETE
);
+#define LOOP_TASK_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2) + 1)
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
status = rtems_task_create(
rtems_build_name( 'T', 'E', 'S', 'T' ),
- 128,
+ LOOP_TASK_PRIORITY,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -132,9 +132,10 @@ rtems_task Init(
directive_failed( status, "rtems_task_start LOOP" );
}
+#define MIDDLE_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 2)
status = rtems_task_create(
rtems_build_name( 'L', 'O', 'W', ' ' ),
- 200,
+ MIDDLE_PRIORITY,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
diff --git a/testsuites/tmtests/tmoverhd/testtask.c b/testsuites/tmtests/tmoverhd/testtask.c
index 68762cae76..ede6147ba0 100644
--- a/testsuites/tmtests/tmoverhd/testtask.c
+++ b/testsuites/tmtests/tmoverhd/testtask.c
@@ -1,6 +1,5 @@
/*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -35,7 +34,7 @@ rtems_task Init(
status = rtems_task_create(
rtems_build_name( 'T', 'A', '1', ' ' ),
- 254,
+ RTEMS_MAXIMUM_PRIORITY - 1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,