Skip to content

Commit

Permalink
tresor_tester: make command pool a proper module
Browse files Browse the repository at this point in the history
* The command pool used to be kind of a module but it was driven via custom
  tresor-tester specific code. With this commit it becomes a proper module that
  is driven by the module framework instead.

* Move the code for creating and handling the module-execution progress flag
  into Module_composition::execute_modules as the function is always used with
  this code surrounding it.

Ref genodelabs#5062
  • Loading branch information
m-stein committed Nov 27, 2023
1 parent eca56a8 commit c9c1f0f
Show file tree
Hide file tree
Showing 4 changed files with 375 additions and 519 deletions.
19 changes: 11 additions & 8 deletions repos/gems/src/app/tresor_init/main.cc
Expand Up @@ -101,21 +101,24 @@ class Main
*/
void wakeup_vfs_user() override { _sigh.local_submit(); }

void _execute()
void _wakeup_back_end_services()
{
bool progress { true };
while (progress) {

progress = false;
execute_modules(progress);
}

_vfs_env.io().commit();
}

void _try_end_program()
{
if (_state == COMPLETE)
_env.parent().exit(0);
}

void _execute()
{
execute_modules();
_try_end_program();
_wakeup_back_end_services();
}

/****************
** Module API **
****************/
Expand Down

0 comments on commit c9c1f0f

Please sign in to comment.