diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 4206cfd585..48c5aca630 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -383,12 +383,16 @@ void init_gNB_Tpool(int inst) { void term_gNB_Tpool(int inst) { PHY_VARS_gNB *gNB = RC.gNB[inst]; - abortTpool(&gNB->threadPool); - abortNotifiedFIFO(&gNB->respDecode); abortNotifiedFIFO(&gNB->resp_L1); + pthread_join(gNB->L1_rx_thread, NULL); + abortNotifiedFIFO(&gNB->L1_tx_out); + pthread_join(gNB->L1_tx_thread, NULL); + + abortTpool(&gNB->threadPool); + abortNotifiedFIFO(&gNB->respPuschSymb); + abortNotifiedFIFO(&gNB->respDecode); abortNotifiedFIFO(&gNB->L1_tx_free); abortNotifiedFIFO(&gNB->L1_tx_filled); - abortNotifiedFIFO(&gNB->L1_tx_out); abortNotifiedFIFO(&gNB->L1_rx_out); gNB_L1_proc_t *proc = &gNB->proc;