diff options
Diffstat (limited to 'testsuites/mptests/mp14')
-rw-r--r-- | testsuites/mptests/mp14/delay.c | 34 | ||||
-rw-r--r-- | testsuites/mptests/mp14/evtask1.c | 87 | ||||
-rw-r--r-- | testsuites/mptests/mp14/evtmtask.c | 65 | ||||
-rw-r--r-- | testsuites/mptests/mp14/exit.c | 33 | ||||
-rw-r--r-- | testsuites/mptests/mp14/init.c | 191 | ||||
-rw-r--r-- | testsuites/mptests/mp14/msgtask1.c | 107 | ||||
-rw-r--r-- | testsuites/mptests/mp14/node1/mp14.doc | 50 | ||||
-rw-r--r-- | testsuites/mptests/mp14/node1/mp14.scn | 41 | ||||
-rw-r--r-- | testsuites/mptests/mp14/node2/mp14.doc | 13 | ||||
-rw-r--r-- | testsuites/mptests/mp14/node2/mp14.scn | 38 | ||||
-rw-r--r-- | testsuites/mptests/mp14/pttask1.c | 71 | ||||
-rw-r--r-- | testsuites/mptests/mp14/smtask1.c | 73 | ||||
-rw-r--r-- | testsuites/mptests/mp14/system.h | 115 |
13 files changed, 0 insertions, 918 deletions
diff --git a/testsuites/mptests/mp14/delay.c b/testsuites/mptests/mp14/delay.c deleted file mode 100644 index 7062c4ad21..0000000000 --- a/testsuites/mptests/mp14/delay.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Delayed_send_event - * - * This routine is a timer service routine which sends an event to a task. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include "system.h" - -rtems_timer_service_routine Delayed_send_event( - rtems_id timer_id, - void *ignored -) -{ - rtems_status_code status; - - status = rtems_event_send( - Task_id[ rtems_get_index( timer_id ) ], - RTEMS_EVENT_16 - ); - directive_failed( status, "rtems_event_send" ); -} diff --git a/testsuites/mptests/mp14/evtask1.c b/testsuites/mptests/mp14/evtask1.c deleted file mode 100644 index f14bb9d2fd..0000000000 --- a/testsuites/mptests/mp14/evtask1.c +++ /dev/null @@ -1,87 +0,0 @@ -/* Test_task - * - * This task either continuously sends events to a remote task, or - * continuously receives events sent by a remote task. This decision - * is based upon the local node number. - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include "system.h" - -extern rtems_multiprocessing_table Multiprocessing_configuration; - -rtems_task Test_task( - rtems_task_argument argument -) -{ - rtems_status_code status; - rtems_unsigned32 count; - rtems_unsigned32 remote_node; - rtems_id remote_tid; - rtems_event_set event_out; - - remote_node = ((Multiprocessing_configuration.node == 1) ? 2 : 1); - - puts( "About to go to sleep!" ); - status = rtems_task_wake_after( TICKS_PER_SECOND ); - directive_failed( status, "rtems_task_wake_after" ); - puts( "Waking up!" ); - - puts_nocr( "Remote task's name is : " ); - put_name( Task_name[ remote_node ], TRUE ); - - puts( "Getting TID of remote task" ); - while ( FOREVER ) { - status = rtems_task_ident( - Task_name[ remote_node ], - RTEMS_SEARCH_ALL_NODES, - &remote_tid - ); - - if ( status == RTEMS_SUCCESSFUL ) - break; - puts( "rtems_task_ident FAILED!!" ); - rtems_task_wake_after(2); - } - - if ( Multiprocessing_configuration.node == 1 ) { - puts( "Sending events to remote task" ); - while ( Stop_Test == FALSE ) { - 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' ); - } - } - - puts( "Receiving events from remote task" ); - while ( Stop_Test == FALSE ) { - for ( count=EVENT_TASK_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) { - status = rtems_event_receive( - RTEMS_EVENT_16, - RTEMS_DEFAULT_OPTIONS, - RTEMS_NO_TIMEOUT, - &event_out - ); - directive_failed( status, "rtems_event_receive" ); - } - put_dot( 'e' ); - } - - Exit_test(); -} diff --git a/testsuites/mptests/mp14/evtmtask.c b/testsuites/mptests/mp14/evtmtask.c deleted file mode 100644 index c540eb98fb..0000000000 --- a/testsuites/mptests/mp14/evtmtask.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Delayed_events_task - * - * This task continuously sends itself events at one tick - * intervals. - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include "system.h" - -rtems_task Delayed_events_task( - rtems_task_argument argument -) -{ - rtems_unsigned32 count; - rtems_unsigned32 previous_mode; - rtems_status_code status; - rtems_event_set events; - - status = rtems_task_mode( - RTEMS_PREEMPT | RTEMS_TIMESLICE, - RTEMS_PREEMPT_MASK | RTEMS_TIMESLICE_MASK, - &previous_mode - ); - directive_failed( status, "rtems_task_mode" ); - - status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] ); - directive_failed( status, "rtems_timer_create" ); - - while ( Stop_Test == FALSE ) { - for ( count=DELAYED_EVENT_DOT_COUNT; Stop_Test == FALSE && count; count-- ){ - status = rtems_timer_fire_after( - Timer_id[ 1 ], - 1, - Delayed_send_event, - NULL - ); - directive_failed( status, "rtems_timer_reset" ); - - status = rtems_event_receive( - RTEMS_EVENT_16, - RTEMS_DEFAULT_OPTIONS, - RTEMS_NO_TIMEOUT, - &events - ); - directive_failed( status, "rtems_event_receive" ); - } - put_dot('.'); - } - - Exit_test(); -} diff --git a/testsuites/mptests/mp14/exit.c b/testsuites/mptests/mp14/exit.c deleted file mode 100644 index 65fc0df49f..0000000000 --- a/testsuites/mptests/mp14/exit.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Exit_test - * - * This routine safely stops the test and prints some information - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include "system.h" - -void Exit_test( void ) -{ - rtems_status_code status; - rtems_mode old_mode; - - status = rtems_task_mode( RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &old_mode ); - directive_failed( status, "rtems_task_mode" ); - - MPCI_Print_statistics(); - - rtems_shutdown_executive( 0 ); -} diff --git a/testsuites/mptests/mp14/init.c b/testsuites/mptests/mp14/init.c deleted file mode 100644 index ac17a1236b..0000000000 --- a/testsuites/mptests/mp14/init.c +++ /dev/null @@ -1,191 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is a user initialization task and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#define TEST_INIT -#include "system.h" - -rtems_unsigned8 my_partition[0x30000] CPU_STRUCTURE_ALIGNMENT; - -rtems_timer_service_routine Stop_Test_TSR( - rtems_id ignored_id, - void *ignored_address -) -{ - Stop_Test = TRUE; -} - -rtems_task Init( - rtems_task_argument argument -) -{ - rtems_status_code status; - rtems_task_priority previous_priority; - - printf( - "\n\n*** TEST 14 -- NODE %d ***\n", - Multiprocessing_configuration.node - ); - - Stop_Test = FALSE; - - status = rtems_timer_create( - rtems_build_name('S', 'T', 'O', 'P'), - &timer_id - ); - directive_failed( status, "rtems_timer_create" ); - - status = rtems_timer_fire_after( - timer_id, - MAX_LONG_TEST_DURATION * TICKS_PER_SECOND, - Stop_Test_TSR, - NULL - ); - directive_failed( status, "rtems_timer_fire_after" ); - - Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' ); - Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' ); - - Queue_task_name[ 1 ] = rtems_build_name( 'M', 'T', '1', ' ' ); - Queue_task_name[ 2 ] = rtems_build_name( 'M', 'T', '2', ' ' ); - - Partition_task_name[ 1 ] = rtems_build_name( 'P', 'T', '1', ' ' ); - Partition_task_name[ 2 ] = rtems_build_name( 'P', 'T', '2', ' ' ); - - 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', ' ' ); - - Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' ); - - Partition_name[ 1 ] = rtems_build_name( 'P', 'A', 'R', ' ' ); - - Timer_name[ 1 ] = rtems_build_name( 'T', 'M', 'R', ' ' ); - - if ( Multiprocessing_configuration.node == 1 ) { - puts( "Creating Semaphore (Global)" ); - status = rtems_semaphore_create( - Semaphore_name[ 1 ], - 1, - RTEMS_GLOBAL, - RTEMS_NO_PRIORITY, - &Semaphore_id[ 1 ] - ); - directive_failed( status, "rtems_semaphore_create" ); - - puts( "Creating Message Queue (Global)" ); - status = rtems_message_queue_create( - Queue_name[ 1 ], - 1, - 16, - RTEMS_GLOBAL, - &Queue_id[ 1 ] - ); - directive_failed( status, "rtems_message_queue_create" ); - - puts( "Creating Partition (Global)" ); - status = rtems_partition_create( - Partition_name[ 1 ], - (void *)my_partition, - 0x8000, - 0x3800, - RTEMS_GLOBAL, - &Partition_id[ 1 ] - ); - directive_failed( status, "rtems_partition_create" ); - } - - puts( "Creating Event task (Global)" ); - status = rtems_task_create( - Task_name[ Multiprocessing_configuration.node ], - 2, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_TIMESLICE, - RTEMS_GLOBAL, - &Event_task_id[ 1 ] - ); - directive_failed( status, "rtems_task_create" ); - - puts( "Starting Event task (Global)" ); - status = rtems_task_start( Event_task_id[ 1 ], Test_task, 0 ); - directive_failed( status, "rtems_task_start" ); - - puts( "Creating Semaphore task (Global)" ); - status = rtems_task_create( - Semaphore_task_name[ Multiprocessing_configuration.node ], - 2, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_TIMESLICE, - RTEMS_GLOBAL, - &Semaphore_task_id[ 1 ] - ); - directive_failed( status, "rtems_task_create" ); - - puts( "Starting Semaphore task (Global)" ); - status = rtems_task_start( Semaphore_task_id[ 1 ], Semaphore_task, 0 ); - directive_failed( status, "rtems_task_start" ); - - puts( "Creating Message Queue task (Global)" ); - status = rtems_task_create( - Queue_task_name[ Multiprocessing_configuration.node ], - 2, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_TIMESLICE, - RTEMS_GLOBAL, - &Queue_task_id[ 1 ] - ); - directive_failed( status, "rtems_task_create" ); - - /* argument is index into Buffers */ - puts( "Starting Message Queue task (Global)" ); - status = rtems_task_start( Queue_task_id[ 1 ], Message_queue_task, 1 ); - directive_failed( status, "rtems_task_start" ); - - puts( "Creating Partition task (Global)" ); - status = rtems_task_create( - Partition_task_name[ Multiprocessing_configuration.node ], - 2, - RTEMS_MINIMUM_STACK_SIZE * 2, - RTEMS_TIMESLICE, - RTEMS_GLOBAL, - &Partition_task_id[ 1 ] - ); - directive_failed( status, "rtems_task_create" ); - - puts( "Starting Partition task (Global)" ); - status = rtems_task_start( Partition_task_id[ 1 ], Partition_task, 0 ); - directive_failed( status, "rtems_task_start" ); - - status = rtems_task_set_priority( RTEMS_SELF, 2, &previous_priority ); - directive_failed( status, "rtems_task_set_priority" ); - - status = rtems_task_ident( - RTEMS_SELF, - RTEMS_SEARCH_ALL_NODES, - &Task_id[ 1 ] - ); - directive_failed( status, "rtems_task_ident" ); - - Delayed_events_task( 1 ); -} diff --git a/testsuites/mptests/mp14/msgtask1.c b/testsuites/mptests/mp14/msgtask1.c deleted file mode 100644 index a8a3ddbd60..0000000000 --- a/testsuites/mptests/mp14/msgtask1.c +++ /dev/null @@ -1,107 +0,0 @@ -/* Message_queue_task - * - * This task continuously sends messages to and receives messages from - * a global message queue. The message buffer is viewed as an array - * of two sixty-four bit counts which are incremented when a message is - * received. - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include "system.h" - -rtems_task Message_queue_task( - rtems_task_argument index -) -{ - rtems_status_code status; - rtems_unsigned32 count; - rtems_unsigned32 yield_count; - rtems_unsigned32 *buffer_count; - rtems_unsigned32 *overflow_count; - rtems_unsigned32 size; - - 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 ) { - status = rtems_message_queue_ident( - Queue_name[ 1 ], - RTEMS_SEARCH_ALL_NODES, - &Queue_id[ 1 ] - ); - if ( status == RTEMS_SUCCESSFUL ) - break; - puts( "rtems_message_queue_ident FAILED!!" ); - rtems_task_wake_after(2); - } - - if ( Multiprocessing_configuration.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]; - } else { - 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-- ) { - status = rtems_message_queue_receive( - Queue_id[ 1 ], - (long (*)[4])Msg_buffer[ index ], - &size, - RTEMS_DEFAULT_OPTIONS, - RTEMS_NO_TIMEOUT - ); - directive_failed( status, "rtems_message_queue_receive" ); - - if ( *buffer_count == (rtems_unsigned32)0xffffffff ) { - *buffer_count = 0; - *overflow_count += 1; - } else - *buffer_count += 1; - - status = rtems_message_queue_send( - Queue_id[ 1 ], - (long (*)[4])Msg_buffer[ index ], - 16 - ); - directive_failed( status, "rtems_message_queue_send" ); - - if (Stop_Test == FALSE) - if ( Multiprocessing_configuration.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' ); - } - - Exit_test(); -} diff --git a/testsuites/mptests/mp14/node1/mp14.doc b/testsuites/mptests/mp14/node1/mp14.doc deleted file mode 100644 index 5ac3f7e47a..0000000000 --- a/testsuites/mptests/mp14/node1/mp14.doc +++ /dev/null @@ -1,50 +0,0 @@ -# -# $Id$ -# -# COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. -# On-Line Applications Research Corporation (OAR). -# All rights assigned to U.S. Government, 1994. -# -# This material may be reproduced by or for the U.S. Government pursuant -# to the copyright license under the clause at DFARS 252.227-7013. This -# notice must appear in all copies of this file and its derivatives. -# - - -This file describes the directives and concepts tested by this test set. - -test set name: test63 - -INTERRUPT SATURATION TEST - -directives: - ex_init, ex_start, t_create, t_start, t_ident, tm_tick, - tm_evwhen, tm_wkafter, i_return, ev_send, ev_receive - -concepts: - - a. Verifies system can create and start both the executive's system - initialization and idle task. - - b. Verifies executive can swap between three application tasks at the - same priority and the executive's internal idle task. - - c. Verifies printing of strings to the CRT on port 2 of the mvme136 board - using Print and Println in the board support package. - - d. Verifies printing of strings to the CRT on port 2 of the mvme136 board - using Write and Writeln and the TTY driver. - - e. Verifies interrupt handler can handler a task switch from an interrupt - as specified with the i_return directive. - - f. Verifies executive initialization performed correctly. - - g. Verifies the executive trap handler except for the halt function. - - h. Verifies that a task can get the task identification number of itself. - - i. Verifies that a task can get the task identification number - of another task. - - j. Verifies that events can be sent to a remote task. diff --git a/testsuites/mptests/mp14/node1/mp14.scn b/testsuites/mptests/mp14/node1/mp14.scn deleted file mode 100644 index f57c4f47b3..0000000000 --- a/testsuites/mptests/mp14/node1/mp14.scn +++ /dev/null @@ -1,41 +0,0 @@ -*** TEST 14 -- NODE 1 *** -Creating Semaphore (Global) -Creating Message Queue (Global) -Creating Partition (Global) -Creating Event task (Global) -Starting Event task (Global) -Creating Semaphore task (Global) -About to go to sleep! -Starting Semaphore task (Global) -Creating Message Queue task (Global) -Getting SMID of semaphore -Starting Message Queue task (Global) -Creating Partition task (Global) -Getting ID of msg queue -Starting Partition task (Global) -Getting ID of partition -Waking up! -Remote task's name is : 222 -Getting TID of remote task -Sending events to remote task -<stream of following characters> - -. - indicates 100 iterations of - tm_evafter of 1 tick and rtems_event_receive. - -e - indicates that 100 - events have been sent to the remote task. - -m - indicates 100 iterations of - rtems_message_queue_send and rtems_message_queue_receive. - -p - indicates 100 iterations of - rtems_partition_get_buffer and rtems_partition_return_buffer. - -s - indicates 100 iterations of - rtems_semaphore_obtain and rtems_semaphore_release. - -NOTES: 1. The messages could be interspersed. - 2. If one of the nodes exits first, the other may report - timeout errors on blocking directives. - diff --git a/testsuites/mptests/mp14/node2/mp14.doc b/testsuites/mptests/mp14/node2/mp14.doc deleted file mode 100644 index 0de40191c6..0000000000 --- a/testsuites/mptests/mp14/node2/mp14.doc +++ /dev/null @@ -1,13 +0,0 @@ -# -# $Id$ -# -# COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. -# On-Line Applications Research Corporation (OAR). -# All rights assigned to U.S. Government, 1994. -# -# This material may be reproduced by or for the U.S. Government pursuant -# to the copyright license under the clause at DFARS 252.227-7013. This -# notice must appear in all copies of this file and its derivatives. -# - - diff --git a/testsuites/mptests/mp14/node2/mp14.scn b/testsuites/mptests/mp14/node2/mp14.scn deleted file mode 100644 index d128c870e9..0000000000 --- a/testsuites/mptests/mp14/node2/mp14.scn +++ /dev/null @@ -1,38 +0,0 @@ -*** TEST 14 -- NODE 2 *** -Creating Event task (Global) -Starting Event task (Global) -Creating Semaphore task (Global) -About to go to sleep! -Starting Semaphore task (Global) -Creating Message Queue task (Global) -Getting SMID of semaphore -Starting Message Queue task (Global) -Creating Partition task (Global) -Getting ID of msg queue -Starting Partition task (Global) -Getting ID of partition -Waking up! -Remote task's name is : 111 -Getting TID of remote task -Receiving events from remote task -<stream of following characters> - -. - indicates 100 iterations of - tm_evafter of 1 tick and rtems_event_receive. - -e - indicates that 100 - events have been sent to the remote task. - -m - indicates 100 iterations of - rtems_message_queue_send and rtems_message_queue_receive. - -p - indicates 100 iterations of - rtems_partition_get_buffer and rtems_partition_return_buffer. - -s - indicates 100 iterations of - rtems_semaphore_obtain and rtems_semaphore_release. - -NOTES: 1. The messages could be interspersed. - 2. If one of the nodes exits first, the other may report - timeout errors on blocking directives. - diff --git a/testsuites/mptests/mp14/pttask1.c b/testsuites/mptests/mp14/pttask1.c deleted file mode 100644 index 6aa1c714fc..0000000000 --- a/testsuites/mptests/mp14/pttask1.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Partition_task - * - * This task continuously gets a buffer from and returns that buffer - * to a global partition. - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include "system.h" - -extern rtems_multiprocessing_table Multiprocessing_configuration; - -rtems_task Partition_task( - rtems_task_argument argument -) -{ - rtems_unsigned32 count; - rtems_status_code status; - rtems_unsigned32 yield_count; - void *buffer; - - puts( "Getting ID of partition" ); - while ( FOREVER ) { - status = rtems_partition_ident( - Partition_name[ 1 ], - RTEMS_SEARCH_ALL_NODES, - &Partition_id[ 1 ] - ); - - if ( status == RTEMS_SUCCESSFUL ) - break; - - puts( "rtems_partition_ident FAILED!!" ); - rtems_task_wake_after(2); - } - - yield_count = 100; - - while ( Stop_Test == FALSE ) { - 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 ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) { - status = rtems_task_wake_after( 1 ); - directive_failed( status, "rtems_task_wake_after" ); - yield_count = 100; - } - } - put_dot( 'p' ); - } - - Exit_test(); -} diff --git a/testsuites/mptests/mp14/smtask1.c b/testsuites/mptests/mp14/smtask1.c deleted file mode 100644 index 5bb14ee0da..0000000000 --- a/testsuites/mptests/mp14/smtask1.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Sm_test_task - * - * This task continuously obtains and releases a global semaphore. - * - * Input parameters: - * argument - task argument - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include "system.h" - -extern rtems_multiprocessing_table Multiprocessing_configuration; - -rtems_task Semaphore_task( - rtems_task_argument argument -) -{ - rtems_unsigned32 count; - rtems_status_code status; - rtems_unsigned32 yield_count; - - puts( "Getting SMID of semaphore" ); - while ( FOREVER ) { - status = rtems_semaphore_ident( - Semaphore_name[ 1 ], - RTEMS_SEARCH_ALL_NODES, - &Semaphore_id[ 1 ] - ); - if ( status == RTEMS_SUCCESSFUL ) - break; - puts( "rtems_semaphore_ident FAILED!!" ); - rtems_task_wake_after(2); - } - - yield_count = 100; - - while ( Stop_Test == FALSE ) { - - for ( count=SEMAPHORE_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) { - status = rtems_semaphore_obtain( - Semaphore_id[ 1 ], - RTEMS_DEFAULT_OPTIONS, - RTEMS_NO_TIMEOUT - ); - directive_failed( status, "rtems_semaphore_obtain" ); - - status = rtems_semaphore_release( Semaphore_id[ 1 ] ); - directive_failed( status, "rtems_semaphore_release" ); - - if ( Stop_Test == FALSE ) - if ( Multiprocessing_configuration.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' ); - } - - Exit_test(); -} diff --git a/testsuites/mptests/mp14/system.h b/testsuites/mptests/mp14/system.h deleted file mode 100644 index 051727e854..0000000000 --- a/testsuites/mptests/mp14/system.h +++ /dev/null @@ -1,115 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include <tmacros.h> - -/* functions */ - -rtems_timer_service_routine Delayed_send_event( - rtems_id timer_id, - void *ignored_address -); - -rtems_task Init( - rtems_task_argument argument -); - -rtems_task Test_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 Partition_task( - rtems_task_argument argument -); - -rtems_task Semaphore_task( - rtems_task_argument argument -); - -void Exit_test( void ); - -/* configuration information */ - -#define CONFIGURE_MPTEST - -#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_TICKS_PER_TIMESLICE 1 -#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(1) - -#if ( NODE_NUMBER == 1 ) -#define CONFIGURE_MAXIMUM_TIMERS 12 -#define CONFIGURE_MAXIMUM_SEMAPHORES 1 -#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1 -#define CONFIGURE_MAXIMUM_PARTITIONS 1 -#elif ( NODE_NUMBER == 2 ) -#define CONFIGURE_MAXIMUM_TIMERS 2 -#endif - -#include <confdefs.h> - -/* variables */ - -TEST_EXTERN rtems_id Event_task_id[ 2 ]; /* event task ids */ - -TEST_EXTERN rtems_id Semaphore_task_id[ 2 ]; /* semaphore task ids */ -TEST_EXTERN rtems_name Semaphore_task_name[ 2 ]; /* 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 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 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 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_unsigned32 Msg_buffer[ 4 ][ 4 ]; - -extern rtems_multiprocessing_table Multiprocessing_configuration; - -TEST_EXTERN volatile rtems_boolean Stop_Test; -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 - -/* end of include file */ |