Fix data race in bsr_proc.

This commit is contained in:
faluco 2021-09-15 12:45:55 +02:00 committed by faluco
parent d009160ba6
commit d02012b588
1 changed files with 2 additions and 0 deletions

View File

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