diff --git a/repos/ealanos/run/cell_destruction_test.run b/repos/ealanos/run/cell_destruction_test.run new file mode 100644 index 0000000000..3f6f10e248 --- /dev/null +++ b/repos/ealanos/run/cell_destruction_test.run @@ -0,0 +1,76 @@ +set build_components { + core init hoitaja timer app/empty_cell app/volatile_cell +} + +build $build_components +create_boot_directory + +install_config { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + +build_boot_image [build_artifacts] + +append qemu_args " -nographic " +run_genode_until forever \ No newline at end of file diff --git a/repos/ealanos/src/app/volatile_cell/main.cc b/repos/ealanos/src/app/volatile_cell/main.cc new file mode 100644 index 0000000000..10b631180d --- /dev/null +++ b/repos/ealanos/src/app/volatile_cell/main.cc @@ -0,0 +1,27 @@ +#include +#include +#include +#include + +namespace Hoitaja_test +{ + class Empty_cell; +} + +class Hoitaja_test::Empty_cell +{ + private: + Genode::Env &_env; + Timer::Connection _timer{_env}; + + public: + Empty_cell(Genode::Env &env) : _env(env) + { + Genode::log("Volatile dummy cell started."); + _timer.msleep(10000); + Genode::log("Exiting.."); + _env.parent().exit(0); + } +}; + +void Component::construct(Genode::Env &env) { static Hoitaja_test::Empty_cell cell(env);} \ No newline at end of file diff --git a/repos/ealanos/src/app/volatile_cell/target.mk b/repos/ealanos/src/app/volatile_cell/target.mk new file mode 100644 index 0000000000..f2cc413bd9 --- /dev/null +++ b/repos/ealanos/src/app/volatile_cell/target.mk @@ -0,0 +1,3 @@ +TARGET = volatile_cell +SRC_CC += main.cc +LIBS += base \ No newline at end of file