diff --git a/lib/include/srsran/rlc/rlc_am_lte.h b/lib/include/srsran/rlc/rlc_am_lte.h index 6574e8297..4de710f38 100644 --- a/lib/include/srsran/rlc/rlc_am_lte.h +++ b/lib/include/srsran/rlc/rlc_am_lte.h @@ -527,8 +527,8 @@ private: rlc_ringbuffer_t rx_window; std::map rx_segments; - bool poll_received = false; - bool do_status = false; + bool poll_received = false; + std::atomic do_status = {false}; // light-weight access from Tx entity /**************************************************************************** * Timers diff --git a/lib/src/rlc/rlc_am_lte.cc b/lib/src/rlc/rlc_am_lte.cc index 967cf5a55..c0848e5a8 100644 --- a/lib/src/rlc/rlc_am_lte.cc +++ b/lib/src/rlc/rlc_am_lte.cc @@ -1852,8 +1852,7 @@ void rlc_am_lte::rlc_am_lte_rx::reset_status() bool rlc_am_lte::rlc_am_lte_rx::get_do_status() { - std::lock_guard lock(mutex); - return do_status; + return do_status.load(std::memory_order_relaxed); } void rlc_am_lte::rlc_am_lte_rx::write_pdu(uint8_t* payload, const uint32_t nof_bytes)