Using only one threadPool for nr-softmodem

This commit is contained in:
Sakthivel Velumani
2021-02-10 15:45:40 +01:00
parent d29e09cdb1
commit 2e0ed038d3
5 changed files with 42 additions and 97 deletions
+9 -15
View File
@@ -870,7 +870,7 @@ void init_gNB_proc(int inst) {
pthread_cond_init(&sync_phy_proc.cond_phy_proc_tx, NULL);
sync_phy_proc.phy_proc_CC_id = 0;
gNB->threadPool_ulsch = (tpool_t*)malloc(sizeof(tpool_t));
gNB->threadPool = (tpool_t*)malloc(sizeof(tpool_t));
gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
int numCPU = sysconf(_SC_NPROCESSORS_ONLN);
uint32_t num_threads_pusch;
@@ -884,7 +884,7 @@ void init_gNB_proc(int inst) {
sprintf(ul_pool+2+s_offset,",-1");
s_offset += 3;
}
initTpool(ul_pool, gNB->threadPool_ulsch, false);
initTpool(ul_pool, gNB->threadPool, false);
initNotifiedFIFO(gNB->respDecode);
}
@@ -893,8 +893,7 @@ void init_gNB_Tpool(int inst) {
gNB = RC.gNB[inst];
// ULSCH decoding threadpool
gNB->threadPool_ulsch = (tpool_t*)malloc(sizeof(tpool_t));
gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
gNB->threadPool = (tpool_t*)malloc(sizeof(tpool_t));
int numCPU = sysconf(_SC_NPROCESSORS_ONLN);
uint32_t num_threads_pusch;
paramdef_t PUSCHThreads[] = NUM_THREADS_DESC;
@@ -907,26 +906,21 @@ void init_gNB_Tpool(int inst) {
sprintf(ul_pool+2+s_offset,",-1");
s_offset += 3;
}
initTpool(ul_pool, gNB->threadPool_ulsch, false);
initTpool(ul_pool, gNB->threadPool, false);
// ULSCH decoder result FIFO
gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
initNotifiedFIFO(gNB->respDecode);
// L1 RX threadpool
gNB->threadPool_L1 = (tpool_t*)malloc(sizeof(tpool_t));
// L1 RX result FIFO
gNB->resp_L1 = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
initTpool("-1", gNB->threadPool_L1, false);
initNotifiedFIFO(gNB->resp_L1);
pushNotifiedFIFO_nothreadSafe(gNB->resp_L1, newNotifiedFIFO_elt(20, 0,NULL,NULL));
// L1 TX threadpool
gNB->threadPool_L1_tx = (tpool_t*)malloc(sizeof(tpool_t));
// L1 TX result FIFO
gNB->resp_L1_tx = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
initTpool("-1,-1,-1",gNB->threadPool_L1_tx, false);
initNotifiedFIFO(gNB->resp_L1_tx);
// RU TX threadpool
gNB->threadPool_RU_tx = (tpool_t*)malloc(sizeof(tpool_t));
// RU TX result FIFO
gNB->resp_RU_tx = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
initTpool("-1",gNB->threadPool_RU_tx, false);
initNotifiedFIFO(gNB->resp_RU_tx);
}