summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/top/task2.c
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2014-09-29 14:31:18 -0500
committerJennifer Averett <jennifer.averett@oarcorp.com>2014-10-28 08:09:37 -0500
commit410bcdfe5f9185602dcd3283c436838797bf939b (patch)
treed5f17bc32ca84b6e65e10f5f3fb63841a418ed4f /testsuites/libtests/top/task2.c
parentcapture: Remove ctload command. (diff)
downloadrtems-410bcdfe5f9185602dcd3283c436838797bf939b.tar.bz2
top: Add new test.
Diffstat (limited to 'testsuites/libtests/top/task2.c')
-rw-r--r--testsuites/libtests/top/task2.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/testsuites/libtests/top/task2.c b/testsuites/libtests/top/task2.c
new file mode 100644
index 0000000000..5435d5b66a
--- /dev/null
+++ b/testsuites/libtests/top/task2.c
@@ -0,0 +1,34 @@
+/* Task_2
+ *
+ * This routine serves as a test task. It calls the
+ * top command and forces an exit if the user requests it.
+ *
+ * Input parameters:
+ * argument - task argument
+ *
+ * Output parameters: NONE
+ *
+ * COPYRIGHT (c) 2014.
+ * 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"
+
+#include <rtems/cpuuse.h>
+
+rtems_task Task_2(
+ rtems_task_argument argument
+)
+{
+ rtems_cpu_usage_top();
+ TEST_END();
+ rtems_test_exit( 0 );
+}