summaryrefslogtreecommitdiffstats
path: root/src/usr/cxxtest/cxxtestexec.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/cxxtest/cxxtestexec.C')
-rw-r--r--src/usr/cxxtest/cxxtestexec.C26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/usr/cxxtest/cxxtestexec.C b/src/usr/cxxtest/cxxtestexec.C
new file mode 100644
index 000000000..371bb1274
--- /dev/null
+++ b/src/usr/cxxtest/cxxtestexec.C
@@ -0,0 +1,26 @@
+#include <sys/vfs.h>
+#include <sys/task.h>
+#include <string.h>
+
+/* Iterate through all modules in the VFS named "libtest*" and create children
+ * tasks to execute them.
+ */
+extern "C"
+void _start(void*)
+{
+ VfsSystemModule* vfsItr = &VFS_MODULES[0];
+
+ while(vfsItr->module[0] != '\0')
+ {
+ if (0 == memcmp(vfsItr->module, "libtest", 7))
+ {
+ if (NULL != vfsItr->start)
+ {
+ task_exec(vfsItr->module, NULL);
+ }
+ }
+ vfsItr++;
+ }
+
+ task_end();
+}
OpenPOWER on IntegriCloud