aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2023-02-20 08:59:40 -0800
committerGitHub <noreply@github.com>2023-02-20 08:59:40 -0800
commit8933785ab32ace83a49c1f67332e872882f64aba (patch)
tree513be92f20573e9c804a4c7e949bfd4ebff95f56
parent87f9e590b9d93d1be8f315ef1ab008b94a4e2098 (diff)
parent1655620c0cbd4f6fabf04df087f277eb106500f8 (diff)
downloadriscv-openocd-8933785ab32ace83a49c1f67332e872882f64aba.zip
riscv-openocd-8933785ab32ace83a49c1f67332e872882f64aba.tar.gz
riscv-openocd-8933785ab32ace83a49c1f67332e872882f64aba.tar.bz2
Merge pull request #801 from Du-Chao/freertos
Set the current_thread when no FreeRTOS task was created.
-rw-r--r--src/rtos/FreeRTOS.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rtos/FreeRTOS.c b/src/rtos/FreeRTOS.c
index 96b535d..e017c57 100644
--- a/src/rtos/FreeRTOS.c
+++ b/src/rtos/FreeRTOS.c
@@ -501,6 +501,7 @@ static int freertos_update_threads(struct rtos *rtos)
LOG_ERROR("Error allocating memory for %" PRIu64 " threads", thread_list_size);
return ERROR_FAIL;
}
+ rtos->current_thread = 1;
rtos->thread_details->threadid = 1;
rtos->thread_details->exists = true;
rtos->thread_details->extra_info_str = NULL;