Announce Suoritin as one of Hoitaja's services.

This commit is contained in:
Michael Mueller
2023-10-10 16:37:41 +02:00
parent e614c0fb33
commit 1bcc85e556

View File

@@ -30,6 +30,8 @@
#include "core_allocator.h" #include "core_allocator.h"
/* State Handler */ /* State Handler */
#include "state_handler.h" #include "state_handler.h"
/* Tasking Service Suoritin */
#include <suoritin/component.h>
namespace Hoitaja { namespace Hoitaja {
@@ -45,6 +47,8 @@ struct Hoitaja::Main : Genode::Sandbox::State_handler, Hoitaja::State_handler
Habitat _sandbox { _env, *this, *this }; Habitat _sandbox { _env, *this, *this };
Entrypoint suoritin_ep{_env, 4 * 4096, "suoritin", Affinity::Location()};
Timer::Connection _timer{_env}; Timer::Connection _timer{_env};
Attached_rom_dataspace _config { _env, "config" }; Attached_rom_dataspace _config { _env, "config" };
@@ -136,9 +140,15 @@ struct Hoitaja::Main : Genode::Sandbox::State_handler, Hoitaja::State_handler
/* prevent init to block for resource upgrades (never satisfied by core) */ /* prevent init to block for resource upgrades (never satisfied by core) */
_env.parent().resource_avail_sigh(_resource_avail_handler); _env.parent().resource_avail_sigh(_resource_avail_handler);
_timer.trigger_once(1000 * 1000);
_handle_config(); _handle_config();
Genode::log("Starting TASKING service");
static Genode::Sliced_heap sliced_heap{env.ram(), env.rm()};
static Tukija::Suoritin::Root_component suoritin(env, sliced_heap);
env.parent().announce(suoritin_ep.manage(suoritin));
//_timer.trigger_once(1000 * 1000);
} }
}; };