summaryrefslogtreecommitdiffstats
path: root/c/src/ada-tests/mptests/mp10
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/ada-tests/mptests/mp10')
-rw-r--r--c/src/ada-tests/mptests/mp10/config_base.h32
-rw-r--r--c/src/ada-tests/mptests/mp10/node1/Makefile.am12
-rw-r--r--c/src/ada-tests/mptests/mp10/node1/config.h23
-rw-r--r--c/src/ada-tests/mptests/mp10/node1/mp10_node1.adb56
-rw-r--r--c/src/ada-tests/mptests/mp10/node2/Makefile.am12
-rw-r--r--c/src/ada-tests/mptests/mp10/node2/config.h23
-rw-r--r--c/src/ada-tests/mptests/mp10/node2/mp10_node2.adb56
7 files changed, 200 insertions, 14 deletions
diff --git a/c/src/ada-tests/mptests/mp10/config_base.h b/c/src/ada-tests/mptests/mp10/config_base.h
new file mode 100644
index 0000000000..799343addd
--- /dev/null
+++ b/c/src/ada-tests/mptests/mp10/config_base.h
@@ -0,0 +1,32 @@
+/* config_base.h
+ *
+ * This include file defines all of the Configuration Table for this test
+ * EXCEPT the NODE NUMBER.
+ *
+ * COPYRIGHT (c) 1989-2007.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may in
+ * the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_MAXIMUM_TASKS 2
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
+#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
+#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
+#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
+
+#include <rtems/confdefs.h>
+
+/* end of include file */
diff --git a/c/src/ada-tests/mptests/mp10/node1/Makefile.am b/c/src/ada-tests/mptests/mp10/node1/Makefile.am
index e41954a2a8..8211201a22 100644
--- a/c/src/ada-tests/mptests/mp10/node1/Makefile.am
+++ b/c/src/ada-tests/mptests/mp10/node1/Makefile.am
@@ -7,14 +7,12 @@ include $(top_srcdir)/ada.am
AM_ADAFLAGS += -I$(srcdir)/..
-node1$(EXEEXT): ../mptest.adb
- $(GNATCOMPILE) -margs -a $< -o $@
-
-if EXPADA
-noinst_PROGRAMS = node1
-endif
+noinst_PROGRAMS = mp10_node1
+mp10_node1_SOURCES = mp10_node1.adb ../mptest.adb config.h ../mptest.ads
+mp10_node1_SOURCES += ../../../support/init.c
-node1_SOURCES = mptest-per_node_configuration.adb
+mp10_node1$(EXEEXT): mp10_node1.adb ../mptest.adb init.$(OBJEXT)
+ $(GNATCOMPILE) -margs -a $< -o $@
scndir = $(rtems_ada_testsdir)
dist_scn_DATA = mp10-node1.scn
diff --git a/c/src/ada-tests/mptests/mp10/node1/config.h b/c/src/ada-tests/mptests/mp10/node1/config.h
new file mode 100644
index 0000000000..cd2699b38e
--- /dev/null
+++ b/c/src/ada-tests/mptests/mp10/node1/config.h
@@ -0,0 +1,23 @@
+/* config.h
+ *
+ * This include file defines the Configuration Table for this test.
+ *
+ * COPYRIGHT (c) 1989-2007.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may in
+ * the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+
+/* configuration information */
+
+#define CONFIGURE_MP_APPLICATION
+#define CONFIGURE_MP_NODE_NUMBER 1
+
+#include "../config_base.h"
+
+/* end of include file */
diff --git a/c/src/ada-tests/mptests/mp10/node1/mp10_node1.adb b/c/src/ada-tests/mptests/mp10/node1/mp10_node1.adb
new file mode 100644
index 0000000000..984070e32c
--- /dev/null
+++ b/c/src/ada-tests/mptests/mp10/node1/mp10_node1.adb
@@ -0,0 +1,56 @@
+--
+-- MAIN / BODY
+--
+-- DESCRIPTION:
+--
+-- This is the entry point for Test MP10_NODE1 of the Single Processor Test Suite.
+--
+-- DEPENDENCIES:
+--
+--
+--
+-- COPYRIGHT (c) 1989-2007.
+-- On-Line Applications Research Corporation (OAR).
+--
+-- The license and distribution terms for this file may in
+-- the file LICENSE in this distribution or at
+-- http://www.rtems.com/license/LICENSE.
+--
+-- $Id$
+--
+
+with RTEMS;
+with MPTEST;
+with TEST_SUPPORT;
+
+procedure MP10_NODE1 is
+ INIT_ID : RTEMS.ID;
+ STATUS : RTEMS.STATUS_CODES;
+begin
+
+ RTEMS.TASK_CREATE(
+ RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
+ 1,
+ RTEMS.MINIMUM_STACK_SIZE,
+ RTEMS.NO_PREEMPT,
+ RTEMS.DEFAULT_ATTRIBUTES,
+ INIT_ID,
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
+
+
+ RTEMS.TASK_START(
+ INIT_ID,
+ MPTEST.INIT'ACCESS,
+ 0,
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
+
+ loop
+ delay 120.0;
+ end loop;
+
+end MP10_NODE1;
+
diff --git a/c/src/ada-tests/mptests/mp10/node2/Makefile.am b/c/src/ada-tests/mptests/mp10/node2/Makefile.am
index 5c48be0274..8399b9eb30 100644
--- a/c/src/ada-tests/mptests/mp10/node2/Makefile.am
+++ b/c/src/ada-tests/mptests/mp10/node2/Makefile.am
@@ -7,14 +7,12 @@ include $(top_srcdir)/ada.am
AM_ADAFLAGS += -I$(srcdir)/..
-node2$(EXEEXT): ../mptest.adb
- $(GNATCOMPILE) -margs -a $< -o $@
-
-if EXPADA
-noinst_PROGRAMS = node2
-endif
+noinst_PROGRAMS = mp10_node2
+mp10_node2_SOURCES = mp10_node2.adb ../mptest.adb config.h ../mptest.ads
+mp10_node2_SOURCES += ../../../support/init.c
-node2_SOURCES = mptest-per_node_configuration.adb
+mp10_node2$(EXEEXT): mp10_node2.adb ../mptest.adb init.$(OBJEXT)
+ $(GNATCOMPILE) -margs -a $< -o $@
scndir = $(rtems_ada_testsdir)
dist_scn_DATA = mp10-node2.scn
diff --git a/c/src/ada-tests/mptests/mp10/node2/config.h b/c/src/ada-tests/mptests/mp10/node2/config.h
new file mode 100644
index 0000000000..409e7d691d
--- /dev/null
+++ b/c/src/ada-tests/mptests/mp10/node2/config.h
@@ -0,0 +1,23 @@
+/* config.h
+ *
+ * This include file defines the Configuration Table for this test.
+ *
+ * COPYRIGHT (c) 1989-2007.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may in
+ * the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+
+/* configuration information */
+
+#define CONFIGURE_MP_APPLICATION
+#define CONFIGURE_MP_NODE_NUMBER 2
+
+#include "../config_base.h"
+
+/* end of include file */
diff --git a/c/src/ada-tests/mptests/mp10/node2/mp10_node2.adb b/c/src/ada-tests/mptests/mp10/node2/mp10_node2.adb
new file mode 100644
index 0000000000..ab95182331
--- /dev/null
+++ b/c/src/ada-tests/mptests/mp10/node2/mp10_node2.adb
@@ -0,0 +1,56 @@
+--
+-- MAIN / BODY
+--
+-- DESCRIPTION:
+--
+-- This is the entry point for Test MP10_NODE2 of the Single Processor Test Suite.
+--
+-- DEPENDENCIES:
+--
+--
+--
+-- COPYRIGHT (c) 1989-2007.
+-- On-Line Applications Research Corporation (OAR).
+--
+-- The license and distribution terms for this file may in
+-- the file LICENSE in this distribution or at
+-- http://www.rtems.com/license/LICENSE.
+--
+-- $Id$
+--
+
+with RTEMS;
+with MPTEST;
+with TEST_SUPPORT;
+
+procedure MP10_NODE2 is
+ INIT_ID : RTEMS.ID;
+ STATUS : RTEMS.STATUS_CODES;
+begin
+
+ RTEMS.TASK_CREATE(
+ RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
+ 1,
+ RTEMS.MINIMUM_STACK_SIZE,
+ RTEMS.NO_PREEMPT,
+ RTEMS.DEFAULT_ATTRIBUTES,
+ INIT_ID,
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
+
+
+ RTEMS.TASK_START(
+ INIT_ID,
+ MPTEST.INIT'ACCESS,
+ 0,
+ STATUS
+ );
+ TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
+
+ loop
+ delay 120.0;
+ end loop;
+
+end MP10_NODE2;
+