Commit bcd149c7 authored by Robert Schmidt's avatar Robert Schmidt

first stop RU, then eNB; formatting

* stop the RU first, as it seems to prevent some deadlocks when soft-restarting
  the softmodem
* correct the formatting at the end of main
parent 5eb440f7
......@@ -789,10 +789,10 @@ int stop_L1L2(module_id_t enb_id)
/* these tasks need to pick up new configuration */
terminate_task(enb_id, TASK_ENB_APP, TASK_RRC_ENB);
terminate_task(enb_id, TASK_ENB_APP, TASK_L2L1);
LOG_I(ENB_APP, "calling kill_eNB_proc() for instance %d\n", enb_id);
kill_eNB_proc(enb_id);
LOG_I(ENB_APP, "calling kill_RU_proc() for instance %d\n", enb_id);
kill_RU_proc(enb_id);
LOG_I(ENB_APP, "calling kill_eNB_proc() for instance %d\n", enb_id);
kill_eNB_proc(enb_id);
oai_exit = 0;
for (int cc_id = 0; cc_id < RC.nb_CC[enb_id]; cc_id++) {
free_transport(RC.eNB[enb_id][cc_id]);
......@@ -1240,20 +1240,21 @@ int main( int argc, char **argv )
printf("stopping MODEM threads\n");
// cleanup
stop_eNB(NB_eNB_INST);
stop_RU(NB_RU);
/* release memory used by the RU/eNB threads (incomplete), after all
* threads have been stopped (they partially use the same memory) */
for (int inst = 0; inst < NB_eNB_INST; inst++) {
for (int cc_id = 0; cc_id < RC.nb_CC[inst]; cc_id++) {
free_transport(RC.eNB[inst][cc_id]);
phy_free_lte_eNB(RC.eNB[inst][cc_id]);
}
stop_RU(NB_RU);
stop_eNB(NB_eNB_INST);
/* release memory used by the RU/eNB threads (incomplete), after all
* threads have been stopped (they partially use the same memory) */
for (int inst = 0; inst < NB_eNB_INST; inst++) {
for (int cc_id = 0; cc_id < RC.nb_CC[inst]; cc_id++) {
free_transport(RC.eNB[inst][cc_id]);
phy_free_lte_eNB(RC.eNB[inst][cc_id]);
}
for (int inst = 0; inst < NB_RU; inst++) {
phy_free_RU(RC.ru[inst]);
}
free_lte_top();
}
for (int inst = 0; inst < NB_RU; inst++) {
phy_free_RU(RC.ru[inst]);
}
free_lte_top();
printf("About to call end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__);
end_configmodule();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment