diff --git a/srsue/test/ttcn3/src/lte_ttcn3_phy.cc b/srsue/test/ttcn3/src/lte_ttcn3_phy.cc index d9804b761..0f634f844 100644 --- a/srsue/test/ttcn3/src/lte_ttcn3_phy.cc +++ b/srsue/test/ttcn3/src/lte_ttcn3_phy.cc @@ -159,7 +159,7 @@ void lte_ttcn3_phy::reset() log.debug("%s not implemented.\n", __FUNCTION__); }; -// The interface for MAC +// The interface for MAC (called from Stack thread context) void lte_ttcn3_phy::configure_prach_params() { log.debug("%s not implemented.\n", __FUNCTION__); @@ -167,6 +167,7 @@ void lte_ttcn3_phy::configure_prach_params() void lte_ttcn3_phy::prach_send(uint32_t preamble_idx, int allowed_subframe, float target_power_dbm, float ta_base_sec) { + std::lock_guard lock(mutex); log.info("Sending PRACH with preamble %d on PCID=%d\n", preamble_idx, pcell.info.id); prach_tti_tx = current_tti; ra_trans_cnt++; @@ -372,8 +373,6 @@ void lte_ttcn3_phy::run_tti() sr_pending = false; sr_tx_tti = current_tti; } - - stack->run_tti(current_tti, 1); } void lte_ttcn3_phy::set_cells_to_meas(uint32_t earfcn, const std::set& pci) {} diff --git a/srsue/test/ttcn3/src/ttcn3_ue.cc b/srsue/test/ttcn3/src/ttcn3_ue.cc index 9d061e3b5..87ab5df46 100644 --- a/srsue/test/ttcn3/src/ttcn3_ue.cc +++ b/srsue/test/ttcn3/src/ttcn3_ue.cc @@ -146,6 +146,7 @@ void ttcn3_ue::new_tb(const srsue::mac_interface_phy_lte::mac_grant_dl_t mac_gra void ttcn3_ue::set_current_tti(uint32_t tti) { phy->set_current_tti(tti); + stack->run_tti(tti, 1); } uint16_t ttcn3_ue::get_dl_sched_rnti(uint32_t tti)