aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolodymyr Fialko <vfialko@marvell.com>2023-11-28 12:39:42 +0100
committerVolodymyr Fialko <volodymyr.fialko@gmail.com>2023-11-28 12:55:31 +0100
commita68f2caafb1be5231619470e6c6a29ffabd6e1ff (patch)
treece68ebdda5635f57db2849a2c7f360d245e0087a
parent90aa49f85b589c91754ea224bc2f1492dd99efa3 (diff)
downloadriscv-isa-sim-a68f2caafb1be5231619470e6c6a29ffabd6e1ff.zip
riscv-isa-sim-a68f2caafb1be5231619470e6c6a29ffabd6e1ff.tar.gz
riscv-isa-sim-a68f2caafb1be5231619470e6c6a29ffabd6e1ff.tar.bz2
remote_bitbang: make send_buf class member
Currently send buffer is static variable in function, which makes it's impossible to have multiple concurrent instances of remote bitbang class, since all of them would share this static buffer. Thus, make send_buf a class member. Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
-rw-r--r--riscv/remote_bitbang.cc1
-rw-r--r--riscv/remote_bitbang.h1
2 files changed, 1 insertions, 1 deletions
diff --git a/riscv/remote_bitbang.cc b/riscv/remote_bitbang.cc
index 8453e85..182b371 100644
--- a/riscv/remote_bitbang.cc
+++ b/riscv/remote_bitbang.cc
@@ -106,7 +106,6 @@ void remote_bitbang_t::tick()
void remote_bitbang_t::execute_commands()
{
- static char send_buf[buf_size];
unsigned total_processed = 0;
bool quit = false;
bool in_rti = tap->state() == RUN_TEST_IDLE;
diff --git a/riscv/remote_bitbang.h b/riscv/remote_bitbang.h
index 1db4d55..b5b73bf 100644
--- a/riscv/remote_bitbang.h
+++ b/riscv/remote_bitbang.h
@@ -22,6 +22,7 @@ private:
int client_fd;
static const ssize_t buf_size = 64 * 1024;
+ char send_buf[buf_size];
char recv_buf[buf_size];
ssize_t recv_start, recv_end;