rework threads in 5G
This commit is contained in:
@@ -272,7 +272,6 @@ static void *gNB_L1_thread_tx(void *param) {
|
||||
//PHY_VARS_gNB *gNB = RC.gNB[0][proc->CC_id];
|
||||
char thread_name[100];
|
||||
sprintf(thread_name,"TXnp4_%d\n",&gNB->proc.L1_proc == proc ? 0 : 1);
|
||||
//thread_top_init(thread_name,1,470000,500000,500000);
|
||||
|
||||
//wait_sync("tx_thread");
|
||||
|
||||
@@ -327,7 +326,6 @@ static void *gNB_L1_thread( void *param ) {
|
||||
// set default return value
|
||||
gNB_thread_rxtx_status = 0;
|
||||
sprintf(thread_name,"RXn_TXnp4_%d",&gNB->proc.L1_proc == proc ? 0 : 1);
|
||||
//thread_top_init(thread_name,1,850000L,1000000L,2000000L);
|
||||
|
||||
while (!oai_exit) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0, 0 );
|
||||
@@ -651,7 +649,6 @@ static void* gNB_thread_prach( void* param ) {
|
||||
// set default return value
|
||||
gNB_thread_prach_status = 0;
|
||||
|
||||
thread_top_init("gNB_thread_prach",1,500000L,1000000L,20000000L);
|
||||
|
||||
|
||||
while (!oai_exit) {
|
||||
|
||||
+1
-6
@@ -777,7 +777,6 @@ static void *ru_thread_asynch_rxtx( void *param ) {
|
||||
RU_t *ru = (RU_t *)param;
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
int subframe=0, frame=0;
|
||||
thread_top_init("ru_thread_asynch_rxtx",1,870000L,1000000L,1000000L);
|
||||
// wait for top-level synchronization and do one acquisition to get timestamp for setting frame/subframe
|
||||
wait_sync("ru_thread_asynch_rxtx");
|
||||
// wait for top-level synchronization and do one acquisition to get timestamp for setting frame/subframe
|
||||
@@ -825,7 +824,6 @@ static void *ru_thread_prach( void *param ) {
|
||||
RU_proc_t *proc = (RU_proc_t *)&ru->proc;
|
||||
// set default return value
|
||||
ru_thread_prach_status = 0;
|
||||
thread_top_init("ru_thread_prach",1,500000L,1000000L,20000000L);
|
||||
|
||||
while (RC.ru_mask>0) {
|
||||
usleep(1e6);
|
||||
@@ -1211,7 +1209,6 @@ static void *ru_thread_tx( void *param ) {
|
||||
int i = 0;
|
||||
cpu_set_t cpuset;
|
||||
CPU_ZERO(&cpuset);
|
||||
thread_top_init("ru_thread_tx",1,400000,500000,500000);
|
||||
//CPU_SET(5, &cpuset);
|
||||
//pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
//wait_sync("ru_thread_tx");
|
||||
@@ -1324,7 +1321,6 @@ static void *ru_thread( void *param ) {
|
||||
ru_thread_status = 0;
|
||||
// set default return value
|
||||
sprintf(threadname,"ru_thread %d",ru->idx);
|
||||
thread_top_init(threadname,0,870000,1000000,1000000);
|
||||
LOG_I(PHY,"Starting RU %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
|
||||
|
||||
if(emulate_rf) {
|
||||
@@ -1507,7 +1503,6 @@ void *ru_thread_synch(void *arg) {
|
||||
static int ru_thread_synch_status;
|
||||
|
||||
|
||||
thread_top_init("ru_thread_synch",0,5000000,10000000,10000000);
|
||||
|
||||
wait_sync("ru_thread_synch");
|
||||
|
||||
@@ -1633,7 +1628,7 @@ void init_RU_proc(RU_t *ru) {
|
||||
pthread_cond_init( &proc->cond_asynch_rxtx, NULL);
|
||||
pthread_cond_init( &proc->cond_synch,NULL);
|
||||
pthread_cond_init( &proc->cond_gNBs, NULL);
|
||||
threadCreate( &proc->pthread_FH, ru_thread, (void *)ru, "thread_FH", -1, OAI_PRIORITY_RT );
|
||||
threadCreate( &proc->pthread_FH, ru_thread, (void *)ru, "thread_FH", -1, OAI_PRIORITY_RT_MAX );
|
||||
|
||||
if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT)
|
||||
threadCreate( &proc->pthread_FH1, ru_thread_tx, (void *)ru, "thread_FH1", -1, OAI_PRIORITY_RT );
|
||||
|
||||
@@ -1065,7 +1065,6 @@ int main( int argc, char **argv ) {
|
||||
} // UE_id
|
||||
|
||||
threadCreate(&forms_thread, scope_thread, NULL, "scope", -1, OAI_PRIORITY_RT_LOW);
|
||||
|
||||
printf("Scope thread created, ret=%d\n",ret);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -760,7 +760,7 @@ void init_UE(int nb_inst) {
|
||||
mac_inst->initial_bwp_ul.N_RB = UE->frame_parms.N_RB_UL;
|
||||
mac_inst->initial_bwp_ul.cyclic_prefix = UE->frame_parms.Ncp;
|
||||
LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]);
|
||||
threadCreate(&threads[inst], UE_thread, (void *)UE), "UEthread", -1, OAI_PRIORITY_RT);
|
||||
threadCreate(&threads[inst], UE_thread, (void *)UE, "UEthread", -1, OAI_PRIORITY_RT_MAX);
|
||||
}
|
||||
|
||||
printf("UE threads created by %ld\n", gettid());
|
||||
|
||||
Reference in New Issue
Block a user