mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-02-06 13:37:19 +08:00
testsuites/mptests: reformat with clang-format
Updates #3860. Updates #5358.
This commit is contained in:
committed by
Kinsey Moore
parent
834a0350b5
commit
c9101cef19
@@ -45,9 +45,7 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Init( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
@@ -60,8 +58,11 @@ rtems_task Init(
|
||||
rtems_object_get_local_node()
|
||||
);
|
||||
|
||||
if ( rtems_object_get_local_node() != 1 ) c = 'S';
|
||||
else c = 'M';
|
||||
if ( rtems_object_get_local_node() != 1 ) {
|
||||
c = 'S';
|
||||
} else {
|
||||
c = 'M';
|
||||
}
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( c, 'A', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( c, 'A', '2', ' ' );
|
||||
|
||||
@@ -34,13 +34,9 @@
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Test_task( rtems_task_argument argument );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
@@ -49,16 +45,16 @@ rtems_task Test_task(
|
||||
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 4
|
||||
#define CONFIGURE_MAXIMUM_TASKS 4
|
||||
|
||||
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_GLOBAL
|
||||
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_GLOBAL
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
|
||||
/* end of include file */
|
||||
|
||||
@@ -46,9 +46,7 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Test_task( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
@@ -65,7 +63,9 @@ rtems_task Test_task(
|
||||
put_name( Task_name[ task_number( tid ) ], FALSE );
|
||||
print_time( " - rtems_clock_get_tod - ", &time, "\n" );
|
||||
|
||||
status = rtems_task_wake_after( task_number( tid ) * 1 * rtems_clock_get_ticks_per_second() );
|
||||
status = rtems_task_wake_after(
|
||||
task_number( tid ) * 1 * rtems_clock_get_ticks_per_second()
|
||||
);
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
status = rtems_clock_get_tod( &time );
|
||||
@@ -73,23 +73,25 @@ rtems_task Test_task(
|
||||
put_name( Task_name[ task_number( tid ) ], FALSE );
|
||||
print_time( " - rtems_clock_get_tod - ", &time, "\n" );
|
||||
|
||||
if ( task_number(tid) == 1 ) { /* TASK 1 */
|
||||
if ( task_number( tid ) == 1 ) { /* TASK 1 */
|
||||
put_name( Task_name[ 1 ], FALSE );
|
||||
printf( " - deleting self\n" );
|
||||
rtems_task_exit();
|
||||
}
|
||||
else if ( task_number(tid) == 2 ) { /* TASK 2 */
|
||||
} else if ( task_number( tid ) == 2 ) { /* TASK 2 */
|
||||
put_name( Task_name[ 2 ], FALSE );
|
||||
printf( " - waiting to be deleted by " );
|
||||
put_name( Task_name[ 3 ], TRUE );
|
||||
while ( FOREVER );
|
||||
}
|
||||
else { /* TASK 3 */
|
||||
} else { /* TASK 3 */
|
||||
put_name( Task_name[ 3 ], FALSE );
|
||||
printf( " - getting TID of " );
|
||||
put_name( Task_name[ 2 ], TRUE );
|
||||
do {
|
||||
status = rtems_task_ident( Task_name[ 2 ], RTEMS_SEARCH_ALL_NODES, &tid );
|
||||
status = rtems_task_ident(
|
||||
Task_name[ 2 ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&tid
|
||||
);
|
||||
} while ( status != RTEMS_SUCCESSFUL );
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
@@ -100,6 +102,6 @@ rtems_task Test_task(
|
||||
directive_failed( status, "rtems_task_delete of Task 2" );
|
||||
|
||||
puts( "*** END OF TEST 1 ***" );
|
||||
rtems_test_exit(0);
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
rtems_timer_service_routine Delayed_send_event(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
)
|
||||
{
|
||||
(void) ignored_id;
|
||||
@@ -52,6 +52,8 @@ rtems_timer_service_routine Delayed_send_event(
|
||||
rtems_status_code status;
|
||||
|
||||
status = rtems_event_send( Task_id[ 1 ], RTEMS_EVENT_16 );
|
||||
if ( status ) printk( "Delayed_send_event failed %d\n", status );
|
||||
if ( status ) {
|
||||
printk( "Delayed_send_event failed %d\n", status );
|
||||
}
|
||||
// directive_failed_with_level( status, "rtems_event_send", 1 );
|
||||
}
|
||||
|
||||
@@ -45,9 +45,7 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Init( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
|
||||
@@ -34,17 +34,13 @@
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Test_task( rtems_task_argument argument );
|
||||
|
||||
rtems_timer_service_routine Delayed_send_event(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
);
|
||||
|
||||
/* configuration information */
|
||||
@@ -54,8 +50,8 @@ rtems_timer_service_routine Delayed_send_event(
|
||||
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
@@ -63,13 +59,13 @@ rtems_timer_service_routine Delayed_send_event(
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
|
||||
TEST_EXTERN rtems_id Timer_id[ 2 ]; /* array of timer ids */
|
||||
TEST_EXTERN rtems_name Timer_name[ 2 ]; /* array of timer names */
|
||||
TEST_EXTERN rtems_id Timer_id[ 2 ]; /* array of timer ids */
|
||||
TEST_EXTERN rtems_name Timer_name[ 2 ]; /* array of timer names */
|
||||
|
||||
TEST_EXTERN uint32_t remote_node;
|
||||
TEST_EXTERN rtems_id remote_tid;
|
||||
TEST_EXTERN uint32_t remote_node;
|
||||
TEST_EXTERN rtems_id remote_tid;
|
||||
|
||||
/* end of include file */
|
||||
|
||||
@@ -32,17 +32,13 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
static void Test_Task_Support(
|
||||
uint32_t node
|
||||
)
|
||||
static void Test_Task_Support( uint32_t node )
|
||||
{
|
||||
rtems_event_set events;
|
||||
rtems_status_code status;
|
||||
|
||||
if ( rtems_object_get_local_node() == node ) {
|
||||
|
||||
for ( ; ; ) {
|
||||
|
||||
for ( ;; ) {
|
||||
status = rtems_event_receive(
|
||||
RTEMS_EVENT_16,
|
||||
RTEMS_NO_WAIT,
|
||||
@@ -50,10 +46,15 @@ static void Test_Task_Support(
|
||||
&events
|
||||
);
|
||||
|
||||
if ( status == RTEMS_SUCCESSFUL )
|
||||
if ( status == RTEMS_SUCCESSFUL ) {
|
||||
break;
|
||||
}
|
||||
|
||||
fatal_directive_status(status, RTEMS_UNSATISFIED, "rtems_event_receive");
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_UNSATISFIED,
|
||||
"rtems_event_receive"
|
||||
);
|
||||
|
||||
status = rtems_task_wake_after( 2 * rtems_clock_get_ticks_per_second() );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
@@ -70,14 +71,12 @@ static void Test_Task_Support(
|
||||
put_name( Task_name[ node ], FALSE );
|
||||
puts( " - Resuming remote task" );
|
||||
|
||||
status = rtems_task_resume( remote_tid ) ;
|
||||
status = rtems_task_resume( remote_tid );
|
||||
directive_failed( status, "rtems_task_resume" );
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
for ( ; ; ) {
|
||||
} else {
|
||||
for ( ;; ) {
|
||||
status = rtems_event_receive(
|
||||
RTEMS_EVENT_16,
|
||||
RTEMS_NO_WAIT,
|
||||
@@ -85,10 +84,15 @@ static void Test_Task_Support(
|
||||
&events
|
||||
);
|
||||
|
||||
if ( status == RTEMS_SUCCESSFUL )
|
||||
if ( status == RTEMS_SUCCESSFUL ) {
|
||||
break;
|
||||
}
|
||||
|
||||
fatal_directive_status(status, RTEMS_UNSATISFIED, "rtems_event_receive");
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_UNSATISFIED,
|
||||
"rtems_event_receive"
|
||||
);
|
||||
|
||||
put_name( Task_name[ remote_node ], FALSE );
|
||||
puts( " - have I been suspended???" );
|
||||
@@ -96,9 +100,7 @@ static void Test_Task_Support(
|
||||
status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() / 2 );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
@@ -106,9 +108,7 @@ static void Test_Task_Support(
|
||||
* Test_task
|
||||
*/
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Test_task( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
@@ -119,16 +119,16 @@ rtems_task Test_task(
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
puts( "Getting TID of remote task" );
|
||||
remote_node = (rtems_object_get_local_node() == 1) ? 2 : 1;
|
||||
remote_node = ( rtems_object_get_local_node() == 1 ) ? 2 : 1;
|
||||
printf( "Remote task's name is : " );
|
||||
put_name( Task_name[ remote_node ], TRUE );
|
||||
|
||||
do {
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
} while ( status != RTEMS_SUCCESSFUL );
|
||||
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
@@ -45,9 +45,7 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Init( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
|
||||
@@ -34,13 +34,9 @@
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Test_task( rtems_task_argument argument );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
@@ -49,8 +45,8 @@ rtems_task Test_task(
|
||||
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
@@ -58,7 +54,7 @@ rtems_task Test_task(
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
|
||||
/* end of include file */
|
||||
|
||||
@@ -41,15 +41,13 @@
|
||||
#include "system.h"
|
||||
#include "tmacros.h"
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Test_task( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
rtems_id tid;
|
||||
rtems_status_code status;
|
||||
uint32_t remote_node;
|
||||
uint32_t remote_node;
|
||||
rtems_id remote_tid;
|
||||
rtems_task_priority previous_priority;
|
||||
rtems_task_priority previous_priority_1;
|
||||
@@ -58,16 +56,16 @@ rtems_task Test_task(
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
puts( "Getting TID of remote task" );
|
||||
remote_node = (rtems_object_get_local_node() == 1) ? 2 : 1;
|
||||
remote_node = ( rtems_object_get_local_node() == 1 ) ? 2 : 1;
|
||||
puts_nocr( "Remote task's name is : " );
|
||||
put_name( Task_name[ remote_node ], TRUE );
|
||||
|
||||
do {
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
} while ( status != RTEMS_SUCCESSFUL );
|
||||
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
@@ -81,7 +79,8 @@ rtems_task Test_task(
|
||||
|
||||
if ( previous_priority != remote_node ) {
|
||||
printf(
|
||||
"Remote priority (0x%" PRIxrtems_task_priority ") does not match remote node (0x%" PRIx32 ")!!!\n",
|
||||
"Remote priority (0x%" PRIxrtems_task_priority
|
||||
") does not match remote node (0x%" PRIx32 ")!!!\n",
|
||||
previous_priority,
|
||||
remote_node
|
||||
);
|
||||
|
||||
@@ -42,17 +42,16 @@
|
||||
#include "system.h"
|
||||
#include "tmacros.h"
|
||||
|
||||
rtems_asr Process_asr(
|
||||
rtems_signal_set signal
|
||||
)
|
||||
rtems_asr Process_asr( rtems_signal_set signal )
|
||||
{
|
||||
if ( signal != expected_signal ) {
|
||||
printf(
|
||||
"ERROR: I was expecting signal 0x%.8" PRIxrtems_signal_set " got 0x%.8" PRIxrtems_signal_set "\n",
|
||||
expected_signal,
|
||||
signal
|
||||
);
|
||||
rtems_fatal_error_occurred( 0xf0000 );
|
||||
printf(
|
||||
"ERROR: I was expecting signal 0x%.8" PRIxrtems_signal_set
|
||||
" got 0x%.8" PRIxrtems_signal_set "\n",
|
||||
expected_signal,
|
||||
signal
|
||||
);
|
||||
rtems_fatal_error_occurred( 0xf0000 );
|
||||
}
|
||||
signal_caught = 1;
|
||||
}
|
||||
|
||||
@@ -45,9 +45,7 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Init( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
@@ -63,7 +61,7 @@ rtems_task Init(
|
||||
|
||||
puts( "Creating Test_task (Global)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[rtems_object_get_local_node()],
|
||||
Task_name[ rtems_object_get_local_node() ],
|
||||
1,
|
||||
RTEMS_MINIMUM_STACK_SIZE * 2,
|
||||
RTEMS_TIMESLICE,
|
||||
|
||||
@@ -34,13 +34,9 @@
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Test_task( rtems_task_argument argument );
|
||||
|
||||
rtems_asr Process_asr( rtems_signal_set );
|
||||
|
||||
@@ -51,30 +47,30 @@ rtems_asr Process_asr( rtems_signal_set );
|
||||
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE)
|
||||
#define CONFIGURE_EXTRA_TASK_STACKS ( 1 * RTEMS_MINIMUM_STACK_SIZE )
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
|
||||
TEST_EXTERN rtems_id Timer_id[ 2 ]; /* array of timer ids */
|
||||
TEST_EXTERN rtems_name Timer_name[ 2 ]; /* array of timer names */
|
||||
TEST_EXTERN rtems_id Timer_id[ 2 ]; /* array of timer ids */
|
||||
TEST_EXTERN rtems_name Timer_name[ 2 ]; /* array of timer names */
|
||||
|
||||
TEST_EXTERN volatile bool Stop_Test;
|
||||
TEST_EXTERN volatile bool Stop_Test;
|
||||
|
||||
TEST_EXTERN uint32_t remote_node;
|
||||
TEST_EXTERN rtems_id remote_tid;
|
||||
TEST_EXTERN rtems_signal_set remote_signal;
|
||||
TEST_EXTERN rtems_signal_set expected_signal;
|
||||
TEST_EXTERN volatile uint32_t signal_count;
|
||||
TEST_EXTERN volatile uint32_t signal_caught;
|
||||
TEST_EXTERN uint32_t remote_node;
|
||||
TEST_EXTERN rtems_id remote_tid;
|
||||
TEST_EXTERN rtems_signal_set remote_signal;
|
||||
TEST_EXTERN rtems_signal_set expected_signal;
|
||||
TEST_EXTERN volatile uint32_t signal_count;
|
||||
TEST_EXTERN volatile uint32_t signal_caught;
|
||||
|
||||
/* end of include file */
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
#define SIGNALS_PER_DOT 15
|
||||
|
||||
static rtems_timer_service_routine Stop_Test_TSR(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
)
|
||||
{
|
||||
(void) ignored_id;
|
||||
@@ -57,9 +57,7 @@ static rtems_timer_service_routine Stop_Test_TSR(
|
||||
Stop_Test = true;
|
||||
}
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Test_task( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
@@ -68,32 +66,31 @@ rtems_task Test_task(
|
||||
Stop_Test = false;
|
||||
|
||||
signal_caught = 0;
|
||||
signal_count = 0;
|
||||
signal_count = 0;
|
||||
|
||||
puts( "rtems_signal_catch: initializing signal catcher" );
|
||||
status = rtems_signal_catch( Process_asr, RTEMS_NO_ASR|RTEMS_NO_PREEMPT );
|
||||
status = rtems_signal_catch( Process_asr, RTEMS_NO_ASR | RTEMS_NO_PREEMPT );
|
||||
directive_failed( status, "rtems_signal_catch" );
|
||||
|
||||
if (rtems_object_get_local_node() == 1) {
|
||||
remote_node = 2;
|
||||
remote_signal = RTEMS_SIGNAL_18;
|
||||
expected_signal = RTEMS_SIGNAL_17;
|
||||
}
|
||||
else {
|
||||
remote_node = 1;
|
||||
remote_signal = RTEMS_SIGNAL_17;
|
||||
expected_signal = RTEMS_SIGNAL_18;
|
||||
if ( rtems_object_get_local_node() == 1 ) {
|
||||
remote_node = 2;
|
||||
remote_signal = RTEMS_SIGNAL_18;
|
||||
expected_signal = RTEMS_SIGNAL_17;
|
||||
} else {
|
||||
remote_node = 1;
|
||||
remote_signal = RTEMS_SIGNAL_17;
|
||||
expected_signal = RTEMS_SIGNAL_18;
|
||||
}
|
||||
puts_nocr( "Remote task's name is : " );
|
||||
put_name( Task_name[ remote_node ], TRUE );
|
||||
|
||||
puts( "Getting TID of remote task" );
|
||||
do {
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
} while ( status != RTEMS_SUCCESSFUL );
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
@@ -109,8 +106,9 @@ rtems_task Test_task(
|
||||
puts( "Sending signal to remote task" );
|
||||
do {
|
||||
status = rtems_signal_send( remote_tid, remote_signal );
|
||||
if ( status == RTEMS_NOT_DEFINED )
|
||||
if ( status == RTEMS_NOT_DEFINED ) {
|
||||
continue;
|
||||
}
|
||||
} while ( status != RTEMS_SUCCESSFUL );
|
||||
directive_failed( status, "rtems_signal_send" );
|
||||
}
|
||||
|
||||
@@ -45,9 +45,7 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Init( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
@@ -63,7 +61,7 @@ rtems_task Init(
|
||||
|
||||
puts( "Creating Test_task (Global)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[rtems_object_get_local_node()],
|
||||
Task_name[ rtems_object_get_local_node() ],
|
||||
1,
|
||||
RTEMS_MINIMUM_STACK_SIZE,
|
||||
RTEMS_DEFAULT_MODES,
|
||||
|
||||
@@ -34,13 +34,9 @@
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Test_task( rtems_task_argument argument );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
@@ -49,8 +45,8 @@ rtems_task Test_task(
|
||||
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
@@ -58,11 +54,11 @@ rtems_task Test_task(
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
|
||||
TEST_EXTERN rtems_id Timer_id[ 4 ]; /* array of timer ids */
|
||||
TEST_EXTERN rtems_name Timer_name[ 4 ]; /* array of timer names */
|
||||
TEST_EXTERN rtems_id Timer_id[ 4 ]; /* array of timer ids */
|
||||
TEST_EXTERN rtems_name Timer_name[ 4 ]; /* array of timer names */
|
||||
|
||||
TEST_EXTERN volatile bool Stop_Test;
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
* Stop_Test_TSR
|
||||
*/
|
||||
static rtems_timer_service_routine Stop_Test_TSR(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
)
|
||||
{
|
||||
(void) ignored_id;
|
||||
@@ -89,39 +89,38 @@ rtems_event_set Event_set_table[] = {
|
||||
/*
|
||||
* Test_task
|
||||
*/
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Test_task( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
rtems_status_code status;
|
||||
uint32_t count;
|
||||
uint32_t remote_node;
|
||||
uint32_t count;
|
||||
uint32_t remote_node;
|
||||
rtems_id remote_tid;
|
||||
rtems_event_set event_out;
|
||||
rtems_event_set event_for_this_iteration;
|
||||
|
||||
Stop_Test = false;
|
||||
|
||||
remote_node = (rtems_object_get_local_node() == 1) ? 2 : 1;
|
||||
remote_node = ( rtems_object_get_local_node() == 1 ) ? 2 : 1;
|
||||
puts_nocr( "Remote task's name is : " );
|
||||
put_name( Task_name[ remote_node ], TRUE );
|
||||
|
||||
puts( "Getting TID of remote task" );
|
||||
do {
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
status = rtems_task_ident(
|
||||
Task_name[ remote_node ],
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&remote_tid
|
||||
);
|
||||
} while ( status != RTEMS_SUCCESSFUL );
|
||||
directive_failed( status, "rtems_task_ident FAILED!!" );
|
||||
|
||||
if ( rtems_object_get_local_node() == 1 )
|
||||
if ( rtems_object_get_local_node() == 1 ) {
|
||||
puts( "Sending events to remote task" );
|
||||
else
|
||||
} else {
|
||||
puts( "Receiving events from remote task" );
|
||||
}
|
||||
|
||||
status = rtems_timer_fire_after(
|
||||
Timer_id[ 1 ],
|
||||
@@ -133,9 +132,10 @@ rtems_task Test_task(
|
||||
|
||||
count = 0;
|
||||
|
||||
for ( ; ; ) {
|
||||
if ( Stop_Test == true )
|
||||
for ( ;; ) {
|
||||
if ( Stop_Test == true ) {
|
||||
break;
|
||||
}
|
||||
|
||||
event_for_this_iteration = Event_set_table[ count % 32 ];
|
||||
|
||||
@@ -153,17 +153,20 @@ rtems_task Test_task(
|
||||
&event_out
|
||||
);
|
||||
if ( rtems_are_statuses_equal( status, RTEMS_TIMEOUT ) ) {
|
||||
if ( rtems_object_get_local_node() == 2 )
|
||||
if ( rtems_object_get_local_node() == 2 ) {
|
||||
puts( "\nCorrect behavior if the other node exitted." );
|
||||
else
|
||||
} else {
|
||||
puts( "\nERROR... node 1 died" );
|
||||
}
|
||||
break;
|
||||
} else
|
||||
} else {
|
||||
directive_failed( status, "rtems_event_receive" );
|
||||
}
|
||||
}
|
||||
|
||||
if ( (count % DOT_COUNT) == 0 )
|
||||
put_dot('.');
|
||||
if ( ( count % DOT_COUNT ) == 0 ) {
|
||||
put_dot( '.' );
|
||||
}
|
||||
|
||||
count++;
|
||||
}
|
||||
@@ -173,7 +176,7 @@ rtems_task Test_task(
|
||||
if ( rtems_object_get_local_node() == 2 ) {
|
||||
/* Flush events */
|
||||
puts( "Flushing RTEMS_EVENT_16" );
|
||||
(void) rtems_event_receive(RTEMS_EVENT_16, RTEMS_NO_WAIT, 0, &event_out);
|
||||
(void) rtems_event_receive( RTEMS_EVENT_16, RTEMS_NO_WAIT, 0, &event_out );
|
||||
|
||||
puts( "Waiting for RTEMS_EVENT_16" );
|
||||
status = rtems_event_receive(
|
||||
|
||||
@@ -45,17 +45,15 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Init( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
rtems_status_code status;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 7 -- NODE %" PRId32 " ***\n",
|
||||
rtems_object_get_local_node()
|
||||
"\n\n*** TEST 7 -- NODE %" PRId32 " ***\n",
|
||||
rtems_object_get_local_node()
|
||||
);
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
|
||||
@@ -63,7 +61,7 @@ rtems_task Init(
|
||||
|
||||
puts( "Creating Test_task (Global)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[rtems_object_get_local_node()],
|
||||
Task_name[ rtems_object_get_local_node() ],
|
||||
1,
|
||||
RTEMS_MINIMUM_STACK_SIZE,
|
||||
RTEMS_TIMESLICE,
|
||||
|
||||
@@ -34,13 +34,9 @@
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Test_task( rtems_task_argument argument );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
@@ -49,8 +45,8 @@ rtems_task Test_task(
|
||||
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
@@ -58,11 +54,11 @@ rtems_task Test_task(
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
|
||||
TEST_EXTERN rtems_id Timer_id[ 4 ]; /* array of timer ids */
|
||||
TEST_EXTERN rtems_name Timer_name[ 4 ]; /* array of timer names */
|
||||
TEST_EXTERN rtems_id Timer_id[ 4 ]; /* array of timer ids */
|
||||
TEST_EXTERN rtems_name Timer_name[ 4 ]; /* array of timer names */
|
||||
|
||||
TEST_EXTERN volatile bool Stop_Test;
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
#define DOT_COUNT 100
|
||||
|
||||
static rtems_timer_service_routine Stop_Test_TSR(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
)
|
||||
{
|
||||
(void) ignored_id;
|
||||
@@ -55,21 +55,19 @@ static rtems_timer_service_routine Stop_Test_TSR(
|
||||
Stop_Test = true;
|
||||
}
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Test_task( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
rtems_status_code status;
|
||||
uint32_t count;
|
||||
uint32_t remote_node;
|
||||
uint32_t count;
|
||||
uint32_t remote_node;
|
||||
rtems_id remote_tid;
|
||||
rtems_event_set event_out;
|
||||
|
||||
Stop_Test = false;
|
||||
|
||||
remote_node = (rtems_object_get_local_node() == 1) ? 2 : 1;
|
||||
remote_node = ( rtems_object_get_local_node() == 1 ) ? 2 : 1;
|
||||
puts_nocr( "Remote task's name is : " );
|
||||
put_name( Task_name[ remote_node ], TRUE );
|
||||
|
||||
@@ -97,7 +95,7 @@ rtems_task Test_task(
|
||||
directive_failed( status, "rtems_timer_fire_after" );
|
||||
|
||||
while ( true ) {
|
||||
for ( count=DOT_COUNT ; count && (Stop_Test == false) ; count-- ) {
|
||||
for ( count = DOT_COUNT; count && ( Stop_Test == false ); count-- ) {
|
||||
status = rtems_event_receive(
|
||||
RTEMS_EVENT_16,
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
@@ -105,18 +103,22 @@ rtems_task Test_task(
|
||||
&event_out
|
||||
);
|
||||
if ( status == RTEMS_TIMEOUT ) {
|
||||
printf("\nTA1 - RTEMS_TIMEOUT .. probably OK if the other node exits");
|
||||
printf(
|
||||
"\nTA1 - RTEMS_TIMEOUT .. probably OK if the other node exits"
|
||||
);
|
||||
Stop_Test = true;
|
||||
break;
|
||||
} else
|
||||
} else {
|
||||
directive_failed( status, "rtems_event_receive" );
|
||||
}
|
||||
|
||||
status = rtems_event_send( remote_tid, RTEMS_EVENT_16 );
|
||||
directive_failed( status, "rtems_event_send" );
|
||||
}
|
||||
if ( Stop_Test )
|
||||
break;
|
||||
put_dot('.');
|
||||
if ( Stop_Test ) {
|
||||
break;
|
||||
}
|
||||
put_dot( '.' );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -124,7 +126,7 @@ rtems_task Test_task(
|
||||
* when our MPCI shuts down
|
||||
*/
|
||||
|
||||
rtems_task_wake_after(10);
|
||||
rtems_task_wake_after( 10 );
|
||||
|
||||
puts( "\n*** END OF TEST 7 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
|
||||
@@ -45,9 +45,7 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Init( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
|
||||
@@ -34,13 +34,9 @@
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Test_task( rtems_task_argument argument );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
@@ -49,9 +45,9 @@ rtems_task Test_task(
|
||||
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
@@ -59,10 +55,10 @@ rtems_task Test_task(
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
|
||||
TEST_EXTERN rtems_id Semaphore_id[ 2 ]; /* array of semaphore ids */
|
||||
TEST_EXTERN rtems_name Semaphore_name[ 2 ]; /* array of semaphore names */
|
||||
TEST_EXTERN rtems_id Semaphore_id[ 2 ]; /* array of semaphore ids */
|
||||
TEST_EXTERN rtems_name Semaphore_name[ 2 ]; /* array of semaphore names */
|
||||
|
||||
/* end of include file */
|
||||
|
||||
@@ -41,13 +41,11 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Test_task( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
uint32_t count;
|
||||
uint32_t count;
|
||||
rtems_status_code status;
|
||||
|
||||
puts( "Getting SMID of semaphore" );
|
||||
@@ -72,7 +70,7 @@ rtems_task Test_task(
|
||||
);
|
||||
}
|
||||
|
||||
count = 0; /* number of times node 1 releases semaphore */
|
||||
count = 0; /* number of times node 1 releases semaphore */
|
||||
while ( FOREVER ) {
|
||||
put_dot( 'p' );
|
||||
status = rtems_semaphore_obtain(
|
||||
@@ -101,8 +99,7 @@ rtems_task Test_task(
|
||||
|
||||
puts( "*** END OF TEST 8 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
put_dot( 'v' );
|
||||
status = rtems_semaphore_release( Semaphore_id[ 1 ] );
|
||||
directive_failed( status, "rtems_semaphore_release FAILED!!" );
|
||||
|
||||
@@ -62,9 +62,7 @@ static const rtems_message_queue_config config = {
|
||||
|
||||
#endif
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Init( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
@@ -101,7 +99,7 @@ rtems_task Init(
|
||||
|
||||
puts( "Creating Test_task (local)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[rtems_object_get_local_node()],
|
||||
Task_name[ rtems_object_get_local_node() ],
|
||||
1,
|
||||
RTEMS_MINIMUM_STACK_SIZE,
|
||||
RTEMS_TIMESLICE,
|
||||
|
||||
@@ -42,24 +42,24 @@
|
||||
|
||||
void Receive_messages()
|
||||
{
|
||||
rtems_status_code status;
|
||||
uint32_t index;
|
||||
size_t size;
|
||||
char receive_buffer[16];
|
||||
rtems_status_code status;
|
||||
uint32_t index;
|
||||
size_t size;
|
||||
char receive_buffer[ 16 ];
|
||||
|
||||
for ( index=1 ; index <=3 ; index++ ) {
|
||||
puts( "Receiving message ..." );
|
||||
status = rtems_message_queue_receive(
|
||||
Queue_id[ 1 ],
|
||||
receive_buffer,
|
||||
&size,
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
RTEMS_NO_TIMEOUT
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_receive" );
|
||||
puts_nocr( "Received : ");
|
||||
puts( receive_buffer );
|
||||
}
|
||||
for ( index = 1; index <= 3; index++ ) {
|
||||
puts( "Receiving message ..." );
|
||||
status = rtems_message_queue_receive(
|
||||
Queue_id[ 1 ],
|
||||
receive_buffer,
|
||||
&size,
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
RTEMS_NO_TIMEOUT
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_receive" );
|
||||
puts_nocr( "Received : " );
|
||||
puts( receive_buffer );
|
||||
}
|
||||
|
||||
puts( "Receiver delaying for a second" );
|
||||
status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() );
|
||||
|
||||
@@ -43,12 +43,16 @@
|
||||
void Send_messages()
|
||||
{
|
||||
rtems_status_code status;
|
||||
uint32_t broadcast_count;
|
||||
uint32_t broadcast_count;
|
||||
|
||||
puts_nocr( "rtems_message_queue_send: " );
|
||||
puts( buffer1 );
|
||||
|
||||
status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer1, 16 );
|
||||
status = rtems_message_queue_send(
|
||||
Queue_id[ 1 ],
|
||||
(long ( * )[ 4 ]) buffer1,
|
||||
16
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_send" );
|
||||
|
||||
puts( "Delaying for a second" );
|
||||
@@ -57,7 +61,11 @@ void Send_messages()
|
||||
|
||||
puts_nocr( "rtems_message_queue_urgent: " );
|
||||
puts( buffer2 );
|
||||
status = rtems_message_queue_urgent( Queue_id[ 1 ], (long (*)[4])buffer2, 16 );
|
||||
status = rtems_message_queue_urgent(
|
||||
Queue_id[ 1 ],
|
||||
(long ( * )[ 4 ]) buffer2,
|
||||
16
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_urgent" );
|
||||
|
||||
puts( "Delaying for a second" );
|
||||
@@ -68,7 +76,7 @@ void Send_messages()
|
||||
puts( buffer3 );
|
||||
status = rtems_message_queue_broadcast(
|
||||
Queue_id[ 1 ],
|
||||
(long (*)[4])buffer3,
|
||||
(long ( * )[ 4 ]) buffer3,
|
||||
16,
|
||||
&broadcast_count
|
||||
);
|
||||
|
||||
@@ -34,13 +34,9 @@
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Test_task( rtems_task_argument argument );
|
||||
|
||||
void Receive_messages( void );
|
||||
|
||||
@@ -59,7 +55,7 @@ void Send_messages( void );
|
||||
#if CONFIGURE_MP_NODE_NUMBER == 1
|
||||
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 2
|
||||
#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
|
||||
CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 3, 16 )
|
||||
CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 3, 16 )
|
||||
#endif
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
@@ -68,15 +64,15 @@ void Send_messages( void );
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
|
||||
TEST_EXTERN rtems_id Queue_id[ 3 ]; /* array of message queue ids */
|
||||
TEST_EXTERN rtems_name Queue_name[ 3 ]; /* array of message queue names */
|
||||
TEST_EXTERN rtems_id Queue_id[ 3 ]; /* array of message queue ids */
|
||||
TEST_EXTERN rtems_name Queue_name[ 3 ]; /* array of message queue names */
|
||||
|
||||
extern char buffer1[16];
|
||||
extern char buffer2[16];
|
||||
extern char buffer3[16];
|
||||
extern char buffer4[16];
|
||||
extern char buffer1[ 16 ];
|
||||
extern char buffer2[ 16 ];
|
||||
extern char buffer3[ 16 ];
|
||||
extern char buffer4[ 16 ];
|
||||
|
||||
/* end of include file */
|
||||
|
||||
@@ -41,21 +41,19 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
char buffer1[16] = "123456789012345";
|
||||
char buffer2[16] = "abcdefghijklmno";
|
||||
char buffer3[16] = "ABCDEFGHIJKLMNO";
|
||||
char buffer4[16] = "PQRSTUVWXYZ(){}";
|
||||
char buffer1[ 16 ] = "123456789012345";
|
||||
char buffer2[ 16 ] = "abcdefghijklmno";
|
||||
char buffer3[ 16 ] = "ABCDEFGHIJKLMNO";
|
||||
char buffer4[ 16 ] = "PQRSTUVWXYZ(){}";
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Test_task( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
rtems_status_code status;
|
||||
uint32_t count;
|
||||
size_t size;
|
||||
char receive_buffer[16];
|
||||
char receive_buffer[ 16 ];
|
||||
|
||||
status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
@@ -91,7 +89,7 @@ rtems_task Test_task(
|
||||
"rtems_message_queue_delete"
|
||||
);
|
||||
puts(
|
||||
"rtems_message_queue_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT"
|
||||
"rtems_message_queue_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT"
|
||||
);
|
||||
|
||||
Send_messages();
|
||||
@@ -125,13 +123,12 @@ rtems_task Test_task(
|
||||
"rtems_message_queue_receive"
|
||||
);
|
||||
puts( "\nGlobal message queue deleted" );
|
||||
}
|
||||
else { /* node == 1 */
|
||||
} else { /* node == 1 */
|
||||
Receive_messages();
|
||||
Send_messages();
|
||||
|
||||
puts( "Delaying for 5 seconds" );
|
||||
status = rtems_task_wake_after( 5*rtems_clock_get_ticks_per_second() );
|
||||
status = rtems_task_wake_after( 5 * rtems_clock_get_ticks_per_second() );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
puts( "Deleting Message queue" );
|
||||
|
||||
@@ -51,22 +51,20 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Init( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
rtems_status_code status;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 10 -- NODE %" PRIu32 " ***\n",
|
||||
rtems_object_get_local_node()
|
||||
"\n\n*** TEST 10 -- NODE %" PRIu32 " ***\n",
|
||||
rtems_object_get_local_node()
|
||||
);
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
|
||||
Task_name[ 3 ] = rtems_build_name( 'S', 'A', '3', ' ' );
|
||||
Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
|
||||
Task_name[ 3 ] = rtems_build_name( 'S', 'A', '3', ' ' );
|
||||
|
||||
Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' );
|
||||
|
||||
@@ -97,7 +95,6 @@ rtems_task Init(
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
} else {
|
||||
|
||||
puts( "Creating Test_task 1 (local)" );
|
||||
status = rtems_task_create(
|
||||
Task_name[ 1 ],
|
||||
@@ -158,7 +155,6 @@ rtems_task Init(
|
||||
puts( "Restarting Test_task3" );
|
||||
status = rtems_task_restart( Task_id[ 3 ], 1 );
|
||||
directive_failed( status, "rtems_task_restart of Task 3" );
|
||||
|
||||
}
|
||||
puts( "*** END OF TEST 10 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
|
||||
@@ -34,21 +34,13 @@
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task1(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Test_task1( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task2(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Test_task2( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task3(
|
||||
rtems_task_argument restart
|
||||
);
|
||||
rtems_task Test_task3( rtems_task_argument restart );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
@@ -58,13 +50,13 @@ rtems_task Test_task3(
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#if ( CONFIGURE_MP_NODE_NUMBER == 1 )
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
|
||||
#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
|
||||
CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 3, 16 )
|
||||
#else
|
||||
#define CONFIGURE_MAXIMUM_TASKS 4
|
||||
#define CONFIGURE_MAXIMUM_TASKS 4
|
||||
#endif
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
@@ -73,11 +65,11 @@ rtems_task Test_task3(
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
|
||||
TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */
|
||||
TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */
|
||||
TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */
|
||||
TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */
|
||||
|
||||
TEST_EXTERN rtems_id Semaphore_id[ 2 ]; /* array of semaphore ids */
|
||||
TEST_EXTERN rtems_name Semaphore_name[ 2 ]; /* array of semaphore names */
|
||||
|
||||
@@ -41,13 +41,11 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Test_task1(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Test_task1( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
char receive_buffer[16];
|
||||
char receive_buffer[ 16 ];
|
||||
size_t size;
|
||||
rtems_status_code status;
|
||||
|
||||
@@ -70,5 +68,4 @@ rtems_task Test_task1(
|
||||
RTEMS_NO_TIMEOUT
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_receive" );
|
||||
|
||||
}
|
||||
|
||||
@@ -41,9 +41,7 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Test_task2(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Test_task2( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Test_task3(rtems_task_argument restart)
|
||||
rtems_task Test_task3( rtems_task_argument restart )
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
|
||||
@@ -48,11 +48,9 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
uint8_t my_partition[0x30000] CPU_STRUCTURE_ALIGNMENT;
|
||||
uint8_t my_partition[ 0x30000 ] CPU_STRUCTURE_ALIGNMENT;
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Init( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
@@ -113,7 +111,7 @@ rtems_task Init(
|
||||
puts( "Attempting to create Partition (Global)" );
|
||||
status = rtems_partition_create(
|
||||
1,
|
||||
(uint8_t *) my_partition,
|
||||
(uint8_t *) my_partition,
|
||||
128,
|
||||
64,
|
||||
RTEMS_GLOBAL,
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init( rtems_task_argument argument );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
@@ -45,16 +43,16 @@ rtems_task Init(
|
||||
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 0
|
||||
#define CONFIGURE_MP_MAXIMUM_PROXIES 0
|
||||
#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 0
|
||||
#define CONFIGURE_MP_MAXIMUM_PROXIES 0
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#if ( CONFIGURE_MP_NODE_NUMBER == 1 )
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
|
||||
#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
|
||||
CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 3, 16 )
|
||||
#define CONFIGURE_MAXIMUM_PARTITIONS 1
|
||||
#define CONFIGURE_MAXIMUM_PARTITIONS 1
|
||||
#endif
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
@@ -63,11 +61,11 @@ rtems_task Init(
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
|
||||
TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */
|
||||
TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */
|
||||
TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */
|
||||
TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */
|
||||
|
||||
TEST_EXTERN rtems_id Semaphore_id[ 2 ]; /* array of semaphore ids */
|
||||
TEST_EXTERN rtems_name Semaphore_name[ 2 ]; /* array of semaphore names */
|
||||
|
||||
@@ -50,21 +50,19 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
uint8_t Partition_area[ 1024 ] CPU_STRUCTURE_ALIGNMENT;
|
||||
uint8_t Partition_area[ 1024 ] CPU_STRUCTURE_ALIGNMENT;
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Init( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
rtems_status_code status;
|
||||
void *bufaddr;
|
||||
rtems_status_code status;
|
||||
void *bufaddr;
|
||||
|
||||
printf(
|
||||
"\n\n*** TEST 12 -- NODE %" PRId32 " ***\n",
|
||||
rtems_object_get_local_node()
|
||||
);
|
||||
);
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
|
||||
@@ -73,7 +71,7 @@ rtems_task Init(
|
||||
|
||||
puts( "Got to initialization task" );
|
||||
|
||||
if ( rtems_object_get_local_node() == 2 ) {
|
||||
if ( rtems_object_get_local_node() == 2 ) {
|
||||
status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
@@ -95,7 +93,7 @@ rtems_task Init(
|
||||
"rtems_partition_delete"
|
||||
);
|
||||
puts(
|
||||
"rtems_partition_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT"
|
||||
"rtems_partition_delete correctly returned RTEMS_ILLEGAL_ON_REMOTE_OBJECT"
|
||||
);
|
||||
|
||||
puts( "Obtaining a buffer from the global partition" );
|
||||
@@ -109,8 +107,7 @@ rtems_task Init(
|
||||
|
||||
status = rtems_task_wake_after( 2 * rtems_clock_get_ticks_per_second() );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
puts( "Creating Partition (Global)" );
|
||||
status = rtems_partition_create(
|
||||
Partition_name[ 1 ],
|
||||
@@ -129,7 +126,7 @@ rtems_task Init(
|
||||
puts( "Deleting Partition (Global)" );
|
||||
status = rtems_partition_delete( Partition_id[ 1 ] );
|
||||
directive_failed( status, "rtems_partition_delete" );
|
||||
}
|
||||
puts( "*** END OF TEST 12 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
puts( "*** END OF TEST 12 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
@@ -32,13 +32,11 @@
|
||||
|
||||
#include <tmacros.h>
|
||||
|
||||
#define PT_NAME rtems_build_name( 'P', 'A', 'R', '\0' )
|
||||
#define PT_NAME rtems_build_name( 'P', 'A', 'R', '\0' )
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init( rtems_task_argument argument );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
@@ -47,14 +45,14 @@ rtems_task Init(
|
||||
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 1
|
||||
#define CONFIGURE_MP_MAXIMUM_PROXIES 0
|
||||
#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 1
|
||||
#define CONFIGURE_MP_MAXIMUM_PROXIES 0
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#if ( CONFIGURE_MP_NODE_NUMBER == 1 )
|
||||
#define CONFIGURE_MAXIMUM_PARTITIONS 1
|
||||
#define CONFIGURE_MAXIMUM_PARTITIONS 1
|
||||
#elif ( CONFIGURE_MP_NODE_NUMBER == 2 )
|
||||
#define CONFIGURE_MAXIMUM_PARTITIONS 2
|
||||
#define CONFIGURE_MAXIMUM_PARTITIONS 2
|
||||
#endif
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
@@ -63,8 +61,8 @@ rtems_task Init(
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
|
||||
TEST_EXTERN rtems_id Partition_id[ 2 ]; /* array of partition ids */
|
||||
TEST_EXTERN rtems_name Partition_name[ 2 ]; /* array of partition names */
|
||||
|
||||
@@ -45,9 +45,7 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Init( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
|
||||
@@ -34,17 +34,11 @@
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task1(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Test_task1( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task2(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Test_task2( rtems_task_argument argument );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
@@ -53,10 +47,10 @@ rtems_task Test_task2(
|
||||
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 3
|
||||
#define CONFIGURE_MAXIMUM_TASKS 3
|
||||
#if ( CONFIGURE_MP_NODE_NUMBER == 1 )
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
|
||||
#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
|
||||
CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 3, 16 )
|
||||
#endif
|
||||
@@ -67,11 +61,11 @@ rtems_task Test_task2(
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
|
||||
TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */
|
||||
TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */
|
||||
TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */
|
||||
TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */
|
||||
|
||||
TEST_EXTERN rtems_id Semaphore_id[ 2 ]; /* array of semaphore ids */
|
||||
TEST_EXTERN rtems_name Semaphore_name[ 2 ]; /* array of semaphore names */
|
||||
|
||||
@@ -42,13 +42,11 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Test_task1(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Test_task1( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
char receive_buffer[16];
|
||||
char receive_buffer[ 16 ];
|
||||
size_t size;
|
||||
rtems_status_code status;
|
||||
|
||||
@@ -81,12 +79,16 @@ rtems_task Test_task1(
|
||||
puts( "Receiving message ..." );
|
||||
status = rtems_message_queue_receive(
|
||||
Queue_id[ 1 ],
|
||||
(long (*)[4])receive_buffer,
|
||||
(long ( * )[ 4 ]) receive_buffer,
|
||||
&size,
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
2 * rtems_clock_get_ticks_per_second()
|
||||
);
|
||||
fatal_directive_status(status, RTEMS_TIMEOUT, "rtems_message_queue_receive");
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_TIMEOUT,
|
||||
"rtems_message_queue_receive"
|
||||
);
|
||||
puts( "rtems_message_queue_receive correctly returned RTEMS_TIMEOUT" );
|
||||
|
||||
puts( "Deleting self" );
|
||||
|
||||
@@ -42,9 +42,7 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Test_task2(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Test_task2( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
@@ -90,7 +88,7 @@ rtems_task Test_task2(
|
||||
directive_failed( status, "rtems_semaphore_obtain" );
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() / 2 );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
*/
|
||||
@@ -116,11 +114,7 @@ rtems_task Test_task2(
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
2 * rtems_clock_get_ticks_per_second()
|
||||
);
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_TIMEOUT,
|
||||
"rtems_semaphore_obtain"
|
||||
);
|
||||
fatal_directive_status( status, RTEMS_TIMEOUT, "rtems_semaphore_obtain" );
|
||||
puts( "rtems_semaphore_obtain correctly returned RTEMS_TIMEOUT" );
|
||||
|
||||
puts( "*** END OF TEST 13 ***" );
|
||||
|
||||
@@ -40,16 +40,19 @@
|
||||
#include "system.h"
|
||||
|
||||
rtems_timer_service_routine Delayed_send_event(
|
||||
rtems_id timer_id,
|
||||
void *id_ptr
|
||||
rtems_id timer_id,
|
||||
void *id_ptr
|
||||
)
|
||||
{
|
||||
(void) timer_id;
|
||||
|
||||
rtems_status_code status;
|
||||
rtems_id id = *(rtems_id *)id_ptr;
|
||||
rtems_id id = *(rtems_id *) id_ptr;
|
||||
|
||||
status = rtems_event_send( id, RTEMS_EVENT_16 );
|
||||
fatal_directive_check_status_only(
|
||||
status, RTEMS_SUCCESSFUL, "rtems_event_send" );
|
||||
status,
|
||||
RTEMS_SUCCESSFUL,
|
||||
"rtems_event_send"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -42,19 +42,17 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Test_task( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
rtems_status_code status;
|
||||
uint32_t count;
|
||||
uint32_t remote_node;
|
||||
uint32_t count;
|
||||
uint32_t remote_node;
|
||||
rtems_id remote_tid;
|
||||
rtems_event_set event_out;
|
||||
|
||||
remote_node = ((rtems_object_get_local_node() == 1) ? 2 : 1);
|
||||
remote_node = ( ( rtems_object_get_local_node() == 1 ) ? 2 : 1 );
|
||||
|
||||
puts( "About to go to sleep!" );
|
||||
status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() );
|
||||
@@ -72,26 +70,31 @@ rtems_task Test_task(
|
||||
&remote_tid
|
||||
);
|
||||
|
||||
if ( status == RTEMS_SUCCESSFUL )
|
||||
if ( status == RTEMS_SUCCESSFUL ) {
|
||||
break;
|
||||
}
|
||||
puts( "rtems_task_ident FAILED!!" );
|
||||
rtems_task_wake_after(2);
|
||||
rtems_task_wake_after( 2 );
|
||||
}
|
||||
|
||||
if ( rtems_object_get_local_node() == 1 ) {
|
||||
puts( "Sending events to remote task" );
|
||||
while ( Stop_Test == false ) {
|
||||
for ( count=EVENT_TASK_DOT_COUNT; Stop_Test == false && count; count-- ) {
|
||||
for (
|
||||
count = EVENT_TASK_DOT_COUNT; Stop_Test == false && count; count--
|
||||
) {
|
||||
status = rtems_event_send( remote_tid, RTEMS_EVENT_16 );
|
||||
directive_failed( status, "rtems_event_send" );
|
||||
}
|
||||
put_dot( 'e' );
|
||||
}
|
||||
put_dot( 'e' );
|
||||
}
|
||||
}
|
||||
|
||||
puts( "Receiving events from remote task" );
|
||||
while ( Stop_Test == false ) {
|
||||
for ( count=EVENT_TASK_DOT_COUNT ; Stop_Test == false && count ; count-- ) {
|
||||
for (
|
||||
count = EVENT_TASK_DOT_COUNT; Stop_Test == false && count; count--
|
||||
) {
|
||||
status = rtems_event_receive(
|
||||
RTEMS_EVENT_16,
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
|
||||
@@ -41,9 +41,7 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Delayed_events_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Delayed_events_task( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
@@ -66,7 +64,9 @@ rtems_task Delayed_events_task(
|
||||
self = rtems_task_self();
|
||||
|
||||
while ( Stop_Test == false ) {
|
||||
for ( count=DELAYED_EVENT_DOT_COUNT; Stop_Test == false && count; count-- ){
|
||||
for (
|
||||
count = DELAYED_EVENT_DOT_COUNT; Stop_Test == false && count; count--
|
||||
) {
|
||||
status = rtems_timer_fire_after(
|
||||
Timer_id[ 1 ],
|
||||
1,
|
||||
@@ -83,7 +83,7 @@ rtems_task Delayed_events_task(
|
||||
);
|
||||
directive_failed( status, "rtems_event_receive" );
|
||||
}
|
||||
put_dot('.');
|
||||
put_dot( '.' );
|
||||
}
|
||||
|
||||
Exit_test();
|
||||
|
||||
@@ -51,7 +51,7 @@ void Exit_test( void )
|
||||
* when our MPCI shuts down
|
||||
*/
|
||||
|
||||
rtems_task_wake_after(20);
|
||||
rtems_task_wake_after( 20 );
|
||||
|
||||
status = rtems_task_mode( RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &old_mode );
|
||||
directive_failed( status, "rtems_task_mode" );
|
||||
|
||||
@@ -51,11 +51,11 @@
|
||||
*/
|
||||
#define MAX_LONG_TEST_DURATION 100
|
||||
|
||||
uint8_t my_partition[0x30000] CPU_STRUCTURE_ALIGNMENT;
|
||||
uint8_t my_partition[ 0x30000 ] CPU_STRUCTURE_ALIGNMENT;
|
||||
|
||||
static rtems_timer_service_routine Stop_Test_TSR(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
)
|
||||
{
|
||||
(void) ignored_id;
|
||||
@@ -64,9 +64,7 @@ static rtems_timer_service_routine Stop_Test_TSR(
|
||||
Stop_Test = true;
|
||||
}
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Init( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
@@ -81,7 +79,7 @@ rtems_task Init(
|
||||
Stop_Test = false;
|
||||
|
||||
status = rtems_timer_create(
|
||||
rtems_build_name('S', 'T', 'O', 'P'),
|
||||
rtems_build_name( 'S', 'T', 'O', 'P' ),
|
||||
&timer_id
|
||||
);
|
||||
directive_failed( status, "rtems_timer_create" );
|
||||
@@ -106,7 +104,7 @@ rtems_task Init(
|
||||
Semaphore_task_name[ 1 ] = rtems_build_name( 'S', 'M', '1', ' ' );
|
||||
Semaphore_task_name[ 2 ] = rtems_build_name( 'S', 'M', '2', ' ' );
|
||||
|
||||
Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' );
|
||||
Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' );
|
||||
|
||||
Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' );
|
||||
|
||||
@@ -138,7 +136,7 @@ rtems_task Init(
|
||||
puts( "Creating Partition (Global)" );
|
||||
status = rtems_partition_create(
|
||||
Partition_name[ 1 ],
|
||||
(void *)my_partition,
|
||||
(void *) my_partition,
|
||||
0x8000,
|
||||
0x3800,
|
||||
RTEMS_GLOBAL,
|
||||
|
||||
@@ -43,21 +43,19 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Message_queue_task(
|
||||
rtems_task_argument index
|
||||
)
|
||||
rtems_task Message_queue_task( rtems_task_argument index )
|
||||
{
|
||||
rtems_status_code status;
|
||||
uint32_t count;
|
||||
uint32_t yield_count;
|
||||
uint32_t *buffer_count;
|
||||
uint32_t *overflow_count;
|
||||
size_t size;
|
||||
rtems_status_code status;
|
||||
uint32_t count;
|
||||
uint32_t yield_count;
|
||||
uint32_t *buffer_count;
|
||||
uint32_t *overflow_count;
|
||||
size_t size;
|
||||
|
||||
Msg_buffer[ index ][0] = 0;
|
||||
Msg_buffer[ index ][1] = 0;
|
||||
Msg_buffer[ index ][2] = 0;
|
||||
Msg_buffer[ index ][3] = 0;
|
||||
Msg_buffer[ index ][ 0 ] = 0;
|
||||
Msg_buffer[ index ][ 1 ] = 0;
|
||||
Msg_buffer[ index ][ 2 ] = 0;
|
||||
Msg_buffer[ index ][ 3 ] = 0;
|
||||
|
||||
puts( "Getting ID of msg queue" );
|
||||
while ( FOREVER ) {
|
||||
@@ -66,30 +64,31 @@ rtems_task Message_queue_task(
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&Queue_id[ 1 ]
|
||||
);
|
||||
if ( status == RTEMS_SUCCESSFUL )
|
||||
if ( status == RTEMS_SUCCESSFUL ) {
|
||||
break;
|
||||
}
|
||||
puts( "rtems_message_queue_ident FAILED!!" );
|
||||
rtems_task_wake_after(2);
|
||||
rtems_task_wake_after( 2 );
|
||||
}
|
||||
|
||||
if ( rtems_object_get_local_node() == 1 ) {
|
||||
status = rtems_message_queue_send(
|
||||
Queue_id[ 1 ],
|
||||
(long (*)[4])Msg_buffer[ index ],
|
||||
16
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_send" );
|
||||
overflow_count = &Msg_buffer[ index ][0];
|
||||
buffer_count = &Msg_buffer[ index ][1];
|
||||
status = rtems_message_queue_send(
|
||||
Queue_id[ 1 ],
|
||||
(long ( * )[ 4 ]) Msg_buffer[ index ],
|
||||
16
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_send" );
|
||||
overflow_count = &Msg_buffer[ index ][ 0 ];
|
||||
buffer_count = &Msg_buffer[ index ][ 1 ];
|
||||
} else {
|
||||
overflow_count = &Msg_buffer[ index ][2];
|
||||
buffer_count = &Msg_buffer[ index ][3];
|
||||
overflow_count = &Msg_buffer[ index ][ 2 ];
|
||||
buffer_count = &Msg_buffer[ index ][ 3 ];
|
||||
}
|
||||
|
||||
while ( Stop_Test == false ) {
|
||||
yield_count = 100;
|
||||
|
||||
for ( count=MESSAGE_DOT_COUNT ; Stop_Test == false && count ; count-- ) {
|
||||
for ( count = MESSAGE_DOT_COUNT; Stop_Test == false && count; count-- ) {
|
||||
status = rtems_message_queue_receive(
|
||||
Queue_id[ 1 ],
|
||||
Msg_buffer[ index ],
|
||||
@@ -99,11 +98,12 @@ rtems_task Message_queue_task(
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_receive" );
|
||||
|
||||
if ( *buffer_count == (uint32_t)0xffffffff ) {
|
||||
*buffer_count = 0;
|
||||
if ( *buffer_count == (uint32_t) 0xffffffff ) {
|
||||
*buffer_count = 0;
|
||||
*overflow_count += 1;
|
||||
} else
|
||||
} else {
|
||||
*buffer_count += 1;
|
||||
}
|
||||
|
||||
status = rtems_message_queue_send(
|
||||
Queue_id[ 1 ],
|
||||
@@ -112,13 +112,14 @@ rtems_task Message_queue_task(
|
||||
);
|
||||
directive_failed( status, "rtems_message_queue_send" );
|
||||
|
||||
if (Stop_Test == false)
|
||||
if ( Stop_Test == false ) {
|
||||
if ( rtems_object_get_local_node() == 1 && --yield_count == 0 ) {
|
||||
status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
yield_count = 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
put_dot( 'm' );
|
||||
}
|
||||
|
||||
@@ -41,16 +41,14 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Partition_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Partition_task( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
uint32_t count;
|
||||
rtems_status_code status;
|
||||
uint32_t yield_count;
|
||||
void *buffer;
|
||||
uint32_t count;
|
||||
rtems_status_code status;
|
||||
uint32_t yield_count;
|
||||
void *buffer;
|
||||
|
||||
puts( "Getting ID of partition" );
|
||||
while ( FOREVER ) {
|
||||
@@ -60,29 +58,31 @@ rtems_task Partition_task(
|
||||
&Partition_id[ 1 ]
|
||||
);
|
||||
|
||||
if ( status == RTEMS_SUCCESSFUL )
|
||||
if ( status == RTEMS_SUCCESSFUL ) {
|
||||
break;
|
||||
}
|
||||
|
||||
puts( "rtems_partition_ident FAILED!!" );
|
||||
rtems_task_wake_after(2);
|
||||
rtems_task_wake_after( 2 );
|
||||
}
|
||||
|
||||
yield_count = 100;
|
||||
|
||||
while ( Stop_Test == false ) {
|
||||
for ( count=PARTITION_DOT_COUNT ; Stop_Test == false && count ; count-- ) {
|
||||
for ( count = PARTITION_DOT_COUNT; Stop_Test == false && count; count-- ) {
|
||||
status = rtems_partition_get_buffer( Partition_id[ 1 ], &buffer );
|
||||
directive_failed( status, "rtems_partition_get_buffer" );
|
||||
|
||||
status = rtems_partition_return_buffer( Partition_id[ 1 ], buffer );
|
||||
directive_failed( status, "rtems_partition_return_buffer" );
|
||||
|
||||
if (Stop_Test == false)
|
||||
if ( Stop_Test == false ) {
|
||||
if ( rtems_object_get_local_node() == 1 && --yield_count == 0 ) {
|
||||
status = rtems_task_wake_after( 1 );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
yield_count = 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
put_dot( 'p' );
|
||||
}
|
||||
|
||||
@@ -40,15 +40,13 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Semaphore_task(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
rtems_task Semaphore_task( rtems_task_argument argument )
|
||||
{
|
||||
(void) argument;
|
||||
|
||||
uint32_t count;
|
||||
uint32_t count;
|
||||
rtems_status_code status;
|
||||
uint32_t yield_count;
|
||||
uint32_t yield_count;
|
||||
|
||||
puts( "Getting SMID of semaphore" );
|
||||
while ( FOREVER ) {
|
||||
@@ -57,17 +55,17 @@ rtems_task Semaphore_task(
|
||||
RTEMS_SEARCH_ALL_NODES,
|
||||
&Semaphore_id[ 1 ]
|
||||
);
|
||||
if ( status == RTEMS_SUCCESSFUL )
|
||||
if ( status == RTEMS_SUCCESSFUL ) {
|
||||
break;
|
||||
}
|
||||
puts( "rtems_semaphore_ident FAILED!!" );
|
||||
rtems_task_wake_after(2);
|
||||
rtems_task_wake_after( 2 );
|
||||
}
|
||||
|
||||
yield_count = 100;
|
||||
|
||||
while ( Stop_Test == false ) {
|
||||
|
||||
for ( count=SEMAPHORE_DOT_COUNT ; Stop_Test == false && count ; count-- ) {
|
||||
for ( count = SEMAPHORE_DOT_COUNT; Stop_Test == false && count; count-- ) {
|
||||
status = rtems_semaphore_obtain(
|
||||
Semaphore_id[ 1 ],
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
@@ -78,13 +76,14 @@ rtems_task Semaphore_task(
|
||||
status = rtems_semaphore_release( Semaphore_id[ 1 ] );
|
||||
directive_failed( status, "rtems_semaphore_release" );
|
||||
|
||||
if ( Stop_Test == false )
|
||||
if ( Stop_Test == false ) {
|
||||
if ( rtems_object_get_local_node() == 1 && --yield_count == 0 ) {
|
||||
status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
yield_count = 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
put_dot( 's' );
|
||||
}
|
||||
|
||||
@@ -35,33 +35,21 @@
|
||||
/* functions */
|
||||
|
||||
rtems_timer_service_routine Delayed_send_event(
|
||||
rtems_id timer_id,
|
||||
void *id_ptr
|
||||
rtems_id timer_id,
|
||||
void *id_ptr
|
||||
);
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Init( rtems_task_argument argument );
|
||||
|
||||
rtems_task Test_task(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Test_task( rtems_task_argument argument );
|
||||
|
||||
rtems_task Delayed_events_task(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Delayed_events_task( rtems_task_argument argument );
|
||||
|
||||
rtems_task Message_queue_task(
|
||||
rtems_task_argument index
|
||||
);
|
||||
rtems_task Message_queue_task( rtems_task_argument index );
|
||||
|
||||
rtems_task Partition_task(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Partition_task( rtems_task_argument argument );
|
||||
|
||||
rtems_task Semaphore_task(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
rtems_task Semaphore_task( rtems_task_argument argument );
|
||||
|
||||
void Exit_test( void );
|
||||
|
||||
@@ -73,64 +61,64 @@ void Exit_test( void );
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_TICKS_PER_TIMESLICE 1
|
||||
#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(1)
|
||||
#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS( 1 )
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 5
|
||||
#define CONFIGURE_MAXIMUM_TASKS 5
|
||||
#if ( CONFIGURE_MP_NODE_NUMBER == 1 )
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 12
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 12
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
|
||||
#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
|
||||
CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 1, 16 )
|
||||
#define CONFIGURE_MAXIMUM_PARTITIONS 1
|
||||
#define CONFIGURE_MAXIMUM_PARTITIONS 1
|
||||
#elif ( CONFIGURE_MP_NODE_NUMBER == 2 )
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 2
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 2
|
||||
#endif
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE)
|
||||
#define CONFIGURE_EXTRA_TASK_STACKS ( 1 * RTEMS_MINIMUM_STACK_SIZE )
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN rtems_id Event_task_id[ 2 ]; /* event task ids */
|
||||
TEST_EXTERN rtems_id Event_task_id[ 2 ]; /* event task ids */
|
||||
|
||||
TEST_EXTERN rtems_id Semaphore_task_id[ 3 ]; /* semaphore task ids */
|
||||
TEST_EXTERN rtems_name Semaphore_task_name[ 3 ]; /* semaphore task names */
|
||||
|
||||
TEST_EXTERN rtems_id Queue_task_id[ 3 ]; /* message queue task ids */
|
||||
TEST_EXTERN rtems_name Queue_task_name[ 3 ]; /* message queue task names */
|
||||
TEST_EXTERN rtems_id Queue_task_id[ 3 ]; /* message queue task ids */
|
||||
TEST_EXTERN rtems_name Queue_task_name[ 3 ]; /* message queue task names */
|
||||
|
||||
TEST_EXTERN rtems_id Partition_task_id[ 4 ]; /* partition task ids */
|
||||
TEST_EXTERN rtems_name Partition_task_name[ 4 ]; /* partition task names */
|
||||
|
||||
TEST_EXTERN rtems_id Partition_id[ 3 ]; /* partition ids */
|
||||
TEST_EXTERN rtems_name Partition_name[ 3 ]; /* partition names */
|
||||
TEST_EXTERN rtems_id Partition_id[ 3 ]; /* partition ids */
|
||||
TEST_EXTERN rtems_name Partition_name[ 3 ]; /* partition names */
|
||||
|
||||
TEST_EXTERN rtems_id Semaphore_id[ 3 ]; /* semaphore ids */
|
||||
TEST_EXTERN rtems_name Semaphore_name[ 3 ]; /* semaphore names */
|
||||
TEST_EXTERN rtems_id Semaphore_id[ 3 ]; /* semaphore ids */
|
||||
TEST_EXTERN rtems_name Semaphore_name[ 3 ]; /* semaphore names */
|
||||
|
||||
TEST_EXTERN rtems_id Queue_id[ 3 ]; /* message queue ids */
|
||||
TEST_EXTERN rtems_name Queue_name[ 3 ]; /* message queue names */
|
||||
TEST_EXTERN rtems_id Queue_id[ 3 ]; /* message queue ids */
|
||||
TEST_EXTERN rtems_name Queue_name[ 3 ]; /* message queue names */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* remote event task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* remote event task names */
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* remote event task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* remote event task names */
|
||||
|
||||
TEST_EXTERN rtems_id Timer_id[ 4 ]; /* event timer ids */
|
||||
TEST_EXTERN rtems_name Timer_name[ 4 ]; /* event timer names */
|
||||
TEST_EXTERN rtems_id Timer_id[ 4 ]; /* event timer ids */
|
||||
TEST_EXTERN rtems_name Timer_name[ 4 ]; /* event timer names */
|
||||
|
||||
TEST_EXTERN uint32_t Msg_buffer[ 4 ][ 4 ];
|
||||
TEST_EXTERN uint32_t Msg_buffer[ 4 ][ 4 ];
|
||||
|
||||
TEST_EXTERN volatile bool Stop_Test;
|
||||
TEST_EXTERN rtems_id timer_id;
|
||||
TEST_EXTERN rtems_id timer_id;
|
||||
|
||||
#define EVENT_TASK_DOT_COUNT 100
|
||||
#define EVENT_SEND_DOT_COUNT 100
|
||||
#define DELAYED_EVENT_DOT_COUNT 1000
|
||||
#define MESSAGE_DOT_COUNT 200
|
||||
#define PARTITION_DOT_COUNT 200
|
||||
#define SEMAPHORE_DOT_COUNT 200
|
||||
#define EVENT_TASK_DOT_COUNT 100
|
||||
#define EVENT_SEND_DOT_COUNT 100
|
||||
#define DELAYED_EVENT_DOT_COUNT 1000
|
||||
#define MESSAGE_DOT_COUNT 200
|
||||
#define PARTITION_DOT_COUNT 200
|
||||
#define SEMAPHORE_DOT_COUNT 200
|
||||
|
||||
/* end of include file */
|
||||
|
||||
Reference in New Issue
Block a user