aboutsummaryrefslogtreecommitdiff
path: root/src/rtos
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2017-06-19 08:58:07 -0700
committerTim Newsome <tim@sifive.com>2017-06-20 11:32:42 -0700
commit927f9d887379a0af17cc5ab51a008c7ab89007df (patch)
tree9b1384c1538595237c0e3cef996b1f71d15aea6a /src/rtos
parent8d79a7c18b47354e4577cb5580d8945cc0d918cc (diff)
downloadriscv-openocd-927f9d887379a0af17cc5ab51a008c7ab89007df.zip
riscv-openocd-927f9d887379a0af17cc5ab51a008c7ab89007df.tar.gz
riscv-openocd-927f9d887379a0af17cc5ab51a008c7ab89007df.tar.bz2
Update list of "threads" when harts are discovered.
This ensures that "info threads" is accurate as soon as gdb connects. Also print out number of triggers that is discovered in examine().
Diffstat (limited to 'src/rtos')
-rw-r--r--src/rtos/riscv_debug.c4
-rw-r--r--src/rtos/riscv_debug.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/rtos/riscv_debug.c b/src/rtos/riscv_debug.c
index dbd7238..d6458e9 100644
--- a/src/rtos/riscv_debug.c
+++ b/src/rtos/riscv_debug.c
@@ -5,10 +5,8 @@
#include "riscv_debug.h"
#include "target/target.h"
#include "target/riscv/riscv.h"
-#include "rtos.h"
#include "server/gdb_server.h"
-static int riscv_update_threads(struct rtos *rtos);
static int riscv_gdb_thread_packet(struct connection *connection, const char *packet, int packet_size);
static int riscv_gdb_v_packet(struct connection *connection, const char *packet, int packet_size);
@@ -40,7 +38,7 @@ static int riscv_create_rtos(struct target *target)
return JIM_OK;
}
-static int riscv_update_threads(struct rtos *rtos)
+int riscv_update_threads(struct rtos *rtos)
{
LOG_DEBUG("Updating the RISC-V Hart List");
diff --git a/src/rtos/riscv_debug.h b/src/rtos/riscv_debug.h
index bcc7411..539edf2 100644
--- a/src/rtos/riscv_debug.h
+++ b/src/rtos/riscv_debug.h
@@ -1,9 +1,13 @@
#ifndef RTOS__RISCV_H
#define RTOS__RISCV_H
+#include "rtos.h"
+
struct riscv_rtos {
/* The index into the thread list used to handle */
int qs_thread_info_offset;
};
+int riscv_update_threads(struct rtos *rtos);
+
#endif