From 5832b983f5f1ddd438b220cab8a8262582c1ac01 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Wed, 7 Sep 2022 11:55:52 -0700 Subject: [PATCH] rtos/hwthread: Hide unavailable targets from thread list. Change-Id: I53c6e2876d9bab70800a0f080e72a2abe0499120 Signed-off-by: Tim Newsome --- src/rtos/hwthread.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rtos/hwthread.c b/src/rtos/hwthread.c index 4902e0239..28f972726 100644 --- a/src/rtos/hwthread.c +++ b/src/rtos/hwthread.c @@ -113,7 +113,8 @@ static int hwthread_update_threads(struct rtos *rtos) foreach_smp_target(head, target->smp_targets) { struct target *curr = head->target; - if (!target_was_examined(curr)) + if (!target_was_examined(curr) || + curr->state == TARGET_UNAVAILABLE) continue; ++thread_list_size; @@ -134,7 +135,8 @@ static int hwthread_update_threads(struct rtos *rtos) foreach_smp_target(head, target->smp_targets) { struct target *curr = head->target; - if (!target_was_examined(curr)) + if (!target_was_examined(curr) || + curr->state == TARGET_UNAVAILABLE) continue; threadid_t tid = threadid_from_target(curr);