mirror of https://github.com/PentHertz/srsLTE.git
mac,nr: avoid concurrency in update of pdsch/pusch slot
This commit is contained in:
parent
ea21232f61
commit
8ceb573ea7
|
@ -103,7 +103,6 @@ private:
|
|||
std::atomic<bool> started = {false};
|
||||
|
||||
const static uint32_t NUMEROLOGY_IDX = 0; /// only 15kHz supported at this stage
|
||||
srsran::slot_point pdsch_slot, pusch_slot;
|
||||
srsenb::sched_nr sched;
|
||||
std::vector<sched_nr_interface::cell_cfg_t> cell_config;
|
||||
|
||||
|
|
|
@ -275,12 +275,7 @@ int mac_nr::get_dl_sched(const srsran_slot_cfg_t& slot_cfg, dl_sched_t& dl_sched
|
|||
{
|
||||
logger.set_context(slot_cfg.idx);
|
||||
|
||||
if (not pdsch_slot.valid()) {
|
||||
pdsch_slot = srsran::slot_point{NUMEROLOGY_IDX, slot_cfg.idx};
|
||||
} else {
|
||||
pdsch_slot++;
|
||||
}
|
||||
|
||||
slot_point pdsch_slot = srsran::slot_point{NUMEROLOGY_IDX, slot_cfg.idx};
|
||||
sched_nr_interface::dl_sched_res_t dl_res;
|
||||
int ret = sched.get_dl_sched(pdsch_slot, 0, dl_res);
|
||||
if (ret != SRSRAN_SUCCESS) {
|
||||
|
@ -323,13 +318,9 @@ int mac_nr::get_dl_sched(const srsran_slot_cfg_t& slot_cfg, dl_sched_t& dl_sched
|
|||
int mac_nr::get_ul_sched(const srsran_slot_cfg_t& slot_cfg, ul_sched_t& ul_sched)
|
||||
{
|
||||
int ret = 0;
|
||||
if (not pusch_slot.valid()) {
|
||||
pusch_slot = srsran::slot_point{NUMEROLOGY_IDX, slot_cfg.idx};
|
||||
} else {
|
||||
pusch_slot++;
|
||||
}
|
||||
|
||||
ret = sched.get_ul_sched(pusch_slot, 0, ul_sched);
|
||||
slot_point pusch_slot = srsran::slot_point{NUMEROLOGY_IDX, slot_cfg.idx};
|
||||
ret = sched.get_ul_sched(pusch_slot, 0, ul_sched);
|
||||
for (auto& pusch : ul_sched.pusch) {
|
||||
if (ue_db.contains(pusch.sch.grant.rnti)) {
|
||||
ue_db[pusch.sch.grant.rnti]->metrics_ul_mcs(pusch.sch.grant.tb->mcs);
|
||||
|
|
Loading…
Reference in New Issue