sched_nr_interface: make PHY results a reference to avoid copying

master
Andre Puschmann 3 years ago
parent 2cee65bb88
commit cf4b6d0bea

@ -119,7 +119,8 @@ public:
using sched_rar_list_t = srsran::bounded_vector<rar_t, MAX_GRANTS>;
struct dl_sched_res_t {
sched_rar_list_t rar;
dl_sched_t dl_sched;
dl_sched_t& dl_sched;
dl_sched_res_t(dl_sched_t& dl_sched_) : dl_sched(dl_sched_) {}
};
virtual ~sched_nr_interface() = default;

@ -296,14 +296,13 @@ int mac_nr::get_dl_sched(const srsran_slot_cfg_t& slot_cfg, dl_sched_t& dl_sched
logger.set_context(slot_cfg.idx - TX_ENB_DELAY);
slot_point pdsch_slot = srsran::slot_point{NUMEROLOGY_IDX, slot_cfg.idx};
sched_nr_interface::dl_sched_res_t dl_res;
sched_nr_interface::dl_sched_res_t dl_res(dl_sched);
// Run Scheduler
int ret = sched.run_slot(pdsch_slot, 0, dl_res);
if (ret != SRSRAN_SUCCESS) {
return ret;
}
dl_sched = dl_res.dl_sched;
uint32_t rar_count = 0;
srsran::rwlock_read_guard rw_lock(rwmutex);

Loading…
Cancel
Save