Fix data race in phy_common::set_neighbour_cells.

This commit is contained in:
faluco 2021-10-01 12:24:24 +02:00 committed by Andre Puschmann
parent 72088dadb5
commit 666cb73cc9
1 changed files with 1 additions and 0 deletions

View File

@ -264,6 +264,7 @@ public:
total_rsrp += srsran_convert_dB_to_power(m.rsrp);
}
if (std::isnormal(total_rsrp)) {
std::unique_lock<std::mutex> 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 {