From 36af79b9d5005aa78ae8566839053be7dfc811a9 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 15 Sep 2021 10:06:43 +0200 Subject: [PATCH] ue,proc_bsr_nr: add missing mutex when redeading SBSR detected with TSAN --- srsue/src/stack/mac_nr/proc_bsr_nr.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/srsue/src/stack/mac_nr/proc_bsr_nr.cc b/srsue/src/stack/mac_nr/proc_bsr_nr.cc index 7cca98ede..1fd3387ab 100644 --- a/srsue/src/stack/mac_nr/proc_bsr_nr.cc +++ b/srsue/src/stack/mac_nr/proc_bsr_nr.cc @@ -136,8 +136,15 @@ bool proc_bsr_nr::check_new_data(const mac_buffer_states_t& new_buffer_state) return false; } +/** + * @brief Called by Mux through PHY worker whenever a new SBSR CE + * needs to be included in a MAC PDU. + * + * @return SBSR CE for subPDU containing the buffer state of the highest priority LCG + */ srsran::mac_sch_subpdu_nr::lcg_bsr_t proc_bsr_nr::generate_sbsr() { + std::lock_guard lock(mutex); srsran::mac_sch_subpdu_nr::lcg_bsr_t sbsr = {}; if (buffer_state.nof_lcgs_with_data > 0) { sbsr.lcg_id = buffer_state.last_non_zero_lcg;