From 65f6af041585c3b2169b5d3a750fa20a12e4a1e2 Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Tue, 21 Jan 2025 15:26:30 +0100 Subject: [PATCH] Added method to determine wether a cell is a brick or not. --- repos/os/src/hoitaja/cell.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/repos/os/src/hoitaja/cell.h b/repos/os/src/hoitaja/cell.h index 8ceddabe81..fddef126b0 100644 --- a/repos/os/src/hoitaja/cell.h +++ b/repos/os/src/hoitaja/cell.h @@ -27,6 +27,7 @@ class Hoitaja::Cell : public ::Sandbox::Child private: State_handler &_state_handler; long _priority{0}; + bool _is_brick{false}; public: friend class Habitat; @@ -55,7 +56,13 @@ class Hoitaja::Cell : public ::Sandbox::Child { _priority = ::Sandbox::priority_from_xml(start_node, prio_levels); _priority = (_priority == 0) ? 1 : _priority; - Genode::log("Creating new cell at Hoitaja <", name(), "> at ", location, " in ", affinity_space); + _is_brick = ::Sandbox::is_brick_from_xml(start_node); + + if (_is_brick) { + Genode::log("Creating new brick at Hoitaja <", name(), "> at ", location, " in ", affinity_space); + } else { + Genode::log("Creating new cell at Hoitaja <", name(), "> at ", location, " in ", affinity_space); + } } virtual ~Cell() { }; @@ -103,4 +110,6 @@ class Hoitaja::Cell : public ::Sandbox::Child __builtin_ia32_pause(); create_at_tukija(); } + + bool is_brick() { return _is_brick; } };