Browse Source

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>
pull/1514/head
Volodymyr Fialko 2 years ago
committed by Volodymyr Fialko
parent
commit
a68f2caafb
  1. 1
      riscv/remote_bitbang.cc
  2. 1
      riscv/remote_bitbang.h

1
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;

1
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;

Loading…
Cancel
Save