Fix memory fault during exiting and waiting for worker

master
Ismael Gomez 5 years ago
parent 9a0ea6e08c
commit 6a19a19f00

@ -174,9 +174,11 @@ void phy::rem_rnti(uint16_t rnti)
// Remove the RNTI when the TTI finishes, this has a delay up to the pipeline length (3 ms)
for (uint32_t i = 0; i < nof_workers; i++) {
sf_worker* w = (sf_worker*)workers_pool.wait_worker_id(i);
if (w) {
w->rem_rnti(rnti);
w->release();
}
}
if (SRSLTE_RNTI_ISUSER(rnti)) {
workers_common.ue_db.rem_rnti(rnti);
workers_common.clear_grants(rnti);

@ -390,9 +390,11 @@ void phy::set_crnti(uint16_t rnti)
// set_crnti() is an operation that takes time, apply asynrhonously with processing
for (uint32_t i = 0; i < nof_workers; i++) {
sf_worker* w = (sf_worker*)workers_pool.wait_worker_id(i);
if (w) {
w->set_crnti(rnti);
w->release();
}
}
}
// Start GUI
@ -429,9 +431,11 @@ void phy::set_config(srslte::phy_cfg_t& config_, uint32_t cc_idx, uint32_t earfc
if (cell_info) {
// set_cell() is an operation that takes time, apply asynrhonously with processing
sf_worker* w = (sf_worker*)workers_pool.wait_worker_id(i);
if (w) {
w->set_cell(cc_idx, *cell_info);
w->release();
}
}
// set_config() is just a memcpy
workers[i]->set_config(cc_idx, config_);
}

@ -708,9 +708,11 @@ bool sync::set_cell(float cfo)
bool success = true;
for (uint32_t i = 0; i < workers_pool->get_nof_workers(); i++) {
sf_worker* w = (sf_worker*)workers_pool->wait_worker_id(i);
if (w) {
success &= w->set_cell(0, cell);
w->release();
}
}
if (!success) {
Error("SYNC: Setting cell: initiating PHCH worker\n");
return false;

Loading…
Cancel
Save