From 8173fa792ac650bb60ba0be030b3149619c870fd Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Tue, 23 Apr 2024 16:00:00 +0200 Subject: [PATCH] set_thread_name --- kw11-l.cpp | 2 ++ main.cpp | 2 ++ tty.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/kw11-l.cpp b/kw11-l.cpp index 61f41d0..9081eb3 100644 --- a/kw11-l.cpp +++ b/kw11-l.cpp @@ -47,6 +47,8 @@ kw11_l::~kw11_l() void kw11_l::operator()() { + set_thread_name("kek:kw-11l"); + DOLOG(debug, true, "Starting KW11-L thread"); while(!stop_flag) { diff --git a/main.cpp b/main.cpp index 56ca2fd..f935b58 100644 --- a/main.cpp +++ b/main.cpp @@ -263,6 +263,8 @@ int run_cpu_validation(const std::string & filename) void get_metrics(cpu *const c) { + set_thread_name("kek:metrics"); + uint64_t previous_instruction_count = c->get_instructions_executed_count(); uint64_t previous_ts = get_us(); uint64_t previous_idle_time = c->get_wait_time(); diff --git a/tty.cpp b/tty.cpp index ed5bb3f..312cba6 100644 --- a/tty.cpp +++ b/tty.cpp @@ -130,6 +130,8 @@ uint16_t tty::readWord(const uint16_t addr) void tty::operator()() { + set_thread_name("kek:tty"); + while(!stop_flag) { if (c->poll_char()) { #if defined(BUILD_FOR_RP2040)