Fix memory fault during exiting and waiting for worker

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

@ -174,8 +174,10 @@ 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);
w->rem_rnti(rnti);
w->release();
if (w) {
w->rem_rnti(rnti);
w->release();
}
}
if (SRSLTE_RNTI_ISUSER(rnti)) {
workers_common.ue_db.rem_rnti(rnti);

@ -390,8 +390,10 @@ 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);
w->set_crnti(rnti);
w->release();
if (w) {
w->set_crnti(rnti);
w->release();
}
}
}
@ -429,8 +431,10 @@ 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);
w->set_cell(cc_idx, *cell_info);
w->release();
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,8 +708,10 @@ 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);
success &= w->set_cell(0, cell);
w->release();
if (w) {
success &= w->set_cell(0, cell);
w->release();
}
}
if (!success) {
Error("SYNC: Setting cell: initiating PHCH worker\n");

Loading…
Cancel
Save