From 666cb73cc933ab6c74bef809bcd383d885493b8c Mon Sep 17 00:00:00 2001 From: faluco Date: Fri, 1 Oct 2021 12:24:24 +0200 Subject: [PATCH] Fix data race in phy_common::set_neighbour_cells. --- srsue/hdr/phy/phy_common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/srsue/hdr/phy/phy_common.h b/srsue/hdr/phy/phy_common.h index ede7de462..35ab6cdb5 100644 --- a/srsue/hdr/phy/phy_common.h +++ b/srsue/hdr/phy/phy_common.h @@ -264,6 +264,7 @@ public: total_rsrp += srsran_convert_dB_to_power(m.rsrp); } if (std::isnormal(total_rsrp)) { + std::unique_lock lock(meas_mutex); if (std::isnormal(avg_rsrp_neigh[cc_idx])) { avg_rsrp_neigh[cc_idx] = SRSRAN_VEC_EMA(total_rsrp, avg_rsrp_neigh[cc_idx], 0.9); } else {