Added a local variable instead of global

This commit is contained in:
Sakthivel Velumani
2020-12-04 15:10:58 +01:00
parent 24bf54b2af
commit e5cd573ecb
5 changed files with 9 additions and 7 deletions
+4 -1
View File
@@ -71,6 +71,7 @@
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "enb_config.h"
#include "gnb_paramdef.h"
#ifndef OPENAIR2
@@ -101,7 +102,6 @@ extern int transmission_mode;
extern uint16_t sf_ahead;
extern uint16_t sl_ahead;
extern uint32_t num_threads_pusch;
//pthread_t main_gNB_thread;
time_stats_t softmodem_stats_mt; // main thread
@@ -872,6 +872,9 @@ void init_gNB_proc(int inst) {
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;
paramdef_t PUSCHThreads[] = NUM_THREADS_DESC;
config_get( PUSCHThreads,sizeof(PUSCHThreads)/sizeof(paramdef_t),NULL);
int threadCnt = min(numCPU, num_threads_pusch);
char ul_pool[80];
sprintf(ul_pool,"-1");