rtos/hwthread: Hide unavailable targets from thread list.

Change-Id: I53c6e2876d9bab70800a0f080e72a2abe0499120
Signed-off-by: Tim Newsome <tim@sifive.com>
This commit is contained in:
Tim Newsome 2022-09-07 11:55:52 -07:00
parent ad93fda7e8
commit 5832b983f5
1 changed files with 4 additions and 2 deletions

View File

@ -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);