Commit 5eb440f7 authored by Robert Schmidt's avatar Robert Schmidt

correctly join RU threads

* join RU FH thread first as it depends on the others
* join RU FHTX only if it has been started (check as for pthread_create())
* join PRACH thread in the monolithic case
parent e16af0c2
...@@ -1905,6 +1905,8 @@ void kill_RU_proc(int inst) ...@@ -1905,6 +1905,8 @@ void kill_RU_proc(int inst)
proc->instance_cnt_FH = 0; proc->instance_cnt_FH = 0;
pthread_cond_signal(&proc->cond_FH); pthread_cond_signal(&proc->cond_FH);
pthread_mutex_unlock(&proc->mutex_FH); pthread_mutex_unlock(&proc->mutex_FH);
LOG_D(PHY, "Joining pthread_FH\n");
pthread_join(proc->pthread_FH, NULL);
pthread_mutex_lock(&proc->mutex_FH1); pthread_mutex_lock(&proc->mutex_FH1);
proc->instance_cnt_FH1 = 0; proc->instance_cnt_FH1 = 0;
...@@ -1939,10 +1941,10 @@ void kill_RU_proc(int inst) ...@@ -1939,10 +1941,10 @@ void kill_RU_proc(int inst)
pthread_cond_signal(&proc->cond_asynch_rxtx); pthread_cond_signal(&proc->cond_asynch_rxtx);
pthread_mutex_unlock(&proc->mutex_asynch_rxtx); pthread_mutex_unlock(&proc->mutex_asynch_rxtx);
LOG_D(PHY, "Joining pthread_FH\n"); if (get_nprocs() > 4) {
pthread_join(proc->pthread_FH, NULL);
LOG_D(PHY, "Joining pthread_FHTX\n"); LOG_D(PHY, "Joining pthread_FHTX\n");
pthread_join(proc->pthread_FH1, NULL); pthread_join(proc->pthread_FH1, NULL);
}
if (ru->function == NGFI_RRU_IF4p5) { if (ru->function == NGFI_RRU_IF4p5) {
LOG_D(PHY, "Joining pthread_prach\n"); LOG_D(PHY, "Joining pthread_prach\n");
pthread_join(proc->pthread_prach, NULL); pthread_join(proc->pthread_prach, NULL);
...@@ -1962,6 +1964,10 @@ void kill_RU_proc(int inst) ...@@ -1962,6 +1964,10 @@ void kill_RU_proc(int inst)
pthread_join(proc->pthread_asynch_rxtx, NULL); pthread_join(proc->pthread_asynch_rxtx, NULL);
} }
} }
else if (ru->function == eNodeB_3GPP && ru->if_south == LOCAL_RF) {
LOG_D(PHY, "Joining pthread_prach\n");
pthread_join(proc->pthread_prach, NULL);
}
if (get_nprocs() > 2 && fepw) { if (get_nprocs() > 2 && fepw) {
if (ru->feprx) { if (ru->feprx) {
pthread_mutex_lock(&proc->mutex_fep); pthread_mutex_lock(&proc->mutex_fep);
......
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