summaryrefslogtreecommitdiff
path: root/rtems-test-template/sptest_with_task/init.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-11-05 19:33:03 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-11-05 19:33:03 +0000
commit0de10d21fb3888ec1d3fe1240f6c4597f4bbc594 (patch)
tree4e32916390be84b0c23e168ac5eb429ab218829c /rtems-test-template/sptest_with_task/init.c
parent0556e28e267b0e5674f8011df85bcacbcc1412d6 (diff)
2010-11-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* psxtest/Makefile.am, psxtest/TEST.doc, psxtest/TEST.scn, psxtest/init.c, psxtest_with_thread/.init.c.swp, psxtest_with_thread/Makefile.am, psxtest_with_thread/TEST.doc, psxtest_with_thread/TEST.scn, psxtest_with_thread/init.c, psxtmtest_blocking/Makefile.am, psxtmtest_blocking/TEST.doc, psxtmtest_blocking/init.c, psxtmtest_single/Makefile.am, psxtmtest_single/TEST.doc, psxtmtest_single/init.c, sptest_with_task/Makefile.am, sptest_with_task/TEST.doc, sptest_with_task/TEST.scn, sptest_with_task/init.c: New files.
Diffstat (limited to '')
-rw-r--r--rtems-test-template/sptest_with_task/init.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/rtems-test-template/sptest_with_task/init.c b/rtems-test-template/sptest_with_task/init.c
new file mode 100644
index 0000000..10e356b
--- /dev/null
+++ b/rtems-test-template/sptest_with_task/init.c
@@ -0,0 +1,60 @@
+/*
+ * COPYRIGHT (c) 1989-2010.
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <tmacros.h>
+#include "test_support.h"
+
+rtems_task Test_task(
+ rtems_task_argument argument
+)
+{
+ (void) rtems_task_delete( RTEMS_SELF );
+}
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ rtems_status_code status;
+ rtems_id task_id;
+
+ puts( "\n\n*** TEST @DESC@ ***" );
+
+ status = rtems_task_create(
+ rtems_build_name( 'T', 'E', 'S', 'T' ),
+ 1,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &task_id
+ );
+ directive_failed( status, "rtems_task_create" );
+
+ status = rtems_task_start( task_id, Test_task, 0 );
+ directive_failed( status, "rtems_task_start" );
+
+ puts( "*** END OF TEST @DESC@ ***" );
+
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 2
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */