forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -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>
|
2008-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* tm26/task1.c: Fix typo.
|
* tm26/task1.c: Fix typo.
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -33,7 +32,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
Task_name[ 1 ],
|
Task_name[ 1 ],
|
||||||
128,
|
(RTEMS_MAXIMUM_PRIORITY / 2) + 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -29,6 +28,7 @@ rtems_task Low_task(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
);
|
);
|
||||||
|
|
||||||
|
int operation_count = OPERATION_COUNT;
|
||||||
|
|
||||||
void test_init();
|
void test_init();
|
||||||
|
|
||||||
@@ -51,10 +51,10 @@ rtems_task Init(
|
|||||||
void test_init()
|
void test_init()
|
||||||
{
|
{
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
rtems_task_priority priority;
|
rtems_task_priority priority;
|
||||||
|
|
||||||
priority = 5;
|
priority = 2;
|
||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'H', 'I', 'G', 'H' ),
|
rtems_build_name( 'H', 'I', 'G', 'H' ),
|
||||||
@@ -71,7 +71,9 @@ void test_init()
|
|||||||
status = rtems_task_start( High_id, High_task, 0 );
|
status = rtems_task_start( High_id, High_task, 0 );
|
||||||
directive_failed( status, "rtems_task_start of high task" );
|
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(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'M', 'I', 'D', ' ' ),
|
rtems_build_name( 'M', 'I', 'D', ' ' ),
|
||||||
priority,
|
priority,
|
||||||
@@ -147,7 +149,7 @@ rtems_task Low_task(
|
|||||||
put_time(
|
put_time(
|
||||||
"rtems_semaphore_obtain: not available -- caller blocks",
|
"rtems_semaphore_obtain: not available -- caller blocks",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count - 1,
|
||||||
0,
|
0,
|
||||||
CALLING_OVERHEAD_SEMAPHORE_OBTAIN
|
CALLING_OVERHEAD_SEMAPHORE_OBTAIN
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -26,6 +25,7 @@ rtems_task High_task(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
);
|
);
|
||||||
|
|
||||||
|
int operation_count = OPERATION_COUNT;
|
||||||
|
|
||||||
rtems_task Init(
|
rtems_task Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
@@ -39,7 +39,7 @@ rtems_task Init(
|
|||||||
puts( "\n\n*** TIME TEST 3 ***" );
|
puts( "\n\n*** TIME TEST 3 ***" );
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'A', '1', ' ' ),
|
rtems_build_name( 'T', 'A', '1', ' ' ),
|
||||||
252,
|
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -59,11 +59,11 @@ rtems_task test_init(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
uint32_t index;
|
int index;
|
||||||
rtems_id task_id;
|
rtems_id task_id;
|
||||||
rtems_task_priority priority;
|
rtems_task_priority priority;
|
||||||
|
|
||||||
priority = 250;
|
priority = RTEMS_MAXIMUM_PRIORITY - 2;
|
||||||
|
|
||||||
status = rtems_semaphore_create(
|
status = rtems_semaphore_create(
|
||||||
rtems_build_name( 'S', 'M', '1', '\0'),
|
rtems_build_name( 'S', 'M', '1', '\0'),
|
||||||
@@ -74,7 +74,9 @@ rtems_task test_init(
|
|||||||
);
|
);
|
||||||
directive_failed( status, "rtems_semaphore_create of SM1" );
|
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_task_create(
|
||||||
rtems_build_name( 'M', 'I', 'D', ' ' ),
|
rtems_build_name( 'M', 'I', 'D', ' ' ),
|
||||||
priority,
|
priority,
|
||||||
@@ -140,7 +142,7 @@ rtems_task High_task(
|
|||||||
put_time(
|
put_time(
|
||||||
"rtems_semaphore_release: task readied -- preempts caller",
|
"rtems_semaphore_release: task readied -- preempts caller",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count - 1,
|
||||||
0,
|
0,
|
||||||
CALLING_OVERHEAD_SEMAPHORE_RELEASE
|
CALLING_OVERHEAD_SEMAPHORE_RELEASE
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -102,7 +101,7 @@ rtems_task Highest_task(
|
|||||||
|
|
||||||
status = rtems_task_set_priority(
|
status = rtems_task_set_priority(
|
||||||
RTEMS_CURRENT_PRIORITY,
|
RTEMS_CURRENT_PRIORITY,
|
||||||
254,
|
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||||
&old_priority
|
&old_priority
|
||||||
);
|
);
|
||||||
directive_failed( status, "rtems_task_set_priority" );
|
directive_failed( status, "rtems_task_set_priority" );
|
||||||
@@ -215,19 +214,19 @@ rtems_task High_task(
|
|||||||
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
|
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
name,
|
name,
|
||||||
250,
|
RTEMS_MAXIMUM_PRIORITY - 4,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_NO_PREEMPT,
|
RTEMS_NO_PREEMPT,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
&Task_id[ index ]
|
&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 );
|
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 ] );
|
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();
|
benchmark_timer_initialize();
|
||||||
@@ -262,16 +261,16 @@ rtems_task High_task(
|
|||||||
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
|
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
name,
|
name,
|
||||||
250,
|
RTEMS_MAXIMUM_PRIORITY - 4,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
&Task_id[ index ]
|
&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 );
|
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();
|
benchmark_timer_initialize();
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -13,7 +12,7 @@
|
|||||||
#define CONFIGURE_INIT
|
#define CONFIGURE_INIT
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
rtems_id Task_id[OPERATION_COUNT+1];
|
rtems_id Task_id[OPERATION_COUNT+1];
|
||||||
uint32_t Task_index;
|
uint32_t Task_index;
|
||||||
|
|
||||||
rtems_task High_task(
|
rtems_task High_task(
|
||||||
@@ -30,6 +29,8 @@ rtems_task Low_task(
|
|||||||
|
|
||||||
void test_init();
|
void test_init();
|
||||||
|
|
||||||
|
int operation_count = OPERATION_COUNT;
|
||||||
|
|
||||||
rtems_task Init(
|
rtems_task Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
@@ -53,9 +54,12 @@ void test_init()
|
|||||||
rtems_task_priority priority;
|
rtems_task_priority priority;
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
|
|
||||||
priority = 250;
|
priority = RTEMS_MAXIMUM_PRIORITY - 1;
|
||||||
|
|
||||||
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(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
@@ -70,7 +74,7 @@ void test_init()
|
|||||||
priority--;
|
priority--;
|
||||||
|
|
||||||
if ( index==0 ) task_entry = Low_task;
|
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;
|
else task_entry = Middle_tasks;
|
||||||
|
|
||||||
status = rtems_task_start( Task_id[ index ], task_entry, 0 );
|
status = rtems_task_start( Task_id[ index ], task_entry, 0 );
|
||||||
@@ -91,7 +95,7 @@ rtems_task High_task(
|
|||||||
put_time(
|
put_time(
|
||||||
"rtems_task_resume: task readied -- preempts caller",
|
"rtems_task_resume: task readied -- preempts caller",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count,
|
||||||
0,
|
0,
|
||||||
CALLING_OVERHEAD_TASK_RESUME
|
CALLING_OVERHEAD_TASK_RESUME
|
||||||
);
|
);
|
||||||
@@ -120,7 +124,7 @@ rtems_task Low_task(
|
|||||||
put_time(
|
put_time(
|
||||||
"rtems_task_suspend: calling task",
|
"rtems_task_suspend: calling task",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count,
|
||||||
0,
|
0,
|
||||||
CALLING_OVERHEAD_TASK_SUSPEND
|
CALLING_OVERHEAD_TASK_SUSPEND
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -52,7 +51,7 @@ void test_init( void )
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
128,
|
(RTEMS_MAXIMUM_PRIORITY / 2) + 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -97,7 +96,7 @@ rtems_task Task_1(
|
|||||||
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
|
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
254,
|
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -29,6 +28,8 @@ rtems_task Low_task(
|
|||||||
|
|
||||||
void test_init();
|
void test_init();
|
||||||
|
|
||||||
|
int operation_count = OPERATION_COUNT;
|
||||||
|
|
||||||
rtems_task Init(
|
rtems_task Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
@@ -52,9 +53,12 @@ void test_init()
|
|||||||
rtems_task_entry task_entry;
|
rtems_task_entry task_entry;
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
|
|
||||||
priority = 250;
|
priority = RTEMS_MAXIMUM_PRIORITY - 1;
|
||||||
|
|
||||||
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(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
priority,
|
priority,
|
||||||
@@ -67,7 +71,7 @@ void test_init()
|
|||||||
priority--;
|
priority--;
|
||||||
|
|
||||||
if ( index == 0 ) task_entry = Low_task;
|
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;
|
else task_entry = Middle_tasks;
|
||||||
|
|
||||||
status = rtems_task_start( Task_id[index], task_entry, 0 );
|
status = rtems_task_start( Task_id[index], task_entry, 0 );
|
||||||
@@ -85,7 +89,7 @@ rtems_task High_task(
|
|||||||
put_time(
|
put_time(
|
||||||
"rtems_task_restart: suspended task -- preempts caller",
|
"rtems_task_restart: suspended task -- preempts caller",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count,
|
||||||
0,
|
0,
|
||||||
CALLING_OVERHEAD_TASK_RESTART
|
CALLING_OVERHEAD_TASK_RESTART
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -45,7 +44,7 @@ void test_init()
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
1,
|
1,
|
||||||
128,
|
(RTEMS_MAXIMUM_PRIORITY / 2) + 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -58,7 +57,7 @@ void test_init()
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
1,
|
1,
|
||||||
254,
|
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -105,7 +104,12 @@ rtems_task test_task(
|
|||||||
|
|
||||||
benchmark_timer_initialize();
|
benchmark_timer_initialize();
|
||||||
for ( index=1 ; index <= OPERATION_COUNT ; index++ )
|
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();
|
end_time = benchmark_timer_read();
|
||||||
|
|
||||||
put_time(
|
put_time(
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-2007.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -32,7 +31,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
1,
|
1,
|
||||||
128,
|
(RTEMS_MAXIMUM_PRIORITY / 2) + 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE * 2,
|
RTEMS_MINIMUM_STACK_SIZE * 2,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-2007.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -30,6 +29,8 @@ rtems_task Low_task(
|
|||||||
|
|
||||||
void test_init();
|
void test_init();
|
||||||
|
|
||||||
|
int operation_count = OPERATION_COUNT;
|
||||||
|
|
||||||
rtems_task Init(
|
rtems_task Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
@@ -48,16 +49,19 @@ rtems_task Init(
|
|||||||
|
|
||||||
void test_init()
|
void test_init()
|
||||||
{
|
{
|
||||||
uint32_t index;
|
int index;
|
||||||
size_t size;
|
size_t size;
|
||||||
rtems_task_entry task_entry;
|
rtems_task_entry task_entry;
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
rtems_task_priority priority;
|
rtems_task_priority priority;
|
||||||
rtems_id task_id;
|
rtems_id task_id;
|
||||||
|
|
||||||
priority = 5;
|
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(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
priority,
|
priority,
|
||||||
@@ -71,7 +75,7 @@ void test_init()
|
|||||||
priority++;
|
priority++;
|
||||||
|
|
||||||
if ( index==0 ) task_entry = High_task;
|
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;
|
else task_entry = Middle_tasks;
|
||||||
|
|
||||||
status = rtems_task_start( task_id, task_entry, 0 );
|
status = rtems_task_start( task_id, task_entry, 0 );
|
||||||
@@ -80,7 +84,7 @@ void test_init()
|
|||||||
|
|
||||||
status = rtems_message_queue_create(
|
status = rtems_message_queue_create(
|
||||||
1,
|
1,
|
||||||
OPERATION_COUNT,
|
operation_count,
|
||||||
16,
|
16,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
&Queue_id
|
&Queue_id
|
||||||
@@ -88,12 +92,12 @@ void test_init()
|
|||||||
directive_failed( status, "rtems_message_queue_create" );
|
directive_failed( status, "rtems_message_queue_create" );
|
||||||
|
|
||||||
benchmark_timer_initialize();
|
benchmark_timer_initialize();
|
||||||
for ( index=1 ; index <= OPERATION_COUNT ; index++ )
|
for ( index=1 ; index < operation_count ; index++ )
|
||||||
(void) benchmark_timer_empty_function();
|
(void) benchmark_timer_empty_function();
|
||||||
overhead = benchmark_timer_read();
|
overhead = benchmark_timer_read();
|
||||||
|
|
||||||
benchmark_timer_initialize();
|
benchmark_timer_initialize();
|
||||||
for ( index=1 ; index <= OPERATION_COUNT ; index++ )
|
for ( index=1 ; index < operation_count ; index++ )
|
||||||
(void) rtems_message_queue_receive(
|
(void) rtems_message_queue_receive(
|
||||||
Queue_id,
|
Queue_id,
|
||||||
(long (*)[4]) Buffer,
|
(long (*)[4]) Buffer,
|
||||||
@@ -106,7 +110,7 @@ void test_init()
|
|||||||
put_time(
|
put_time(
|
||||||
"rtems_message_queue_receive: not available -- NO_WAIT",
|
"rtems_message_queue_receive: not available -- NO_WAIT",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count,
|
||||||
overhead,
|
overhead,
|
||||||
CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE
|
CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE
|
||||||
);
|
);
|
||||||
@@ -154,7 +158,7 @@ rtems_task Low_task(
|
|||||||
put_time(
|
put_time(
|
||||||
"rtems_message_queue_receive: not available -- caller blocks",
|
"rtems_message_queue_receive: not available -- caller blocks",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count - 1,
|
||||||
0,
|
0,
|
||||||
CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE
|
CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-2007.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -29,6 +28,7 @@ rtems_task High_task(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
);
|
);
|
||||||
|
|
||||||
|
int operation_count = OPERATION_COUNT;
|
||||||
|
|
||||||
void Init(
|
void Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
@@ -43,7 +43,7 @@ void Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
1,
|
1,
|
||||||
251,
|
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -84,9 +84,11 @@ rtems_task test_init(
|
|||||||
);
|
);
|
||||||
directive_failed( status, "rtems_message_queue_create" );
|
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(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
priority,
|
priority,
|
||||||
@@ -99,7 +101,7 @@ rtems_task test_init(
|
|||||||
|
|
||||||
priority--;
|
priority--;
|
||||||
|
|
||||||
if ( index==OPERATION_COUNT-1 ) task_entry = High_task;
|
if ( index==operation_count-1 ) task_entry = High_task;
|
||||||
else task_entry = Middle_tasks;
|
else task_entry = Middle_tasks;
|
||||||
|
|
||||||
status = rtems_task_start( task_id, task_entry, 0 );
|
status = rtems_task_start( task_id, task_entry, 0 );
|
||||||
@@ -146,7 +148,7 @@ rtems_task High_task(
|
|||||||
put_time(
|
put_time(
|
||||||
"rtems_message_queue_send: task readied -- preempts caller",
|
"rtems_message_queue_send: task readied -- preempts caller",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count,
|
||||||
0,
|
0,
|
||||||
CALLING_OVERHEAD_MESSAGE_QUEUE_SEND
|
CALLING_OVERHEAD_MESSAGE_QUEUE_SEND
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-2007.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -31,6 +30,8 @@ rtems_task Low_tasks(
|
|||||||
|
|
||||||
#define MESSAGE_SIZE (sizeof(long) * 4)
|
#define MESSAGE_SIZE (sizeof(long) * 4)
|
||||||
|
|
||||||
|
int operation_count = OPERATION_COUNT;
|
||||||
|
|
||||||
rtems_task Init(
|
rtems_task Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
@@ -44,7 +45,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
1,
|
1,
|
||||||
251,
|
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -72,16 +73,19 @@ rtems_task test_init(
|
|||||||
|
|
||||||
status = rtems_message_queue_create(
|
status = rtems_message_queue_create(
|
||||||
rtems_build_name( 'M', 'Q', '1', ' ' ),
|
rtems_build_name( 'M', 'Q', '1', ' ' ),
|
||||||
OPERATION_COUNT,
|
operation_count,
|
||||||
MESSAGE_SIZE,
|
MESSAGE_SIZE,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
&Queue_id
|
&Queue_id
|
||||||
);
|
);
|
||||||
directive_failed( status, "rtems_message_queue_create" );
|
directive_failed( status, "rtems_message_queue_create" );
|
||||||
|
|
||||||
priority = 250;
|
priority = RTEMS_MAXIMUM_PRIORITY - 1;
|
||||||
|
|
||||||
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(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
priority,
|
priority,
|
||||||
@@ -94,8 +98,8 @@ rtems_task test_init(
|
|||||||
|
|
||||||
priority--;
|
priority--;
|
||||||
|
|
||||||
if ( index==OPERATION_COUNT ) task_entry = High_task;
|
if ( index==operation_count-1 ) task_entry = High_task;
|
||||||
else task_entry = Low_tasks;
|
else task_entry = Low_tasks;
|
||||||
|
|
||||||
status = rtems_task_start( task_id, task_entry, 0 );
|
status = rtems_task_start( task_id, task_entry, 0 );
|
||||||
directive_failed( status, "rtems_task_start LOOP" );
|
directive_failed( status, "rtems_task_start LOOP" );
|
||||||
@@ -109,19 +113,19 @@ rtems_task High_task(
|
|||||||
uint32_t index;
|
uint32_t index;
|
||||||
|
|
||||||
benchmark_timer_initialize();
|
benchmark_timer_initialize();
|
||||||
for ( index=1 ; index <= OPERATION_COUNT ; index++ )
|
for ( index=1 ; index < operation_count ; index++ )
|
||||||
(void) benchmark_timer_empty_function();
|
(void) benchmark_timer_empty_function();
|
||||||
overhead = benchmark_timer_read();
|
overhead = benchmark_timer_read();
|
||||||
|
|
||||||
benchmark_timer_initialize();
|
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 );
|
(void) rtems_message_queue_send( Queue_id, Buffer, MESSAGE_SIZE );
|
||||||
end_time = benchmark_timer_read();
|
end_time = benchmark_timer_read();
|
||||||
|
|
||||||
put_time(
|
put_time(
|
||||||
"rtems_message_queue_send: task readied -- returns to caller",
|
"rtems_message_queue_send: task readied -- returns to caller",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count - 1,
|
||||||
overhead,
|
overhead,
|
||||||
CALLING_OVERHEAD_MESSAGE_QUEUE_SEND
|
CALLING_OVERHEAD_MESSAGE_QUEUE_SEND
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-2007.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -31,6 +30,8 @@ rtems_task High_task(
|
|||||||
|
|
||||||
#define MESSAGE_SIZE (sizeof(long) * 4)
|
#define MESSAGE_SIZE (sizeof(long) * 4)
|
||||||
|
|
||||||
|
int operation_count = OPERATION_COUNT;
|
||||||
|
|
||||||
void Init(
|
void Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
@@ -44,7 +45,7 @@ void Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
1,
|
1,
|
||||||
251,
|
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -63,7 +64,7 @@ rtems_task test_init(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
rtems_task_entry task_entry;
|
rtems_task_entry task_entry;
|
||||||
rtems_task_priority priority;
|
rtems_task_priority priority;
|
||||||
rtems_id task_id;
|
rtems_id task_id;
|
||||||
@@ -83,9 +84,12 @@ rtems_task test_init(
|
|||||||
);
|
);
|
||||||
directive_failed( status, "rtems_message_queue_create" );
|
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(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
priority,
|
priority,
|
||||||
@@ -98,7 +102,7 @@ rtems_task test_init(
|
|||||||
|
|
||||||
priority--;
|
priority--;
|
||||||
|
|
||||||
if ( index==OPERATION_COUNT-1 ) task_entry = High_task;
|
if ( index==operation_count-1 ) task_entry = High_task;
|
||||||
else task_entry = Middle_tasks;
|
else task_entry = Middle_tasks;
|
||||||
|
|
||||||
status = rtems_task_start( task_id, task_entry, 0 );
|
status = rtems_task_start( task_id, task_entry, 0 );
|
||||||
@@ -145,7 +149,7 @@ rtems_task High_task(
|
|||||||
put_time(
|
put_time(
|
||||||
"rtems_message_queue_urgent: task readied -- preempts caller",
|
"rtems_message_queue_urgent: task readied -- preempts caller",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count,
|
||||||
0,
|
0,
|
||||||
CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT
|
CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-2007.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -31,6 +30,8 @@ rtems_task Low_tasks(
|
|||||||
|
|
||||||
#define MESSAGE_SIZE (sizeof(long) * 4)
|
#define MESSAGE_SIZE (sizeof(long) * 4)
|
||||||
|
|
||||||
|
int operation_count = OPERATION_COUNT;
|
||||||
|
|
||||||
rtems_task Init(
|
rtems_task Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
@@ -44,7 +45,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
1,
|
1,
|
||||||
251,
|
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -79,9 +80,11 @@ rtems_task test_init(
|
|||||||
);
|
);
|
||||||
directive_failed( status, "rtems_message_queue_create" );
|
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(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
priority,
|
priority,
|
||||||
@@ -94,8 +97,8 @@ rtems_task test_init(
|
|||||||
|
|
||||||
priority--;
|
priority--;
|
||||||
|
|
||||||
if ( index==OPERATION_COUNT ) task_entry = High_task;
|
if ( index==operation_count-1 ) task_entry = High_task;
|
||||||
else task_entry = Low_tasks;
|
else task_entry = Low_tasks;
|
||||||
|
|
||||||
status = rtems_task_start( task_id, task_entry, 0 );
|
status = rtems_task_start( task_id, task_entry, 0 );
|
||||||
directive_failed( status, "rtems_task_start LOOP" );
|
directive_failed( status, "rtems_task_start LOOP" );
|
||||||
@@ -109,19 +112,19 @@ rtems_task High_task(
|
|||||||
uint32_t index;
|
uint32_t index;
|
||||||
|
|
||||||
benchmark_timer_initialize();
|
benchmark_timer_initialize();
|
||||||
for ( index=1 ; index <= OPERATION_COUNT ; index++ )
|
for ( index=1 ; index < operation_count ; index++ )
|
||||||
(void) benchmark_timer_empty_function();
|
(void) benchmark_timer_empty_function();
|
||||||
overhead = benchmark_timer_read();
|
overhead = benchmark_timer_read();
|
||||||
|
|
||||||
benchmark_timer_initialize();
|
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 );
|
(void) rtems_message_queue_urgent( Queue_id, Buffer, MESSAGE_SIZE );
|
||||||
end_time = benchmark_timer_read();
|
end_time = benchmark_timer_read();
|
||||||
|
|
||||||
put_time(
|
put_time(
|
||||||
"rtems_message_queue_urgent: task readied -- returns to caller",
|
"rtems_message_queue_urgent: task readied -- returns to caller",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count,
|
||||||
overhead,
|
overhead,
|
||||||
CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT
|
CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -27,6 +26,8 @@ rtems_task High_task(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
);
|
);
|
||||||
|
|
||||||
|
int operation_count = OPERATION_COUNT;
|
||||||
|
|
||||||
rtems_task Init(
|
rtems_task Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
@@ -40,7 +41,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'E', 'S', 'T' ),
|
rtems_build_name( 'T', 'E', 'S', 'T' ),
|
||||||
251,
|
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -61,7 +62,7 @@ rtems_task test_init(
|
|||||||
{
|
{
|
||||||
rtems_task_priority priority;
|
rtems_task_priority priority;
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
rtems_task_entry task_entry;
|
rtems_task_entry task_entry;
|
||||||
|
|
||||||
/* As each task is started, it preempts this task and
|
/* 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.
|
* 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(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'M', 'I', 'D', ' ' ),
|
rtems_build_name( 'M', 'I', 'D', ' ' ),
|
||||||
priority,
|
priority,
|
||||||
@@ -82,8 +85,8 @@ rtems_task test_init(
|
|||||||
);
|
);
|
||||||
directive_failed( status, "rtems_task_create LOOP" );
|
directive_failed( status, "rtems_task_create LOOP" );
|
||||||
|
|
||||||
if ( index == OPERATION_COUNT ) task_entry = High_task;
|
if ( index == operation_count-1 ) task_entry = High_task;
|
||||||
else task_entry = Middle_tasks;
|
else task_entry = Middle_tasks;
|
||||||
|
|
||||||
status = rtems_task_start( Task_id[ index ], task_entry, 0 );
|
status = rtems_task_start( Task_id[ index ], task_entry, 0 );
|
||||||
directive_failed( status, "rtems_task_start LOOP" );
|
directive_failed( status, "rtems_task_start LOOP" );
|
||||||
@@ -137,7 +140,7 @@ rtems_task High_task(
|
|||||||
put_time(
|
put_time(
|
||||||
"rtems_event_send: task readied -- preempts caller",
|
"rtems_event_send: task readied -- preempts caller",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count - 1,
|
||||||
0,
|
0,
|
||||||
CALLING_OVERHEAD_EVENT_SEND
|
CALLING_OVERHEAD_EVENT_SEND
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -28,6 +27,8 @@ rtems_task Last_task(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
);
|
);
|
||||||
|
|
||||||
|
int operation_count = OPERATION_COUNT;
|
||||||
|
|
||||||
rtems_task Init(
|
rtems_task Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
@@ -40,9 +41,11 @@ rtems_task Init(
|
|||||||
|
|
||||||
puts( "\n\n*** TIME TEST 17 ***" );
|
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(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
Task_priority,
|
Task_priority,
|
||||||
@@ -53,9 +56,9 @@ rtems_task Init(
|
|||||||
);
|
);
|
||||||
directive_failed( status, "rtems_task_create loop" );
|
directive_failed( status, "rtems_task_create loop" );
|
||||||
|
|
||||||
if ( index == OPERATION_COUNT ) task_entry = Last_task;
|
if ( index == operation_count-1 ) task_entry = Last_task;
|
||||||
else if ( index == 0 ) task_entry = First_task;
|
else if ( index == 0 ) task_entry = First_task;
|
||||||
else task_entry = Middle_tasks;
|
else task_entry = Middle_tasks;
|
||||||
|
|
||||||
status = rtems_task_start( Task_id[ index ], task_entry, 0 );
|
status = rtems_task_start( Task_id[ index ], task_entry, 0 );
|
||||||
directive_failed( status, "rtems_task_start loop" );
|
directive_failed( status, "rtems_task_start loop" );
|
||||||
@@ -109,14 +112,14 @@ rtems_task Last_task(
|
|||||||
end_time = benchmark_timer_read();
|
end_time = benchmark_timer_read();
|
||||||
|
|
||||||
benchmark_timer_initialize();
|
benchmark_timer_initialize();
|
||||||
for ( index=1 ; index <= OPERATION_COUNT ; index++ )
|
for ( index=1 ; index < operation_count ; index++ )
|
||||||
(void) benchmark_timer_empty_function();
|
(void) benchmark_timer_empty_function();
|
||||||
overhead = benchmark_timer_read();
|
overhead = benchmark_timer_read();
|
||||||
|
|
||||||
put_time(
|
put_time(
|
||||||
"rtems_task_set_priority: preempts caller",
|
"rtems_task_set_priority: preempts caller",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count - 1,
|
||||||
overhead,
|
overhead,
|
||||||
CALLING_OVERHEAD_TASK_SET_PRIORITY
|
CALLING_OVERHEAD_TASK_SET_PRIORITY
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -51,13 +50,13 @@ void test_init()
|
|||||||
{
|
{
|
||||||
rtems_id id;
|
rtems_id id;
|
||||||
rtems_task_entry task_entry;
|
rtems_task_entry task_entry;
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
|
|
||||||
for ( index = 0 ; index <= OPERATION_COUNT ; index++ ) {
|
for ( index = 0 ; index <= OPERATION_COUNT ; index++ ) {
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
128,
|
(RTEMS_MAXIMUM_PRIORITY / 2) + 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -45,7 +44,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
128,
|
(RTEMS_MAXIMUM_PRIORITY / 2) + 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -58,7 +57,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
127,
|
(RTEMS_MAXIMUM_PRIORITY / 2),
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -71,7 +70,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
126,
|
(RTEMS_MAXIMUM_PRIORITY / 2) - 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -58,7 +57,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', '1' ),
|
rtems_build_name( 'T', 'I', 'M', '1' ),
|
||||||
128,
|
(RTEMS_MAXIMUM_PRIORITY / 2) + 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -71,7 +70,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', '2' ),
|
rtems_build_name( 'T', 'I', 'M', '2' ),
|
||||||
129,
|
(RTEMS_MAXIMUM_PRIORITY / 2) + 2,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -310,7 +309,8 @@ rtems_task Task_1(
|
|||||||
);
|
);
|
||||||
directive_failed( status, "rtems_task_mode" );
|
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" );
|
directive_failed( status, "rtems_task_set_priority" );
|
||||||
|
|
||||||
status = rtems_region_get_segment(
|
status = rtems_region_get_segment(
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -33,7 +32,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
250,
|
RTEMS_MAXIMUM_PRIORITY - 5,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -61,7 +60,7 @@ rtems_task Task_1(
|
|||||||
for( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
|
for( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
|
||||||
status = rtems_task_create (
|
status = rtems_task_create (
|
||||||
index,
|
index,
|
||||||
254,
|
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -34,6 +33,7 @@ rtems_task High_task(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
);
|
);
|
||||||
|
|
||||||
|
int operation_count = OPERATION_COUNT;
|
||||||
|
|
||||||
rtems_task Init(
|
rtems_task Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
@@ -55,9 +55,11 @@ rtems_task Init(
|
|||||||
(void) benchmark_timer_empty_function();
|
(void) benchmark_timer_empty_function();
|
||||||
overhead = benchmark_timer_read();
|
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(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
priority,
|
priority,
|
||||||
@@ -69,7 +71,7 @@ rtems_task Init(
|
|||||||
directive_failed( status, "rtems_task_create LOOP" );
|
directive_failed( status, "rtems_task_create LOOP" );
|
||||||
|
|
||||||
if ( index == 1 ) task_entry = High_task;
|
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;
|
else task_entry = Middle_tasks;
|
||||||
|
|
||||||
status = rtems_task_start( id, task_entry, 0 );
|
status = rtems_task_start( id, task_entry, 0 );
|
||||||
@@ -291,8 +293,8 @@ rtems_task Low_task(
|
|||||||
put_time(
|
put_time(
|
||||||
"rtems_task_wake_when",
|
"rtems_task_wake_when",
|
||||||
end_time,
|
end_time,
|
||||||
OPERATION_COUNT,
|
operation_count,
|
||||||
0,
|
0,
|
||||||
CALLING_OVERHEAD_TASK_WAKE_WHEN
|
CALLING_OVERHEAD_TASK_WAKE_WHEN
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -37,7 +36,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'H', 'I', 'G', 'H' ),
|
rtems_build_name( 'H', 'I', 'G', 'H' ),
|
||||||
10,
|
1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -51,7 +50,7 @@ rtems_task Init(
|
|||||||
for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
|
for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'R', 'E', 'S', 'T' ),
|
rtems_build_name( 'R', 'E', 'S', 'T' ),
|
||||||
128,
|
(RTEMS_MAXIMUM_PRIORITY / 2) + 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -46,7 +45,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'L', 'O', 'W', ' ' ),
|
rtems_build_name( 'L', 'O', 'W', ' ' ),
|
||||||
254,
|
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -60,7 +59,7 @@ rtems_task Init(
|
|||||||
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
|
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
128,
|
(RTEMS_MAXIMUM_PRIORITY / 2) + 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -95,9 +94,10 @@ rtems_task Init(
|
|||||||
|
|
||||||
puts( "\n\n*** TIME TEST 26 ***" );
|
puts( "\n\n*** TIME TEST 26 ***" );
|
||||||
|
|
||||||
|
#define FP1_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 3) /* 201, */
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'F', 'P', '1', ' ' ),
|
rtems_build_name( 'F', 'P', '1', ' ' ),
|
||||||
201,
|
FP1_PRIORITY,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_FLOATING_POINT,
|
RTEMS_FLOATING_POINT,
|
||||||
@@ -108,9 +108,10 @@ rtems_task Init(
|
|||||||
status = rtems_task_start( task_id, Floating_point_task_1, 0 );
|
status = rtems_task_start( task_id, Floating_point_task_1, 0 );
|
||||||
directive_failed( status, "rtems_task_start of FP1" );
|
directive_failed( status, "rtems_task_start of FP1" );
|
||||||
|
|
||||||
|
#define FP2_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 2) /* 202, */
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'F', 'P', '2', ' ' ),
|
rtems_build_name( 'F', 'P', '2', ' ' ),
|
||||||
202,
|
FP2_PRIORITY,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_FLOATING_POINT,
|
RTEMS_FLOATING_POINT,
|
||||||
@@ -121,9 +122,10 @@ rtems_task Init(
|
|||||||
status = rtems_task_start( task_id, Floating_point_task_2, 0 );
|
status = rtems_task_start( task_id, Floating_point_task_2, 0 );
|
||||||
directive_failed( status, "rtems_task_start of FP2" );
|
directive_failed( status, "rtems_task_start of FP2" );
|
||||||
|
|
||||||
|
#define LOW_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 4) /* 200, */
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'L', 'O', 'W', ' ' ),
|
rtems_build_name( 'L', 'O', 'W', ' ' ),
|
||||||
200,
|
LOW_PRIORITY,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -134,9 +136,10 @@ rtems_task Init(
|
|||||||
status = rtems_task_start( task_id, Low_task, 0 );
|
status = rtems_task_start( task_id, Low_task, 0 );
|
||||||
directive_failed( status, "rtems_task_start of LOW" );
|
directive_failed( status, "rtems_task_start of LOW" );
|
||||||
|
|
||||||
|
#define MIDDLE_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 5) /* 128, */
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'M', 'I', 'D', ' ' ),
|
rtems_build_name( 'M', 'I', 'D', ' ' ),
|
||||||
128,
|
MIDDLE_PRIORITY,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -172,7 +175,7 @@ rtems_task Init(
|
|||||||
for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
|
for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) {
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'N', 'U', 'L', 'L' ),
|
rtems_build_name( 'N', 'U', 'L', 'L' ),
|
||||||
254,
|
RTEMS_MAXIMUM_PRIORITY - 1, /* 254, */
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -235,7 +238,7 @@ rtems_task Middle_task(
|
|||||||
Middle_tcb = _Thread_Executing;
|
Middle_tcb = _Thread_Executing;
|
||||||
|
|
||||||
_Thread_Executing =
|
_Thread_Executing =
|
||||||
(Thread_Control *) _Thread_Ready_chain[200].first;
|
(Thread_Control *) _Thread_Ready_chain[LOW_PRIORITY].first;
|
||||||
|
|
||||||
/* do not force context switch */
|
/* do not force context switch */
|
||||||
|
|
||||||
@@ -272,7 +275,7 @@ rtems_task Low_task(
|
|||||||
context_switch_another_task_time = benchmark_timer_read();
|
context_switch_another_task_time = benchmark_timer_read();
|
||||||
|
|
||||||
_Thread_Executing =
|
_Thread_Executing =
|
||||||
(Thread_Control *) _Thread_Ready_chain[201].first;
|
(Thread_Control *) _Thread_Ready_chain[FP1_PRIORITY].first;
|
||||||
|
|
||||||
/* do not force context switch */
|
/* do not force context switch */
|
||||||
|
|
||||||
@@ -299,7 +302,7 @@ rtems_task Floating_point_task_1(
|
|||||||
executing = _Thread_Executing;
|
executing = _Thread_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 */
|
/* do not force context switch */
|
||||||
|
|
||||||
@@ -322,7 +325,7 @@ rtems_task Floating_point_task_1(
|
|||||||
executing = _Thread_Executing;
|
executing = _Thread_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 */
|
/* do not force context switch */
|
||||||
|
|
||||||
@@ -351,7 +354,7 @@ rtems_task Floating_point_task_2(
|
|||||||
executing = _Thread_Executing;
|
executing = _Thread_Executing;
|
||||||
|
|
||||||
_Thread_Executing =
|
_Thread_Executing =
|
||||||
(Thread_Control *) _Thread_Ready_chain[201].first;
|
(Thread_Control *) _Thread_Ready_chain[FP1_PRIORITY].first;
|
||||||
|
|
||||||
FP_LOAD( 1.0 );
|
FP_LOAD( 1.0 );
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -52,9 +51,10 @@ rtems_task Init(
|
|||||||
|
|
||||||
puts( "\n\n*** TIME TEST 27 ***" );
|
puts( "\n\n*** TIME TEST 27 ***" );
|
||||||
|
|
||||||
|
#define LOW_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 1)
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'A', '1', ' ' ),
|
rtems_build_name( 'T', 'A', '1', ' ' ),
|
||||||
254,
|
LOW_PRIORITY,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -67,7 +67,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'A', '2', ' ' ),
|
rtems_build_name( 'T', 'A', '2', ' ' ),
|
||||||
254,
|
LOW_PRIORITY,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -170,7 +170,7 @@ rtems_task Task_1(
|
|||||||
|
|
||||||
_Thread_Dispatch_disable_level = 0;
|
_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;
|
_Context_Switch_necessary = 1;
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ rtems_task Task_2(
|
|||||||
|
|
||||||
_Thread_Dispatch_disable_level = 0;
|
_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;
|
_Context_Switch_necessary = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -34,7 +33,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
rtems_build_name( 'T', 'I', 'M', 'E' ),
|
||||||
128,
|
(RTEMS_MAXIMUM_PRIORITY / 2) + 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -117,10 +116,11 @@ rtems_task Init(
|
|||||||
CALLING_OVERHEAD_RATE_MONOTONIC_DELETE
|
CALLING_OVERHEAD_RATE_MONOTONIC_DELETE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#define LOOP_TASK_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2) + 1)
|
||||||
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
|
for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'E', 'S', 'T' ),
|
rtems_build_name( 'T', 'E', 'S', 'T' ),
|
||||||
128,
|
LOOP_TASK_PRIORITY,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
@@ -132,9 +132,10 @@ rtems_task Init(
|
|||||||
directive_failed( status, "rtems_task_start LOOP" );
|
directive_failed( status, "rtems_task_start LOOP" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define MIDDLE_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 2)
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'L', 'O', 'W', ' ' ),
|
rtems_build_name( 'L', 'O', 'W', ' ' ),
|
||||||
200,
|
MIDDLE_PRIORITY,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
*
|
* COPYRIGHT (c) 1989-2008.
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -35,7 +34,7 @@ rtems_task Init(
|
|||||||
|
|
||||||
status = rtems_task_create(
|
status = rtems_task_create(
|
||||||
rtems_build_name( 'T', 'A', '1', ' ' ),
|
rtems_build_name( 'T', 'A', '1', ' ' ),
|
||||||
254,
|
RTEMS_MAXIMUM_PRIORITY - 1,
|
||||||
RTEMS_MINIMUM_STACK_SIZE,
|
RTEMS_MINIMUM_STACK_SIZE,
|
||||||
RTEMS_DEFAULT_MODES,
|
RTEMS_DEFAULT_MODES,
|
||||||
RTEMS_DEFAULT_ATTRIBUTES,
|
RTEMS_DEFAULT_ATTRIBUTES,
|
||||||
|
|||||||
Reference in New Issue
Block a user