applied changes in the stack internal method naming

master
Francisco Paisana 5 years ago committed by Andre Puschmann
parent ce29ed545d
commit 8f8d9f3f30

@ -115,8 +115,8 @@ public:
private: private:
void run_thread() final; void run_thread() final;
void run_tti_(uint32_t tti); void run_tti_impl(uint32_t tti);
void stop_(); void stop_impl();
bool running; bool running;
srsue::stack_args_t args; srsue::stack_args_t args;

@ -116,34 +116,28 @@ int ue_stack_lte::init(const stack_args_t& args_, srslte::logger* logger_)
void ue_stack_lte::stop() void ue_stack_lte::stop()
{ {
if (running) { if (running) {
pending_tasks.push([this]() { stop_(); }); pending_tasks.push([this]() { stop_impl(); });
running = false;
wait_thread_finish(); wait_thread_finish();
} }
} }
void ue_stack_lte::stop_() void ue_stack_lte::stop_impl()
{ {
if (running) { usim->stop();
usim->stop(); nas.stop();
nas.stop(); rrc.stop();
rrc.stop();
// Caution here order of stop is very important to avoid locks
// Stop RLC and PDCP before GW to avoid locking on queue rlc.stop();
rlc.stop(); pdcp.stop();
pdcp.stop(); mac.stop();
mac.stop();
if (args.pcap.enable) {
mac_pcap.close();
}
if (args.pcap.nas_enable) {
nas_pcap.close();
}
running = false; if (args.pcap.enable) {
mac_pcap.close();
}
if (args.pcap.nas_enable) {
nas_pcap.close();
} }
} }
@ -217,10 +211,10 @@ void ue_stack_lte::out_of_sync()
void ue_stack_lte::run_tti(uint32_t tti) void ue_stack_lte::run_tti(uint32_t tti)
{ {
pending_tasks.push([this, tti]() { run_tti_(tti); }); pending_tasks.push([this, tti]() { run_tti_impl(tti); });
} }
void ue_stack_lte::run_tti_(uint32_t tti) void ue_stack_lte::run_tti_impl(uint32_t tti)
{ {
mac.run_tti(tti); mac.run_tti(tti);
rrc.run_tti(tti); rrc.run_tti(tti);

@ -148,14 +148,7 @@ public:
pdcp->write_sdu(lcid, std::move(sdu), blocking); pdcp->write_sdu(lcid, std::move(sdu), blocking);
} }
bool is_lcid_enabled(uint32_t lcid) { return pdcp->is_lcid_enabled(lcid); } bool is_lcid_enabled(uint32_t lcid) { return pdcp->is_lcid_enabled(lcid); }
void run_thread() void run_thread() { running = true; }
{
running = true;
uint32_t counter = 0;
// while (running) {
// nas->run_tti(counter++);
// }
}
void stop() void stop()
{ {
running = false; running = false;

Loading…
Cancel
Save