srsenb,phy: do not get reference to ul_grants, do a copy instead to protect concurrent access

This commit is contained in:
Ismael Gomez 2021-10-19 17:22:31 +02:00
parent 80c48a8b01
commit 09cec9ca5c
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ public:
void set_mch_period_stop(uint32_t stop);
// Getters and setters for ul grants which need to be shared between workers
const stack_interface_phy_lte::ul_sched_list_t& get_ul_grants(uint32_t tti);
const stack_interface_phy_lte::ul_sched_list_t get_ul_grants(uint32_t tti);
void set_ul_grants(uint32_t tti, const stack_interface_phy_lte::ul_sched_list_t& ul_grants);
void clear_grants(uint16_t rnti);

View File

@ -85,7 +85,7 @@ void phy_common::clear_grants(uint16_t rnti)
}
}
const stack_interface_phy_lte::ul_sched_list_t& phy_common::get_ul_grants(uint32_t tti)
const stack_interface_phy_lte::ul_sched_list_t phy_common::get_ul_grants(uint32_t tti)
{
std::lock_guard<std::mutex> lock(grant_mutex);
return ul_grants[tti];