diff options
author | Doug Gilbert <dgilbert@us.ibm.com> | 2011-08-25 10:53:14 -0500 |
---|---|---|
committer | Douglas R. Gilbert <dgilbert@us.ibm.com> | 2011-09-07 10:37:16 -0500 |
commit | 6dd3a0514d3754d607be5689bf07a04d3cc8f483 (patch) | |
tree | 90428972c1acc0c6b470b83e84b2ece5780a6ad3 /src/usr/cxxtest | |
parent | dd8d92217c8cebd6aa5408ad7fd4fa50ea248c84 (diff) | |
download | talos-hostboot-6dd3a0514d3754d607be5689bf07a04d3cc8f483.tar.gz talos-hostboot-6dd3a0514d3754d607be5689bf07a04d3cc8f483.zip |
Move libs to the extended image
Change-Id: I275a3a4b897e6426164e4f3bd642f92b0d3fed07
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/285
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Diffstat (limited to 'src/usr/cxxtest')
-rw-r--r-- | src/usr/cxxtest/cxxtestexec.C | 70 |
1 files changed, 19 insertions, 51 deletions
diff --git a/src/usr/cxxtest/cxxtestexec.C b/src/usr/cxxtest/cxxtestexec.C index 4e5e1473c..c33e32fca 100644 --- a/src/usr/cxxtest/cxxtestexec.C +++ b/src/usr/cxxtest/cxxtestexec.C @@ -21,7 +21,7 @@ // // IBM_PROLOG_END -#include <sys/vfs.h> +#include <vfs/vfs.H> #include <sys/task.h> #include <string.h> #include <kernel/console.H> @@ -33,8 +33,8 @@ namespace CxxTest { - uint64_t g_ModulesStarted = 0; - uint64_t g_ModulesCompleted = 0; + extern uint64_t g_ModulesStarted; + extern uint64_t g_ModulesCompleted; /** * @var g_CxxTestBarrier - barrier for CxxTest modules. @@ -62,11 +62,8 @@ TRAC_INIT(&g_trac_cxxtest, "CXXTEST", 1024 ); extern "C" void _start(void *io_pArgs) { - // TODO These modules will eventually all be in the extended binary. - // VfsSystemModule* vfsItr = (VfsSystemModule*) VFS_EXTENDED_MODULE_TABLE_ADDRESS; - VfsSystemModule* vfsItr = &VFS_MODULES[0]; + std::vector<const char *> module_list; tid_t tidrc = 0; - uint64_t totalmodules = 0; TaskArgs::TaskArgs *pTaskArgs = reinterpret_cast<TaskArgs::TaskArgs *>(io_pArgs); @@ -74,61 +71,32 @@ void _start(void *io_pArgs) // count up the number of viable modules ahead of time TRACDCOMP( g_trac_cxxtest, "Counting CxxTextExec modules:" ); - while(vfsItr->module[0] != '\0') - { - if (0 == memcmp(vfsItr->module, "libtest", 7)) - { - if (NULL != vfsItr->start) - { - TRACDBIN( g_trac_cxxtest, - "", - &(vfsItr->module[0]), - strlen( &(vfsItr->module[0]) ) - ); - - totalmodules++; - } - } - vfsItr++; - } + VFS::find_test_modules(module_list); + + uint64_t totalmodules = module_list.size(); + // start executing the CxxTest modules TRACDCOMP( g_trac_cxxtest, ENTER_MRK "Execute CxxTestExec, totalmodules=%d.", totalmodules); - vfsItr = &VFS_MODULES[0]; // re-init // set barrier for all the modules being started, plus this module barrier_init( &CxxTest::g_CxxTestBarrier, totalmodules+1 ); __sync_add_and_fetch(&CxxTest::g_ModulesStarted, 1); - while(vfsItr->module[0] != '\0') + for(std::vector<const char *>::const_iterator i = module_list.begin(); + i != module_list.end(); ++i) { - if (0 == memcmp(vfsItr->module, "libtest", 7)) - { - if (NULL != vfsItr->start) - { - __sync_add_and_fetch(&CxxTest::g_ModulesStarted, 1); - -#if 0 - // arrgh, no %s in trace - TRACDCOMP( g_trac_cxxtest, - "Running %s, ModulesStarted=%d", - __LINE__, - vfsItr->module, - CxxTest::g_ModulesStarted ); -#else - TRACDCOMP( g_trac_cxxtest, - "ModulesStarted=%d", - CxxTest::g_ModulesStarted ); -#endif - tidrc = task_exec( vfsItr->module, NULL ); - TRACDCOMP( g_trac_cxxtest, "Launched task: tidrc=%d", - tidrc ); - - } - } - vfsItr++; + __sync_add_and_fetch(&CxxTest::g_ModulesStarted, 1); + + TRACDCOMP( g_trac_cxxtest, + "ModulesStarted=%d", + CxxTest::g_ModulesStarted ); + + tidrc = task_exec( *i, NULL ); + TRACDCOMP( g_trac_cxxtest, "Launched task: tidrc=%d", + tidrc ); } TRACDCOMP( g_trac_cxxtest, "Waiting for all tasks to finish...."); |