eMBMS: adding mutex to mbsfn configuration in the eNodeB

master
yagoda 2 years ago committed by Justin Tallon
parent 637e7ce9fa
commit 5240083454

@ -301,6 +301,7 @@ private:
bool have_mtch_stop = false; bool have_mtch_stop = false;
std::mutex mtch_mutex; std::mutex mtch_mutex;
std::mutex mbsfn_mutex;
std::condition_variable mtch_cvar; std::condition_variable mtch_cvar;
srsran::phy_cfg_mbsfn_t mbsfn = {}; srsran::phy_cfg_mbsfn_t mbsfn = {};
bool sib13_configured = false; bool sib13_configured = false;

@ -60,9 +60,12 @@ bool phy_common::init(const phy_cell_cfg_list_t& cell_list_,
if (!cell_list_lte.empty()) { if (!cell_list_lte.empty()) {
ue_db.init(stack, params, cell_list_lte); ue_db.init(stack, params, cell_list_lte);
} }
if (mcch_configured) { {
build_mch_table(); std::lock_guard<std::mutex> lock(mbsfn_mutex);
build_mcch_table(); if (mcch_configured) {
build_mch_table();
build_mcch_table();
}
} }
reset(); reset();
@ -168,6 +171,7 @@ void phy_common::set_mch_period_stop(uint32_t stop)
void phy_common::configure_mbsfn(srsran::phy_cfg_mbsfn_t* cfg) void phy_common::configure_mbsfn(srsran::phy_cfg_mbsfn_t* cfg)
{ {
std::lock_guard<std::mutex> lock(mbsfn_mutex);
mbsfn = *cfg; mbsfn = *cfg;
sib13_configured = true; sib13_configured = true;
mcch_configured = true; mcch_configured = true;

Loading…
Cancel
Save