Fix data race in proc_bsr and ul_harq classes.

master
faluco 3 years ago committed by faluco
parent 3f0d4f0293
commit f1385640c4

@ -120,8 +120,8 @@ private:
uint32_t pid; uint32_t pid;
std::atomic<uint32_t> current_tx_nb = {0}; std::atomic<uint32_t> current_tx_nb = {0};
std::atomic<uint32_t> current_irv = {0}; std::atomic<uint32_t> current_irv = {0};
bool harq_feedback; std::atomic<bool> harq_feedback = {false};
bool is_grant_configured; std::atomic<bool> is_grant_configured = {false};
bool is_initiated; bool is_initiated;
srslog::basic_logger& logger; srslog::basic_logger& logger;

@ -72,6 +72,8 @@ void bsr_proc::set_trigger(bsr_trigger_type_t new_trigger)
void bsr_proc::reset() void bsr_proc::reset()
{ {
std::lock_guard<std::mutex> lock(mutex);
timer_periodic.stop(); timer_periodic.stop();
timer_retx.stop(); timer_retx.stop();

Loading…
Cancel
Save