Commit 94946ec4 authored by Sakthivel Velumani's avatar Sakthivel Velumani

Remove hard-coding of no of threads

Script added to set the no of threads according to run-time conditions of the machine.
parent 76ec4720
......@@ -869,7 +869,14 @@ void init_gNB_proc(int inst) {
gNB->threadPool = (tpool_t*)malloc(sizeof(tpool_t));
gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
char ul_pool[] = "-1,-1";
int numCPU = sysconf(_SC_NPROCESSORS_ONLN);
char ul_pool[80];
sprintf(ul_pool,"%d",1);
int s_offset = 0;
for (int icpu=2; icpu<numCPU; icpu++) {
sprintf(ul_pool+1+s_offset,",%d",icpu);
s_offset += 2;
}
initTpool(ul_pool, gNB->threadPool, false);
initNotifiedFIFO(gNB->respDecode);
}
......
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