From a68f2caafb1be5231619470e6c6a29ffabd6e1ff Mon Sep 17 00:00:00 2001 From: Volodymyr Fialko Date: Tue, 28 Nov 2023 12:39:42 +0100 Subject: 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 --- riscv/remote_bitbang.cc | 1 - riscv/remote_bitbang.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.1