From 653506c252f841be123dfbc07b4c461219810979 Mon Sep 17 00:00:00 2001 From: Guy De Souza <desouza@eurecom.fr> Date: Wed, 18 Apr 2018 10:41:52 +0200 Subject: [PATCH] NR feptx thread --- openair1/SCHED_NR/nr_ru_procedures.c | 14 ++++++++++++++ targets/RT/USER/nr-ru.c | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/openair1/SCHED_NR/nr_ru_procedures.c b/openair1/SCHED_NR/nr_ru_procedures.c index 6523d44409..bb2fdfc91c 100644 --- a/openair1/SCHED_NR/nr_ru_procedures.c +++ b/openair1/SCHED_NR/nr_ru_procedures.c @@ -259,6 +259,20 @@ void ru_fep_full_2thread(RU_t *ru) { stop_meas(&ru->ofdm_demod_stats); }*/ +void nr_init_feptx_thread(RU_t *ru,pthread_attr_t *attr_feptx) { + + RU_proc_t *proc = &ru->proc; + + proc->instance_cnt_feptx = -1; + + pthread_mutex_init( &proc->mutex_feptx, NULL); + pthread_cond_init( &proc->cond_feptx, NULL); + + pthread_create(&proc->pthread_feptx, attr_feptx, nr_feptx_thread, (void*)ru); + + +} + void nr_feptx_ofdm(RU_t *ru) { diff --git a/targets/RT/USER/nr-ru.c b/targets/RT/USER/nr-ru.c index 0686cc72e8..697f0ec8ed 100644 --- a/targets/RT/USER/nr-ru.c +++ b/targets/RT/USER/nr-ru.c @@ -1591,7 +1591,7 @@ extern void nr_feptx_ofdm(RU_t *ru); extern void nr_feptx_ofdm_2thread(RU_t *ru); extern void feptx_prec(RU_t *ru); extern void init_fep_thread(RU_t *ru,pthread_attr_t *attr); -extern void init_feptx_thread(RU_t *ru,pthread_attr_t *attr); +extern void init_nr_feptx_thread(RU_t *ru,pthread_attr_t *attr); void init_RU_proc(RU_t *ru) { @@ -1672,7 +1672,7 @@ void init_RU_proc(RU_t *ru) { if (get_nprocs()>=2) { if (ru->feprx) init_fep_thread(ru,NULL); - if (ru->feptx_ofdm) init_feptx_thread(ru,NULL); + if (ru->feptx_ofdm) nr_init_feptx_thread(ru,NULL); } if (opp_enabled == 1) pthread_create(&ru->ru_stats_thread,NULL,ru_stats_thread,(void*)ru); -- GitLab