From 9c4a683b33210dde87df062b124cef4a84e867e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 1 Jul 2022 16:42:54 +0200 Subject: [PATCH] Print affinity space before starting threads. --- repos/mml/src/app/thread_test/thread_test.cc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/repos/mml/src/app/thread_test/thread_test.cc b/repos/mml/src/app/thread_test/thread_test.cc index 08d7f4c4df..f362857e28 100644 --- a/repos/mml/src/app/thread_test/thread_test.cc +++ b/repos/mml/src/app/thread_test/thread_test.cc @@ -48,18 +48,28 @@ public: { Affinity::Space space = env.cpu().affinity_space(); - for (unsigned i = 0; i < space.total(); i++) { + Genode::log("Size of Affinity space is ", space.total()); + Genode::log("-----------------------------"); + for (unsigned i = 1; i < space.total(); i++) + { + Affinity::Location loc = space.location_of_index(i); + Genode::log("1: x = ", loc.xpos(), " y = ", loc.ypos()); + } + Genode::log("-----------------------------"); + + for (unsigned i = 1; i < space.total(); i++) + { Affinity::Location location = env.cpu().affinity_space().location_of_index(i); Test_thread *thread = new (_heap) Test_thread(env, (uint16_t)i, location); thread->start(); _threads.insert(&thread->_list_element); } - } +} }; void Component::construct(Genode::Env &env) { - static Thread_test::Tester tester(env); - Genode::log("Thread tester constructed."); +static Thread_test::Tester tester(env); +Genode::log("Thread tester constructed."); }