diff --git a/repos/base-nova/src/core/include/platform_thread.h b/repos/base-nova/src/core/include/platform_thread.h index e551c53490..a17e07f502 100644 --- a/repos/base-nova/src/core/include/platform_thread.h +++ b/repos/base-nova/src/core/include/platform_thread.h @@ -53,9 +53,9 @@ namespace Genode { addr_t _sel_sc() const { return _id_base + 2; } /* convenience function to access _feature variable */ - inline bool is_main_thread() { return _features & MAIN_THREAD; } - inline bool is_vcpu() { return _features & VCPU; } - inline bool is_worker() { return _features & WORKER; } + inline bool is_main_thread() const { return _features & MAIN_THREAD; } + inline bool is_vcpu() const { return _features & VCPU; } + inline bool is_worker() const { return _features & WORKER; } public: diff --git a/repos/base-nova/src/core/platform_thread.cc b/repos/base-nova/src/core/platform_thread.cc index 439d435525..aa375a4552 100644 --- a/repos/base-nova/src/core/platform_thread.cc +++ b/repos/base-nova/src/core/platform_thread.cc @@ -324,11 +324,15 @@ unsigned long long Platform_thread::execution_time() const unsigned long long time = 0; /* - * Ignore the return value, which indicates success only for global ECs. * For local ECs, we simply return 0 as local ECs are executed with the * time of their callers. */ - (void) Nova::sc_ctrl(_sel_sc(), time); + if (is_worker()) + return time; + + uint8_t res = Nova::sc_ctrl(_sel_sc(), time); + if (res != Nova::NOVA_OK) + PDBG("sc_ctrl failed res=%x", res); return time; }