Commit 0786e2b2 authored by Sakthivel Velumani's avatar Sakthivel Velumani

Added a local variable instead of global

parent d0fae408
......@@ -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");
......
......@@ -98,8 +98,6 @@ int config_sync_var=-1;
volatile int start_gNB = 0;
volatile int oai_exit = 0;
uint32_t num_threads_pusch;
static int wait_for_sync = 0;
unsigned int mmapped_dma=0;
......
......@@ -75,7 +75,6 @@ rlc_info_t Rlc_info_um,Rlc_info_am_config;
PHY_VARS_gNB *gNB;
PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t RC;
uint32_t num_threads_pusch;
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
double cpuf;
......
......@@ -71,7 +71,6 @@ rlc_info_t Rlc_info_um,Rlc_info_am_config;
PHY_VARS_gNB *gNB;
PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t RC;
uint32_t num_threads_pusch;
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
int sf_ahead=4 ;
......
......@@ -50,7 +50,6 @@
extern int asn_debug;
extern int asn1_xer_print;
extern uint32_t num_threads_pusch;
#ifdef LIBCONFIG_LONG
#define libconfig_int long
......@@ -91,9 +90,13 @@ typedef enum {
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define GNBSPARAMS_DESC { \
{GNB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, uptr:NULL, defstrval:GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_ACTIVE_GNBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0}, \
{GNB_CONFIG_STRING_ACTIVE_GNBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0} \
}
#define NUM_THREADS_DESC { \
{GNB_CONFIG_PUSCH_THREADS, NULL, 0, uptr:&num_threads_pusch, defuintval:1, TYPE_UINT, 0} \
}
#define GNB_ASN1_VERBOSITY_IDX 0
#define GNB_ACTIVE_GNBS_IDX 1
......
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