Fix data race in bsr_proc.

master
faluco 3 years ago committed by faluco
parent d009160ba6
commit d02012b588

@ -113,6 +113,8 @@ void bsr_proc::timer_expired(uint32_t timer_id)
uint32_t bsr_proc::get_buffer_state() uint32_t bsr_proc::get_buffer_state()
{ {
std::lock_guard<std::mutex> lock(mutex);
uint32_t buffer = 0; uint32_t buffer = 0;
for (int i = 0; i < NOF_LCG; i++) { for (int i = 0; i < NOF_LCG; i++) {
buffer += get_buffer_state_lcg(i); buffer += get_buffer_state_lcg(i);

Loading…
Cancel
Save