mirror of https://github.com/PentHertz/srsLTE.git
Apply PHY configs to workers sequentially without interrupting processing
This commit is contained in:
parent
fd3d4a7874
commit
71723c315d
|
@ -409,8 +409,11 @@ void phy::set_rar_grant(uint8_t grant_payload[SRSLTE_RAR_GRANT_LEN], uint16_t rn
|
|||
|
||||
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++) {
|
||||
workers[i]->set_crnti(rnti);
|
||||
sf_worker* w = (sf_worker*)workers_pool.wait_worker_id(i);
|
||||
w->set_crnti(rnti);
|
||||
w->release();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -439,8 +442,12 @@ void phy::set_config(srslte::phy_cfg_t& config_, uint32_t cc_idx, uint32_t earfc
|
|||
// Send configuration to workers
|
||||
for (uint32_t i = 0; i < nof_workers; i++) {
|
||||
if (cell_info) {
|
||||
workers[i]->set_cell(cc_idx, *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();
|
||||
}
|
||||
// set_config() is just a memcpy
|
||||
workers[i]->set_config(cc_idx, config_);
|
||||
}
|
||||
|
||||
|
|
|
@ -765,12 +765,16 @@ bool sync::set_cell()
|
|||
sfn_p.set_cell(cell);
|
||||
worker_com->set_cell(cell);
|
||||
|
||||
bool success = true;
|
||||
for (uint32_t i = 0; i < workers_pool->get_nof_workers(); i++) {
|
||||
if (!((sf_worker*)workers_pool->get_worker(i))->set_cell(0, cell)) {
|
||||
sf_worker* w = (sf_worker*)workers_pool->wait_worker_id(i);
|
||||
success &= w->set_cell(0, cell);
|
||||
w->release();
|
||||
}
|
||||
if (!success) {
|
||||
Error("SYNC: Setting cell: initiating PHCH worker\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Set options defined in expert section
|
||||
set_ue_sync_opts(&ue_sync, search_p.get_last_cfo());
|
||||
|
|
Loading…
Reference in New Issue