summaryrefslogtreecommitdiffstats
path: root/src/usr/cxxtest/cxxtestexec.C
blob: 371bb12743e2ce56b8a8ef7ed4ec4a80e84b6ab1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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