From 1dd0194e32ba5d2030b2ca3318bdb45777f8375e Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Tue, 14 Oct 2025 20:36:48 +0200 Subject: [PATCH] remove unused global queues, dead code --- executables/lte-softmodem.c | 2 -- executables/nr-gnb.c | 11 +---------- openair1/PHY/defs_eNB.h | 1 - openair1/PHY/defs_gNB.h | 7 ------- openair1/SIMULATION/LTE_PHY/dlsim.c | 2 -- openair1/SIMULATION/LTE_PHY/ulsim.c | 2 -- openair1/SIMULATION/NR_PHY/dlsim.c | 6 +----- openair1/SIMULATION/NR_PHY/ulschsim.c | 1 - openair1/SIMULATION/NR_PHY/ulsim.c | 10 +--------- 9 files changed, 3 insertions(+), 39 deletions(-) diff --git a/executables/lte-softmodem.c b/executables/lte-softmodem.c index 25a3c25aa9..77fdb21eb4 100644 --- a/executables/lte-softmodem.c +++ b/executables/lte-softmodem.c @@ -497,12 +497,10 @@ int main ( int argc, char **argv ) L1_rxtx_proc_t *L1proc= &RC.eNB[x][CC_id]->proc.L1_proc; L1_rxtx_proc_t *L1proctx= &RC.eNB[x][CC_id]->proc.L1_proc_tx; L1proc->threadPool = (tpool_t *)malloc(sizeof(tpool_t)); - L1proc->respDecode=(notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t)); if ( strlen(get_softmodem_params()->threadPoolConfig) > 0 ) initTpool(get_softmodem_params()->threadPoolConfig, L1proc->threadPool, true); else initTpool("n", L1proc->threadPool, true); - initNotifiedFIFO(L1proc->respDecode); L1proctx->threadPool = L1proc->threadPool; } diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 1021aba1ce..505adf825c 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -332,15 +332,10 @@ void init_gNB_Tpool(int inst) gNB->num_pusch_symbols_per_thread = 1; // ULSCH decoding threadpool initTpool(get_softmodem_params()->threadPoolConfig, &gNB->threadPool, cpumeas(CPUMEAS_GETSTATE)); - // ULSCH decoder result FIFO - initNotifiedFIFO(&gNB->respPuschSymb); - initNotifiedFIFO(&gNB->respDecode); // L1 RX result FIFO initNotifiedFIFO(&gNB->resp_L1); - // L1 TX result FIFO - initNotifiedFIFO(&gNB->L1_tx_free); - initNotifiedFIFO(&gNB->L1_tx_filled); + // L1 TX result FIFO initNotifiedFIFO(&gNB->L1_tx_out); initNotifiedFIFO(&gNB->L1_rx_out); @@ -369,10 +364,6 @@ void term_gNB_Tpool(int inst) { 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_rx_out); gNB_L1_proc_t *proc = &gNB->proc; diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h index ef1db2e05f..6ae50482cc 100644 --- a/openair1/PHY/defs_eNB.h +++ b/openair1/PHY/defs_eNB.h @@ -254,7 +254,6 @@ typedef struct { pthread_mutex_t mutex_RUs; tpool_t *threadPool; int nbDecode; - notifiedFIFO_t *respDecode; int first_rx; } L1_rxtx_proc_t; diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index 987f77d953..29bf0ebf6b 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -537,17 +537,10 @@ typedef struct PHY_VARS_gNB_s { time_stats_t srs_beam_report_stats; time_stats_t srs_iq_matrix_stats; - notifiedFIFO_t respPuschSymb; - notifiedFIFO_t respDecode; notifiedFIFO_t resp_L1; - notifiedFIFO_t L1_tx_free; - notifiedFIFO_t L1_tx_filled; notifiedFIFO_t L1_tx_out; notifiedFIFO_t L1_rx_out; - notifiedFIFO_t resp_RU_tx; tpool_t threadPool; - int nbSymb; - int nbAarx; int num_pusch_symbols_per_thread; int dmrs_num_antennas_per_thread; pthread_t L1_rx_thread; diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index a593a0dfb4..d6e8482919 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -1263,9 +1263,7 @@ int main(int argc, char **argv) { L1_rxtx_proc_t *proc_eNB = &eNB->proc.L1_proc; proc_eNB->threadPool = (tpool_t *)malloc(sizeof(tpool_t)); - proc_eNB->respDecode=(notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t)); initTpool("n", proc_eNB->threadPool, true); - initNotifiedFIFO(proc_eNB->respDecode); proc_eNB->frame_tx=0; diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index d17f767a2a..76cc2e0716 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -795,9 +795,7 @@ int main(int argc, char **argv) { proc_rxtx_ue->subframe_tx = proc_rxtx->subframe_rx; proc_rxtx_ue->subframe_rx = (proc_rxtx->subframe_tx+6)%10; proc_rxtx->threadPool = (tpool_t *)malloc(sizeof(tpool_t)); - proc_rxtx->respDecode=(notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t)); initTpool("n", proc_rxtx->threadPool, true); - initNotifiedFIFO(proc_rxtx->respDecode); printf("Init UL hopping UE\n"); init_ul_hopping(&UE->frame_parms); diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index d1d046505e..c6dc39dc1d 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -965,12 +965,9 @@ int main(int argc, char **argv) //NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels; int ret = 1; initNamedTpool(gNBthreads, &gNB->threadPool, true, "gNB-tpool"); - initNotifiedFIFO(&gNB->L1_tx_free); - initNotifiedFIFO(&gNB->L1_tx_filled); initNotifiedFIFO(&gNB->L1_tx_out); // we create 2 threads for L1 tx processing - notifiedFIFO_elt_t *msgL1Tx = newNotifiedFIFO_elt(sizeof(processingData_L1tx_t),0,&gNB->L1_tx_free,processSlotTX); - processingData_L1tx_t *msgDataTx = (processingData_L1tx_t *)NotifiedFifoData(msgL1Tx); + processingData_L1tx_t *msgDataTx = malloc(sizeof(processingData_L1tx_t)); init_DLSCH_struct(gNB, msgDataTx); msgDataTx->slot = slot; msgDataTx->frame = frame; @@ -1091,7 +1088,6 @@ int main(int argc, char **argv) Sched_INFO->frame = frame; Sched_INFO->slot = slot; Sched_INFO->UL_dci_req.numPdus = 0; - pushNotifiedFIFO(&gNB->L1_tx_free,msgL1Tx); nr_schedule_response(Sched_INFO); /* PTRS values for DLSIM calculations */ diff --git a/openair1/SIMULATION/NR_PHY/ulschsim.c b/openair1/SIMULATION/NR_PHY/ulschsim.c index 64c04b900e..77a0046e1f 100644 --- a/openair1/SIMULATION/NR_PHY/ulschsim.c +++ b/openair1/SIMULATION/NR_PHY/ulschsim.c @@ -391,7 +391,6 @@ int main(int argc, char **argv) //gNB_config = &gNB->gNB_config; initTpool("n", &gNB->threadPool, true); - initNotifiedFIFO(&gNB->respDecode); frame_parms = &gNB->frame_parms; //to be initialized I suppose (maybe not necessary for PBCH) frame_parms->N_RB_DL = N_RB_DL; frame_parms->N_RB_UL = N_RB_UL; diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 93789ba737..c4b2f854c2 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -727,14 +727,7 @@ int main(int argc, char *argv[]) else initNamedTpool(gNBthreads, &gNB->threadPool, true, "gNB-tpool"); - initNotifiedFIFO(&gNB->respDecode); - - initNotifiedFIFO(&gNB->respPuschSymb); - initNotifiedFIFO(&gNB->L1_tx_free); - initNotifiedFIFO(&gNB->L1_tx_filled); - initNotifiedFIFO(&gNB->L1_tx_out); - notifiedFIFO_elt_t *msgL1Tx = newNotifiedFIFO_elt(sizeof(processingData_L1tx_t), 0, &gNB->L1_tx_free, NULL); - processingData_L1tx_t *msgDataTx = (processingData_L1tx_t *)NotifiedFifoData(msgL1Tx); + processingData_L1tx_t *msgDataTx = malloc(sizeof(processingData_L1tx_t)); msgDataTx->slot = -1; gNB->msgDataTx = msgDataTx; //gNB_config = &gNB->gNB_config; @@ -1299,7 +1292,6 @@ int main(int argc, char *argv[]) UE_proc.gNB_id = 0; // prepare ULSCH/PUSCH reception - pushNotifiedFIFO(&gNB->L1_tx_free, msgL1Tx); // to unblock the process in the beginning nr_schedule_response(Sched_INFO); // --------- setting parameters for UE --------