aboutsummaryrefslogtreecommitdiff
path: root/src/rtos
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2022-09-07 11:55:52 -0700
committerTim Newsome <tim@sifive.com>2022-11-22 09:29:50 -0800
commit5832b983f5f1ddd438b220cab8a8262582c1ac01 (patch)
tree221bc319e2bfbbc3156f057eba8f8194097a7bb5 /src/rtos
parentad93fda7e8d95ec2738e6a85ce45f0c44e56a0e9 (diff)
downloadriscv-openocd-5832b983f5f1ddd438b220cab8a8262582c1ac01.zip
riscv-openocd-5832b983f5f1ddd438b220cab8a8262582c1ac01.tar.gz
riscv-openocd-5832b983f5f1ddd438b220cab8a8262582c1ac01.tar.bz2
rtos/hwthread: Hide unavailable targets from thread list.
Change-Id: I53c6e2876d9bab70800a0f080e72a2abe0499120 Signed-off-by: Tim Newsome <tim@sifive.com>
Diffstat (limited to 'src/rtos')
-rw-r--r--src/rtos/hwthread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rtos/hwthread.c b/src/rtos/hwthread.c
index 4902e02..28f9727 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);