summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smp01/tasks.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/smptests/smp01/tasks.c')
-rw-r--r--testsuites/smptests/smp01/tasks.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/testsuites/smptests/smp01/tasks.c b/testsuites/smptests/smp01/tasks.c
new file mode 100644
index 0000000000..d57037a423
--- /dev/null
+++ b/testsuites/smptests/smp01/tasks.c
@@ -0,0 +1,45 @@
+/*
+ * COPYRIGHT (c) 1989-2011.
+ * 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$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "system.h"
+
+rtems_task Test_task(
+ rtems_task_argument task_index
+)
+{
+ int cpu_num;
+ char name[5];
+ char *p;
+
+ /* Get the task name */
+ p = rtems_object_get_name( RTEMS_SELF, 5, name );
+ rtems_test_assert( p != NULL );
+
+ /* Get the CPU Number */
+ cpu_num = bsp_smp_processor_id();
+
+ /* Print that the task is up and running. */
+ Loop();
+ locked_printf(" CPU %d running Task %s\n", cpu_num, name);
+
+ /* Set the flag that the task is up and running */
+ TaskRan[cpu_num] = true;
+
+
+ /* Drop into a loop which will keep this task on
+ * running on the cpu.
+ */
+ while(1);
+}