summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/rtems++
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-08-10 13:28:50 +1000
committerChris Johns <chrisj@rtems.org>2016-08-11 17:24:06 +1000
commit03c1038edbe9b01a72d4775dcb6ffc1a03193a0c (patch)
treee82822781679566a6a824211492e8f8cd98f16b6 /testsuites/libtests/rtems++
parentbuild-system: Always enable C++ if the compiler is present. (diff)
downloadrtems-03c1038edbe9b01a72d4775dcb6ffc1a03193a0c.tar.bz2
librtems++: Remove from RTEMS.
This is old and there are better design patterns for threading and C++. We recommend you use the new C++ standards based support. Closes #2777.
Diffstat (limited to 'testsuites/libtests/rtems++')
-rw-r--r--testsuites/libtests/rtems++/Init.cc66
-rw-r--r--testsuites/libtests/rtems++/Makefile.am27
-rw-r--r--testsuites/libtests/rtems++/System.h135
-rw-r--r--testsuites/libtests/rtems++/Task1.cc631
-rw-r--r--testsuites/libtests/rtems++/Task2.cc82
-rw-r--r--testsuites/libtests/rtems++/Task3.cc82
-rw-r--r--testsuites/libtests/rtems++/rtems++.doc26
-rw-r--r--testsuites/libtests/rtems++/rtems++.scn149
8 files changed, 0 insertions, 1198 deletions
diff --git a/testsuites/libtests/rtems++/Init.cc b/testsuites/libtests/rtems++/Init.cc
deleted file mode 100644
index 88bb3bb844..0000000000
--- a/testsuites/libtests/rtems++/Init.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1997
- * Objective Design Systems Ltd Pty (ODS)
- * All rights reserved (R) Objective Design Systems Ltd Pty
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#define CONFIGURE_INIT
-#include "System.h"
-
-const char rtems_test_name[] = "RTEMS++";
-
-// make global so it lasts past the Init task's stack's life time
-Task1 task_1;
-
-rtems_task Init(rtems_task_argument )
-{
- TEST_BEGIN();
-
- printf( "INIT - Task.create() - " );
- task_1.create("TA1 ", 0, RTEMS_MINIMUM_STACK_SIZE);
- printf("%s\n", task_1.last_status_string());
-
- printf( "INIT - Task.create() - " );
- task_1.create("TA1 ", 10, RTEMS_MINIMUM_STACK_SIZE * 6);
- printf("%s\n", task_1.last_status_string());
-
- printf( "INIT - Task.create() - " );
- task_1.create("TA1 ", 10, RTEMS_MINIMUM_STACK_SIZE * 6);
- printf("%s\n", task_1.last_status_string());
-
- printf( "INIT - Task.restart() - " );
- task_1.restart(0);
- printf("%s\n", task_1.last_status_string());
-
- printf( "INIT - Task.start(0xDEADDEAD) - " );
- task_1.start(0xDEADDEAD);
- printf("%s\n", task_1.last_status_string());
-
- printf("INIT - Destroy it's self\n");
-
- // needs to be in C, no C++ object owns the Init task
- rtems_status_code status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
-}
-
-
-
diff --git a/testsuites/libtests/rtems++/Makefile.am b/testsuites/libtests/rtems++/Makefile.am
deleted file mode 100644
index f1a230a78b..0000000000
--- a/testsuites/libtests/rtems++/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-
-if HAS_CXX
-rtems_tests_PROGRAMS = rtems++
-rtems___SOURCES = Init.cc Task1.cc Task2.cc Task3.cc System.h
-endif
-
-dist_rtems_tests_DATA = rtems++.scn
-dist_rtems_tests_DATA += rtems++.doc
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-if HAS_CXX
-rtems___LDLIBS = -lrtems++
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-
-LINK_OBJS = $(rtems___OBJECTS)
-LINK_LIBS = $(rtems___LDLIBS)
-
-rtems++$(EXEEXT): $(rtems___OBJECTS) $(rtems___DEPENDENCIES)
- @rm -f rtems++$(EXEEXT)
- $(make-cxx-exe)
-endif
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/libtests/rtems++/System.h b/testsuites/libtests/rtems++/System.h
deleted file mode 100644
index e787fe21be..0000000000
--- a/testsuites/libtests/rtems++/System.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* system.h
- *
- * This include file contains information that is included in every
- * function in the test set.
- *
- * COPYRIGHT (c) 1989-2008.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include <tmacros.h>
-#include <rtems++/rtemsEvent.h>
-#include <rtems++/rtemsMessageQueue.h>
-#include <rtems++/rtemsTask.h>
-#include <rtems++/rtemsTaskMode.h>
-
-/* functions */
-
-extern "C"
-{
- rtems_task Init(
- rtems_task_argument argument
- );
-}
-
-rtems_timer_service_routine Delayed_routine(
- rtems_id ignored_id,
- void *ignored_address
-);
-
-class Task1
- : public rtemsTask
-{
- void print_mode(rtems_mode mode, rtems_mode mask);
-
- void screen1(void);
- void screen2(void);
- void screen3(void);
- void screen4(void);
- void screen5(void);
- void screen6(void);
-
-protected:
- virtual void body(rtems_task_argument argument);
-
-public:
-};
-
-class Task2
- : public rtemsTask
-{
- void screen4(void);
-
-protected:
- virtual void body(rtems_task_argument argument);
-
-public:
- Task2(const char* name,
- const rtems_task_priority initial_priority,
- const uint32_t stack_size);
-};
-
-class Task3
- : public rtemsTask
-{
- void screen6(void);
-
-protected:
- virtual void body(rtems_task_argument argument);
-
-public:
- Task3(const char* name,
- const rtems_task_priority initial_priority,
- const uint32_t stack_size);
-};
-
-class EndTask
- : public rtemsTask
-{
-protected:
- virtual void body(rtems_task_argument argument);
-
-public:
- EndTask(const char* name,
- const rtems_task_priority initial_priority,
- const uint32_t stack_size);
-};
-
-#if 0
-
-//
-// Not sure this can be tested in a generic manner, any ideas anyone !!
-//
-
-class Service_routine
- : public rtemsInterrupt
-{
-};
-
-class Io_during_interrupt
- : pubic rtemsTimer
-{
-
-};
-
-#endif
-
-/* configuration information */
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 8
-#define CONFIGURE_MAXIMUM_TIMERS 1
-#define CONFIGURE_MAXIMUM_SEMAPHORES 2
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
-#define CONFIGURE_MAXIMUM_PARTITIONS 1
-#define CONFIGURE_MAXIMUM_REGIONS 1
-#define CONFIGURE_MAXIMUM_PERIODS 1
-#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0
-#define CONFIGURE_TICKS_PER_TIMESLICE 100
-
-#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_INIT_TASK_STACK_SIZE (4 * RTEMS_MINIMUM_STACK_SIZE)
-
-#define CONFIGURE_EXTRA_TASK_STACKS (13 * RTEMS_MINIMUM_STACK_SIZE)
-
-#include <rtems/confdefs.h>
-
-/* end of include file */
diff --git a/testsuites/libtests/rtems++/Task1.cc b/testsuites/libtests/rtems++/Task1.cc
deleted file mode 100644
index 02c1746e0c..0000000000
--- a/testsuites/libtests/rtems++/Task1.cc
+++ /dev/null
@@ -1,631 +0,0 @@
-/* Task1
- *
- * This task is the main line for the test. It creates other
- * tasks which can create
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1997
- * Objective Design Systems Ltd Pty (ODS)
- * All rights reserved (R) Objective Design Systems Ltd Pty
- *
- * COPYRIGHT (c) 1989-2007.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include "System.h"
-
-/* c.f. cpukit/score/include/rtems/score/priority.h */
-#define PRIiPriority_Control PRIi32
-/* rtems_task_priority is a typedef to Priority_Control */
-#define PRIirtems_task_priority PRIiPriority_Control
-
-/* c.f. cpukit/rtems/include/rtems/rtems/modes.h */
-#define PRIXModes_Control PRIX32
-#define PRIiModes_Control PRIi32
-/* rtems_mode is a typedef to Modes_Control */
-#define PRIXrtems_mode PRIXModes_Control
-#define PRIirtems_mode PRIiModes_Control
-
-/* c.f. cpukit/score/include/rtems/score/isr.h */
-#define PRIiISR_Level PRIi32
-/* rtems_interrupt_level is a typedef to ISR_Level */
-#define PRIirtems_interrupt_level PRIiISR_Level
-
-void Task1::body(rtems_task_argument argument)
-{
- rtems_test_pause_and_screen_number(1);
-
- printf(" START Task Class test\n");
-
- printf("%s - test argument - ", name_string());
- if (argument != 0xDEADDEAD)
- printf("argument is not 0xDEADDEAD\n");
- else
- printf("argument matched\n");
-
- screen1();
- rtems_test_pause_and_screen_number(2);
-
- screen2();
- rtems_test_pause_and_screen_number(3);
-
- screen3();
- rtems_test_pause_and_screen_number(4);
-
- screen4();
- rtems_test_pause_and_screen_number(5);
-
- screen5();
- rtems_test_pause_and_screen_number(6);
-
- screen6();
-
- // do not call exit(0) from this thread as this object is static
- // the static destructor call delete the task which is calling exit
- // so exit never completes
-
- EndTask end_task("ENDT", (rtems_task_priority) 1, RTEMS_MINIMUM_STACK_SIZE * 6);
- end_task.start(0);
-
- rtemsEvent block_me;
- rtems_event_set out;
-
- block_me.receive(RTEMS_SIGNAL_0, out);
-
- printf("**** TASK 1 did not block ????\n");
-}
-
-void Task1::screen1(void)
-{
- // create two local task objects to connect to this task
- rtemsTask local_task_1 = *this;
- rtemsTask local_task_2;
-
- local_task_2 = *this;
-
- // check the copy constructor works
- printf("%s - copy constructor - ", name_string());
- if (local_task_1.id_is() == id_is())
- printf("local and this id's match\n");
- else
- printf("local and this id's do not match\n");
-
- printf("%s - copy constructor - ", name_string());
- if (local_task_1.name_is() == name_is())
- printf("local and this name's match\n");
- else
- printf("local and this name's do not match\n");
-
- // check the copy operator works
- printf("%s - copy operator - ", name_string());
- if (local_task_2.id_is() == id_is())
- printf("local and this id's match\n");
- else
- printf("local and this id's do not match\n");
- printf("%s - copy operator - ", name_string());
- if (local_task_2.name_is() == name_is())
- printf("local and this name's match\n");
- else
- printf("local and this name's do not match\n");
-
- // check that the owner of the id cannot delete this task
- printf("%s - not owner destroy's task - ", local_task_1.name_string());
- local_task_1.destroy();
- printf("%s\n", local_task_1.last_status_string());
-
- // connect to a valid task
- printf("%s - connect to a local valid task name - ", local_task_2.name_string());
- local_task_2.connect("TA1 ", RTEMS_SEARCH_ALL_NODES);
- printf("%s\n", local_task_2.last_status_string());
-
- // connect to an invalid task
- printf("%s - connect to an invalid task name - ", local_task_2.name_string());
- local_task_2.connect("BADT", RTEMS_SEARCH_ALL_NODES);
- printf("%s\n", local_task_2.last_status_string());
-
- // connect to a task an invalid node
- printf("%s - connect to a task on an invalid node - ", local_task_2.name_string());
- local_task_2.connect("BADT", 10);
- printf("%s\n", local_task_2.last_status_string());
-
- // restart this task
- printf("%s - restart from a non-owner - ", name_string());
- local_task_1.restart(0);
- printf("%s\n", local_task_1.last_status_string());
-}
-
-void Task1::screen2(void)
-{
- // wake after using this object
-
- printf("%s - wake after 0 secs - ", name_string());
- wake_after(0);
- printf("%s\n", last_status_string());
-
- printf("%s - wake after 500 msecs - ", name_string());
- wake_after(500000);
- printf("%s\n", last_status_string());
-
- printf("%s - wake after 5 secs - ", name_string());
- wake_after(5000000);
- printf("%s\n", last_status_string());
-
- printf("%s - wake when - to do\n", name_string());
-
- rtemsTask task_1 = *this;
-
- // wake after using a connected object
-
- printf("%s - connected object wake after 0 secs - ", task_1.name_string());
- task_1.wake_after(0);
- printf("%s\n", task_1.last_status_string());
-
- printf("%s - connected object wake after 500 msecs - ", task_1.name_string());
- task_1.wake_after(500000);
- printf("%s\n", task_1.last_status_string());
-
- printf("%s - connected object wake after 5 secs - ", task_1.name_string());
- task_1.wake_after(5000000);
- printf("%s\n", task_1.last_status_string());
-
- printf("%s - connected object wake when - to do\n", task_1.name_string());
-
- rtemsTask task_2;
-
- // wake after using a self object
-
- printf("%s - self object wake after 0 secs - ", task_2.name_string());
- task_2.wake_after(0);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - self object wake after 500 msecs - ", task_2.name_string());
- task_2.wake_after(500000);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - self object wake after 5 secs - ", task_2.name_string());
- task_2.wake_after(5000000);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - self object wake when - to do\n", task_2.name_string());
-
- rtems_task_priority current_priority;
- rtems_task_priority priority;
-
- // priorities with this object
-
- printf("%s - get priority - ", name_string());
- get_priority(current_priority);
- printf("%s, priority is %" PRIirtems_task_priority "\n", last_status_string(), current_priority);
-
- printf("%s - set priority to 512 - ", name_string());
- set_priority(512);
- printf("%s\n", last_status_string());
-
- printf("%s - set priority to 25 - ", name_string());
- set_priority(25);
- printf("%s\n", last_status_string());
-
- printf("%s - set priority to original - ", name_string());
- set_priority(current_priority, priority);
- printf("%s, priority was %" PRIirtems_task_priority "\n", last_status_string(), priority);
-
- // priorities with connected object
-
- printf("%s - connected object get priority - ", task_1.name_string());
- task_1.get_priority(current_priority);
- printf("%s, priority is %" PRIirtems_task_priority "\n", task_1.last_status_string(), current_priority);
-
- printf("%s - connected object set priority to 512 - ", task_1.name_string());
- task_1.set_priority(512);
- printf("%s\n", task_1.last_status_string());
-
- printf("%s - connected object set priority to 25 - ", task_1.name_string());
- task_1.set_priority(25);
- printf("%s\n", task_1.last_status_string());
-
- printf("%s - connected object set priority to original - ", task_1.name_string());
- task_1.set_priority(current_priority, priority);
- printf("%s, priority was %" PRIirtems_task_priority "\n", task_1.last_status_string(), priority);
-
- // priorities with self object
-
- printf("%s - self object get priority - ", task_2.name_string());
- task_2.get_priority(current_priority);
- printf("%s, priority is %" PRIirtems_task_priority "\n", task_2.last_status_string(), current_priority);
-
- printf("%s - self object set priority to 512 - ", task_2.name_string());
- task_2.set_priority(512);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - self object set priority to 25 - ", task_2.name_string());
- task_2.set_priority(25);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - self object set priority to original - ", task_2.name_string());
- task_2.set_priority(current_priority, priority);
- printf("%s, priority was %" PRIirtems_task_priority "\n", task_2.last_status_string(), priority);
-
- printf(" END Task Class test\n");
-}
-
-#define RTEMS_ALL_MODES (RTEMS_PREEMPT_MASK | \
- RTEMS_TIMESLICE_MASK | \
- RTEMS_ASR_MASK | \
- RTEMS_INTERRUPT_MASK)
-
-void Task1::screen3(void)
-{
- printf(" START TaskMode Class test\n");
-
- rtemsTask self;
- rtemsTaskMode task_mode;
- rtems_mode current_mode;
- rtems_mode mode;
-
- printf("%s - get mode - ", self.name_string());
- task_mode.get_mode(current_mode);
- printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), current_mode);
- print_mode(current_mode, RTEMS_ALL_MODES);
- printf("\n");
-
- // PREEMPTION mode control
-
- printf("%s - get preemption state - ", self.name_string());
- task_mode.get_preemption_state(mode);
- printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_PREEMPT_MASK);
- printf("\n");
-
- printf("%s - set preemption state to RTEMS_PREEMPT - ", self.name_string());
- task_mode.set_preemption_state(RTEMS_PREEMPT);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- printf("%s - set preemption state to RTEMS_NO_PREEMPT - ", self.name_string());
- task_mode.set_preemption_state(RTEMS_NO_PREEMPT);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- // TIMESLICE mode control
-
- printf("%s - get timeslice state - ", self.name_string());
- task_mode.get_timeslice_state(mode);
- printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_TIMESLICE_MASK);
- printf("\n");
-
- printf("%s - set timeslice state to RTEMS_TIMESLICE - ", self.name_string());
- task_mode.set_timeslice_state(RTEMS_TIMESLICE);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- printf("%s - set timeslice state to RTEMS_NO_TIMESLICE - ", self.name_string());
- task_mode.set_timeslice_state(RTEMS_NO_TIMESLICE);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- // ASR mode control
-
- printf("%s - get asr state - ", self.name_string());
- task_mode.get_asr_state(mode);
- printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ASR_MASK);
- printf("\n");
-
- printf("%s - set asr state to RTEMS_ASR - ", self.name_string());
- task_mode.set_asr_state(RTEMS_ASR);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- printf("%s - set asr state to RTEMS_NO_ASR - ", self.name_string());
- task_mode.set_asr_state(RTEMS_NO_ASR);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- // interrupt level control
-
- rtems_interrupt_level current_level;
- rtems_interrupt_level level;
-
- printf("%s - get current interrupt level - ", self.name_string());
- task_mode.get_interrupt_level(current_level);
- printf("%s, level is %" PRIirtems_interrupt_level "\n", task_mode.last_status_string(), current_level);
-
- printf("%s - set interrupt level to 102 - ", self.name_string());
- task_mode.set_interrupt_level(102);
- printf("%s\n", task_mode.last_status_string());
-
- printf("%s - set interrupt level to original level - ", self.name_string());
- task_mode.set_interrupt_level(current_level, level);
- printf("%s, level was %" PRIirtems_interrupt_level "\n", task_mode.last_status_string(), level);
-
- printf("%s - set mode to original mode - ", self.name_string());
- task_mode.set_mode(current_mode,
- RTEMS_PREEMPT_MASK | RTEMS_TIMESLICE_MASK |
- RTEMS_ASR_MASK | RTEMS_INTERRUPT_MASK);
- task_mode.get_mode(mode);
- printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
- print_mode(mode, RTEMS_ALL_MODES);
- printf("\n");
-
- printf(" END TaskMode Class test\n");
-}
-
-void Task1::screen4(void)
-{
- printf(" START Event Class test\n");
-
- printf("%s - create task 2 - ", name_string());
- Task2 task_2("TA2", (rtems_task_priority) 9, RTEMS_MINIMUM_STACK_SIZE * 6);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - start task 2 - ", name_string());
- task_2.start(0);
- printf("%s\n", task_2.last_status_string());
-
- printf("%s - construct event connecting to task 2 - ", name_string());
- rtemsEvent event_2("TA2 ");
- printf("%s\n", event_2.last_status_string());
-
- // wait for task 2 to complete its timeout tests
- wake_after(7000000);
-
- printf("%s - send event signal 0 using the task id - ", name_string());
- event_2.send(task_2.id_is(), RTEMS_SIGNAL_0);
- printf("%s\n", event_2.last_status_string());
-
- wake_after(1000000);
-
- printf("%s - send event signal 0 using the task object reference - ", name_string());
- event_2.send(task_2, RTEMS_SIGNAL_0);
- printf("%s\n", event_2.last_status_string());
-
- wake_after(1000000);
-
- printf("%s - send event signal 31 using connected id - ", name_string());
- event_2.send(RTEMS_SIGNAL_31);
- printf("%s\n", event_2.last_status_string());
-
- wake_after(1000000);
-
- rtemsEvent event_2_2;
-
- event_2_2.connect("TA2");
-
- printf("%s - send event signal 0 and 31 - ", name_string());
- event_2_2.send(task_2, RTEMS_SIGNAL_0 | RTEMS_SIGNAL_31);
- printf("%s\n", event_2_2.last_status_string());
-
- printf("%s - waiting 5 secs for TA2 to finish\n", name_string());
- wake_after(500000);
-
- printf(" END Event Class test\n");
-}
-
-void Task1::screen5(void)
-{
- printf(" START Interrupt Class test\n");
-
- printf(" do not know a portable BSP type interrupt test\n");
-
- printf(" END Interrupt Class test\n");
-}
-
-void Task1::screen6(void)
-{
- printf(" START MessageQueue Class test\n");
-
- printf("%s - construct message queue 1 with no memory error - ", name_string());
- rtemsMessageQueue mq_1("MQ1", 1000000, 1000);
- printf("%s\n", mq_1.last_status_string());
-
- printf("%s - construct/create message queue 2 - ", name_string());
- rtemsMessageQueue mq_2("MQ2", 4, 50);
- printf("%s\n", mq_2.last_status_string());
-
- const char *u1 = "normal send";
- const char *u2 = "urgent send";
- char in[100];
- size_t size;
- uint32_t count;
-
- printf("%s - send u1 to mq_2 - ", name_string());
- mq_2.send(u1, strlen(u1) + 1);
- printf("%s\n", mq_2.last_status_string());
-
- printf("%s - urgent send u2 to mq_2 - ", name_string());
- mq_2.urgent(u2, strlen(u2) + 1);
- printf("%s\n", mq_2.last_status_string());
-
- printf("%s - create task 3_1 - ", name_string());
- Task3 task_3_1("TA31", 9, RTEMS_MINIMUM_STACK_SIZE * 6);
- printf("%s\n", task_3_1.last_status_string());
-
- printf("%s - start task 3_1 - ", name_string());
- task_3_1.start(0);
- printf("%s\n", task_3_1.last_status_string());
-
- printf("%s - create task 3_2 - ", name_string());
- Task3 task_3_2("TA32", 9, RTEMS_MINIMUM_STACK_SIZE * 6);
- printf("%s\n", task_3_2.last_status_string());
-
- printf("%s - start task 3_2 - ", name_string());
- task_3_2.start(0);
- printf("%s\n", task_3_1.last_status_string());
-
- wake_after(1000000);
-
- printf("%s - receive u2 on mq_2 ...\n", name_string()); fflush(stdout);
- mq_2.receive(in, size, 5000000);
- printf("%s - %s\n", name_string(), mq_2.last_status_string());
-
- if (size == (strlen(u2) + 5))
- {
- if ((strncmp(in, task_3_1.name_string(), 4) == 0) &&
- (strcmp(in + 4, u2) == 0))
- {
- printf("%s - message u2 received correctly\n", name_string());
- }
- else
- {
- printf("%s - message u2 received incorrectly, message='%s', size=%zu\n",
- name_string(), in, size);
- }
- }
- else
- printf("%s - message u2 size incorrect, size=%zu\n", name_string(), size);
-
- printf("%s - receive u1 on mq_2 ...\n", name_string()); fflush(stdout);
- mq_2.receive(in, size, 5000000);
- printf("%s - %s\n", name_string(), mq_2.last_status_string());
-
- if (size == (strlen(u1) + 5))
- {
- if ((strncmp(in, task_3_2.name_string(), 4) == 0) &&
- (strcmp(in + 4, u1) == 0))
- {
- printf("%s - message u1 received correctly\n", name_string());
- }
- else
- {
- printf("%s - message u1 received incorrectly, message='%s', size=%zu\n",
- name_string(), in, size);
- }
- }
- else
- printf("%s - message u1 size incorrect, size=%zu\n", name_string(), size);
-
- wake_after(3000000);
-
- const char *b1 = "broadcast message";
-
- printf("%s - broadcast send b1 ...\n", name_string());
- mq_2.broadcast(b1, strlen(b1) + 1, count);
- printf("%s - mq_2 broadcast send - %s, count=%" PRIi32 "\n",
- name_string(), mq_2.last_status_string(), count);
-
- wake_after(1000000);
-
- printf("%s - receive message b1 on mq_2 from %s...\n",
- name_string(), task_3_1.name_string()); fflush(stdout);
- mq_2.receive(in, size, 5000000);
- printf("%s - %s\n", name_string(), mq_2.last_status_string());
-
- if (size == (strlen(b1) + 5))
- {
- if ((strncmp(in, task_3_1.name_string(), 4) == 0) &&
- (strcmp(in + 4, b1) == 0))
- {
- printf("%s - message b1 received correctly\n", name_string());
- }
- else
- {
- printf("%s - message b1 received incorrectly, message='%s'\n",
- name_string(), in);
- }
- }
- else
- printf("%s - message b1 size incorrect, size=%zu\n", name_string(), size);
-
- printf("%s - receive message b1 on mq_2 from %s...\n",
- name_string(), task_3_1.name_string()); fflush(stdout);
- mq_2.receive(in, size, 5000000);
- printf("%s - %s\n", name_string(), mq_2.last_status_string());
-
- if (size == (strlen(b1) + 5))
- {
- if ((strncmp(in, task_3_2.name_string(), 4) == 0) &&
- (strcmp(in + 4, b1) == 0))
- {
- printf("%s - message b1 received correctly\n", name_string());
- }
- else
- {
- printf("%s - message b1 received incorrectly, message='%s', size=%zu\n",
- name_string(), in, size);
- }
- }
- else
- printf("%s - message b1 size incorrect, size=%zu\n", name_string(), size);
-
- // wait for task 3_1, and 3_2 to complete their timeout tests, will
- // start these after getting the broadcast message
- wake_after(7000000);
-
- const char *f1 = "flush message";
-
- printf("%s - send f1 to mq_2 - ", name_string());
- mq_2.send(f1, strlen(f1) + 1);
- printf("%s\n", mq_2.last_status_string());
-
- printf("%s - send f1 to mq_2 - ", name_string());
- mq_2.send(f1, strlen(f1) + 1);
- printf("%s\n", mq_2.last_status_string());
-
- printf("%s - send f1 to mq_2 - ", name_string());
- mq_2.send(f1, strlen(f1) + 1);
- printf("%s\n", mq_2.last_status_string());
-
- printf("%s - flush mq_2 - ", name_string());
- mq_2.flush(count);
- printf("%s, flushed=%" PRIi32 "\n", mq_2.last_status_string(), count);
-
- printf(" END MessageQueue Class test\n");
-}
-
-void Task1::print_mode(rtems_mode mode, rtems_mode mask)
-{
- rtemsTaskMode task_mode;
- if (mask & RTEMS_PREEMPT_MASK)
- printf("RTEMS_%sPREEMPT ",
- task_mode.preemption_set(mode) ? "" : "NO_");
- if (mask & RTEMS_TIMESLICE_MASK)
- printf("RTEMS_%sTIMESLICE ",
- task_mode.preemption_set(mode) ? "" : "NO_");
- if (mask & RTEMS_ASR_MASK)
- printf("RTEMS_%sASR ",
- task_mode.asr_set(mode) ? "" : "NO_");
- if (mask & RTEMS_INTERRUPT_MASK)
- printf("INTMASK=%" PRIirtems_mode,
- mode & RTEMS_INTERRUPT_MASK);
-}
-
-EndTask::EndTask(const char* name,
- const rtems_task_priority initial_priority,
- const uint32_t stack_size)
- : rtemsTask(name, initial_priority, stack_size, RTEMS_NO_PREEMPT)
-{
-}
-
-void EndTask::body(rtems_task_argument)
-{
- TEST_END();
- exit(0);
-}
-
diff --git a/testsuites/libtests/rtems++/Task2.cc b/testsuites/libtests/rtems++/Task2.cc
deleted file mode 100644
index a08a57d8dc..0000000000
--- a/testsuites/libtests/rtems++/Task2.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Task_2
- *
- * This routine serves as a test task. Its only purpose is to generate the
- * error where a semaphore is deleted while a task is waiting for it.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "System.h"
-
-Task2::Task2(const char* name,
- const rtems_task_priority initial_priority,
- const uint32_t stack_size)
- : rtemsTask(name, initial_priority, stack_size, RTEMS_NO_PREEMPT)
-{
-}
-
-void Task2::body(rtems_task_argument )
-{
- screen4();
-
- printf("%s - destroy itself\n", name_string());
- destroy();
-}
-
-void Task2::screen4()
-{
- rtemsEvent event;
-
- // block waiting for any event
- rtems_event_set out;
-
- printf("%s - event no wait - ", name_string());
- event.receive(RTEMS_SIGNAL_0, out, 0, rtemsEvent::no_wait);
- printf("%s\n", event.last_status_string());
-
- printf("%s - event 5 secs timeout - ", name_string()); fflush(stdout);
- event.receive(RTEMS_SIGNAL_0, out, 5000000);
- printf("%s\n", event.last_status_string());
-
- // send using task id
- printf("%s - event wait forever for signal 0 from TA1 ....\n", name_string());
- event.receive(RTEMS_SIGNAL_0, out);
- printf("%s - %s, signals out are 0x%08" PRIX32 "\n", name_string(), event.last_status_string(), out);
-
- // send using task object reference
- printf("%s - event wait forever for signal 0 from TA1 ....\n", name_string());
- event.receive(RTEMS_SIGNAL_0, out);
- printf("%s - %s, signals out are 0x%08" PRIX32 "\n", name_string(), event.last_status_string(), out);
-
- printf("%s - event wait forever for signal 31 from TA1 ....\n", name_string());
- event.receive(RTEMS_SIGNAL_31, out);
- printf("%s - %s, signals out are 0x%08" PRIX32 "\n", name_string(), event.last_status_string(), out);
-
- printf("%s - event wait forever for signal 0 and 31 from TA1 ....\n", name_string());
- event.receive(RTEMS_SIGNAL_0 | RTEMS_SIGNAL_31, out, 0, rtemsEvent::wait, rtemsEvent::all);
- printf("%s - %s, signals out are 0x%08" PRIX32 "\n", name_string(), event.last_status_string(), out);
-
- printf("%s - send event signal 1 - ", name_string());
- event.send(RTEMS_SIGNAL_1);
- printf("%s\n", event.last_status_string());
-
- printf("%s - event wait forever for signal 1 from TA2 - ", name_string());
- event.receive(RTEMS_SIGNAL_1, out, 0, rtemsEvent::wait, rtemsEvent::all);
- printf("%s, signals out are 0x%08" PRIX32 "\n", event.last_status_string(), out);
-}
-
-
diff --git a/testsuites/libtests/rtems++/Task3.cc b/testsuites/libtests/rtems++/Task3.cc
deleted file mode 100644
index ec453df55e..0000000000
--- a/testsuites/libtests/rtems++/Task3.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Task_3
- *
- * This routine serves as a test task. Loopback the messages and test
- * timeouts
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-2007.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "System.h"
-
-Task3::Task3(const char* name,
- const rtems_task_priority initial_priority,
- const uint32_t stack_size)
- : rtemsTask(name, initial_priority, stack_size, RTEMS_NO_PREEMPT)
-{
-}
-
-void Task3::body(rtems_task_argument )
-{
- screen6();
-
- printf("%s - destroy itself\n", name_string());
- destroy();
-}
-
-void Task3::screen6()
-{
- rtemsMessageQueue mq_2("MQ2");
- printf("%s - construction connect mq_2 - %s\n", name_string(), mq_2.last_status_string());
-
- if (mq_2.successful())
- {
- char in[100];
- char out[100];
- size_t size;
- bool loopback = true;
-
- while (loopback)
- {
- printf("%s - loopback from mq_2 to mq_2 ...\n", name_string()); fflush(stdout);
-
- mq_2.receive(in, size);
- printf("%s - mq_2 receive - %s, size=%zu, message string size=%zu\n",
- name_string(), mq_2.last_status_string(), size, strlen(in));
- if (mq_2.successful())
- {
- if (size > (100 - 5))
- printf("%s - size to large\n", name_string());
- else
- {
- strcpy(out, name_string());
- strcpy(out + 4, in);
-
- printf("%s - loopback to mq_2 - ", name_string());
- mq_2.send(out, strlen(out) + 1);
- printf("%s\n", mq_2.last_status_string());
- }
-
- if (strcmp(in, "broadcast message") == 0)
- loopback = false;
- else
- wake_after(1500000);
- }
- }
- }
-}
-
-
diff --git a/testsuites/libtests/rtems++/rtems++.doc b/testsuites/libtests/rtems++/rtems++.doc
deleted file mode 100644
index c90cfbb79a..0000000000
--- a/testsuites/libtests/rtems++/rtems++.doc
+++ /dev/null
@@ -1,26 +0,0 @@
-# COPYRIGHT (c) 1997
-# Objective Design Systems Ltd Pty (ODS)
-# All rights reserved (R) Objective Design Systems Ltd Pty
-#
-# The license and distribution terms for this file may be found in the
-# file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
-#
-
-The file describes the directives and concepts tested by this test set.
-
-test set name: rtems++
-
-classes:
- rtemsTask, rtemsTaskMode, rtemsEvent, rtemsMessageQueue
-
-concepts:
-
- a. Verify each class tested can be constructed using each of the constructors.
-
- b. Verify each class can be an owner of an object id if capable.
-
- c. Verify each class can connect to an existing object id if capable.
-
- d. Verify the operation of each method of each class.
-
diff --git a/testsuites/libtests/rtems++/rtems++.scn b/testsuites/libtests/rtems++/rtems++.scn
deleted file mode 100644
index 0ac7c9c172..0000000000
--- a/testsuites/libtests/rtems++/rtems++.scn
+++ /dev/null
@@ -1,149 +0,0 @@
-
-
-*** RTEMS++ TEST ***
-INIT - Task.create() - RTEMS[19] invalid thread priority
-INIT - Task.create() - RTEMS[00] successful completion
-INIT - Task.create() - RTEMS[16] illegal on calling thread
-INIT - Task.restart() - RTEMS[14] thread is in wrong state
-INIT - Task.start(0xDEADDEAD) - RTEMS[00] successful completion
-INIT - Destroy it's self
-<pause - screen 1>
- START Task Class test
-TA1 - test argument - argument matched
-TA1 - copy constructor - local and this id's match
-TA1 - copy constructor - local and this name's match
-TA1 - copy operator - local and this id's match
-TA1 - copy operator - local and this name's match
-TA1 - not owner destroy's task - RTEMS[23] not owner of resource
-TA1 - connect to a local valid task name - RTEMS[00] successful completion
-TA1 - connect to an invalid task name - RTEMS[03] invalid object name
-SELF - connect to a task on an invalid node - RTEMS[03] invalid object name
-TA1 - restart from a non-owner - RTEMS[23] not owner of resource
-<pause - screen 2>
-TA1 - wake after 0 secs - RTEMS[00] successful completion
-TA1 - wake after 500 msecs - RTEMS[00] successful completion
-TA1 - wake after 5 secs - RTEMS[00] successful completion
-TA1 - wake when - to do
-TA1 - connected object wake after 0 secs - RTEMS[00] successful completion
-TA1 - connected object wake after 500 msecs - RTEMS[00] successful completion
-TA1 - connected object wake after 5 secs - RTEMS[00] successful completion
-TA1 - connected object wake when - to do
-SELF - self object wake after 0 secs - RTEMS[00] successful completion
-SELF - self object wake after 500 msecs - RTEMS[00] successful completion
-SELF - self object wake after 5 secs - RTEMS[00] successful completion
-SELF - self object wake when - to do
-TA1 - get priority - RTEMS[00] successful completion, priority is 10
-TA1 - set priority to 512 - RTEMS[19] invalid thread priority
-TA1 - set priority to 25 - RTEMS[00] successful completion
-TA1 - set priority to original - RTEMS[00] successful completion, priority was 25
-TA1 - connected object get priority - RTEMS[00] successful completion, priority is 10
-TA1 - connected object set priority to 512 - RTEMS[19] invalid thread priority
-TA1 - connected object set priority to 25 - RTEMS[00] successful completion
-TA1 - connected object set priority to original - RTEMS[00] successful completion, priority was 25
-SELF - self object get priority - RTEMS[00] successful completion, priority is 10
-SELF - self object set priority to 512 - RTEMS[19] invalid thread priority
-SELF - self object set priority to 25 - RTEMS[00] successful completion
-SELF - self object set priority to original - RTEMS[00] successful completion, priority was 25
- END Task Class test
-<pause - screen 3>
- START TaskMode Class test
-SELF - get mode - RTEMS[00] successful completion,
- mode is 0x00000500, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_ASR INTMASK=0
-SELF - get preemption state - RTEMS[00] successful completion,
- mode is 0x00000100, RTEMS_NO_PREEMPT
-SELF - set preemption state to RTEMS_PREEMPT - RTEMS[00] successful completion,
- mode is 0x00000400, RTEMS_PREEMPT RTEMS_TIMESLICE RTEMS_ASR INTMASK=0
-SELF - set preemption state to RTEMS_NO_PREEMPT - RTEMS[00] successful completion,
- mode is 0x00000500, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_ASR INTMASK=0
-SELF - get timeslice state - RTEMS[00] successful completion,
- mode is 0x00000000, RTEMS_TIMESLICE
-SELF - set timeslice state to RTEMS_TIMESLICE - RTEMS[00] successful completion,
- mode is 0x00000700, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_ASR INTMASK=0
-SELF - set timeslice state to RTEMS_NO_TIMESLICE - RTEMS[00] successful completion,
- mode is 0x00000500, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_ASR INTMASK=0
-SELF - get asr state - RTEMS[00] successful completion,
- mode is 0x00000400, RTEMS_ASR
-SELF - set asr state to RTEMS_ASR - RTEMS[00] successful completion,
- mode is 0x00000100, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_NO_ASR INTMASK=0
-SELF - set asr state to RTEMS_NO_ASR - RTEMS[00] successful completion,
- mode is 0x00000500, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_ASR INTMASK=0
-SELF - get current interrupt level - RTEMS[00] successful completion, level is 0
-SELF - set interrupt level to 102 - RTEMS[00] successful completion
-SELF - set interrupt level to original level - RTEMS[00] successful completion, level was 6
-SELF - set mode to original mode - RTEMS[00] successful completion,
- mode is 0x00000500, RTEMS_NO_PREEMPT RTEMS_NO_TIMESLICE RTEMS_ASR INTMASK=0
- END TaskMode Class test
-<pause - screen 4>
- START Event Class test
-TA1 - create task 2 - RTEMS[00] successful completion
-TA1 - start task 2 - RTEMS[00] successful completion
-TA1 - construct event connecting to task 2 - RTEMS[00] successful completion
-TA2 - event no wait - RTEMS[13] request not satisfied
-TA2 - event 5 secs timeout - RTEMS[06] timed out waiting
-TA2 - event wait forever for signal 0 from TA1 ....
-TA1 - send event signal 0 using the task id - RTEMS[00] successful completion
-TA2 - RTEMS[00] successful completion, signals out are 0x00000001
-TA2 - event wait forever for signal 0 from TA1 ....
-TA1 - send event signal 0 using the task object reference - RTEMS[00] successful completion
-TA2 - RTEMS[00] successful completion, signals out are 0x00000001
-TA2 - event wait forever for signal 31 from TA1 ....
-TA1 - send event signal 31 using connected id - RTEMS[00] successful completion
-TA2 - RTEMS[00] successful completion, signals out are 0x80000000
-TA2 - event wait forever for signal 0 and 31 from TA1 ....
-TA1 - send event signal 0 and 31 - RTEMS[00] successful completion
-TA1 - waiting 5 secs for TA2 to finish
-TA2 - RTEMS[00] successful completion, signals out are 0x80000001
-TA2 - send event signal 1 - RTEMS[00] successful completion
-TA2 - event wait forever for signal 1 from TA2 - RTEMS[00] successful completion, signals out are 0x00000002
-TA2 - destroy itself
- END Event Class test
-<pause - screen 5>
- START Interrupt Class test
- do not know a portable BSP type interrupt test
- END Interrupt Class test
-<pause - screen 6>
- START MessageQueue Class test
-TA1 - construct message queue 1 with no memory error - RTEMS[13] request not satisfied
-TA1 - construct/create message queue 2 - RTEMS[00] successful completion
-TA1 - send u1 to mq_2 - RTEMS[00] successful completion
-TA1 - urgent send u2 to mq_2 - RTEMS[00] successful completion
-TA1 - create task 3_1 - RTEMS[00] successful completion
-TA1 - start task 3_1 - RTEMS[00] successful completion
-TA1 - create task 3_2 - RTEMS[00] successful completion
-TA1 - start task 3_2 - RTEMS[00] successful completion
-TA31 - construction connect mq_2 - RTEMS[00] successful completion
-TA31 - loopback from mq_2 to mq_2 ...
-TA31 - mq_2 receive - RTEMS[00] successful completion, size=12, message string size=11
-TA31 - loopback to mq_2 - RTEMS[00] successful completion
-TA32 - construction connect mq_2 - RTEMS[00] successful completion
-TA32 - loopback from mq_2 to mq_2 ...
-TA32 - mq_2 receive - RTEMS[00] successful completion, size=12, message string size=11
-TA32 - loopback to mq_2 - RTEMS[00] successful completion
-TA1 - receive u2 on mq_2 ...
-TA1 - RTEMS[00] successful completion
-TA1 - message u2 received correctly
-TA1 - receive u1 on mq_2 ...
-TA1 - RTEMS[00] successful completion
-TA1 - message u1 received correctly
-TA31 - loopback from mq_2 to mq_2 ...
-TA32 - loopback from mq_2 to mq_2 ...
-TA1 - broadcast send b1 ...
-TA1 - mq_2 broadcast send - RTEMS[00] successful completion, count=2
-TA31 - mq_2 receive - RTEMS[00] successful completion, size=18, message string size=17
-TA31 - loopback to mq_2 - RTEMS[00] successful completion
-TA31 - destroy itself
-TA32 - mq_2 receive - RTEMS[00] successful completion, size=18, message string size=17
-TA32 - loopback to mq_2 - RTEMS[00] successful completion
-TA32 - destroy itself
-TA1 - receive message b1 on mq_2 from TA31...
-TA1 - RTEMS[00] successful completion
-TA1 - message b1 received correctly
-TA1 - receive message b1 on mq_2 from TA31...
-TA1 - RTEMS[00] successful completion
-TA1 - message b1 received correctly
-TA1 - send f1 to mq_2 - RTEMS[00] successful completion
-TA1 - send f1 to mq_2 - RTEMS[00] successful completion
-TA1 - send f1 to mq_2 - RTEMS[00] successful completion
-TA1 - flush mq_2 - RTEMS[00] successful completion, flushed=3
- END MessageQueue Class test
-*** END OF RTEMS++ TEST ***