From d951795ae415fe63e2e8843208a402c8f0305811 Mon Sep 17 00:00:00 2001 From: fnabet <fabrice.nabet@alcatelonetouch.com> Date: Wed, 21 Jun 2017 15:58:12 +0200 Subject: [PATCH] build fixes --- openair1/SCHED/defs.h | 3 +++ openair1/SCHED/phy_procedures_lte_ue.c | 3 ++- targets/RT/USER/lte-ue.c | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/openair1/SCHED/defs.h b/openair1/SCHED/defs.h index bb71e0deb9a..73883ebc5e1 100644 --- a/openair1/SCHED/defs.h +++ b/openair1/SCHED/defs.h @@ -43,6 +43,7 @@ enum THREAD_INDEX { OPENAIR_THREAD_INDEX = 0, #define OPENAIR_THREAD_STACK_SIZE PTHREAD_STACK_MIN //4096 //RTL_PTHREAD_STACK_MIN*6 //#define DLC_THREAD_STACK_SIZE 4096 //DLC stack size +//#define UE_SLOT_PARALLELISATION enum openair_SCHED_STATUS { openair_SCHED_STOPPED=1, @@ -140,7 +141,9 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t */ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,runmode_t mode,relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn); +#ifdef UE_SLOT_PARALLELISATION void *UE_thread_fep_slot1(void *arg); +#endif /*! \brief Scheduling for UE TX procedures in TDD S-subframes. @param phy_vars_ue Pointer to UE variables on which to act diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index ef1db033e4c..8ad3ae27a21 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -73,6 +73,7 @@ fifo_dump_emos_UE emos_dump_UE; #define NS_PER_SLOT 500000 + extern int oai_exit; extern double cpuf; @@ -4146,7 +4147,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, } -#if 0 +#ifdef UE_SLOT_PARALLELISATION /*! * \brief This is the UE synchronize thread. * It performs band scanning and synchonization. diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index aab70aebaa8..791c4778f06 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -843,6 +843,7 @@ void *UE_thread(void *arg) { return NULL; } +#ifdef UE_SLOT_PARALLELISATION void *UE_thread_fep_slot1(void *arg) { static __thread int UE_thread_rxtx_retval; @@ -1095,6 +1096,8 @@ void *UE_thread_fep_slot1(void *arg) { free(arg); return &UE_thread_rxtx_retval; } +#endif + /*! * \brief Initialize the UE theads. * Creates the UE threads: @@ -1109,7 +1112,9 @@ void *UE_thread_fep_slot1(void *arg) { */ void init_UE_threads(PHY_VARS_UE *UE) { struct rx_tx_thread_data *rtd; +#ifdef UE_SLOT_PARALLELISATION struct fep_slot1_thread_data *fep_slot1_data; +#endif pthread_attr_init (&UE->proc.attr_ue); pthread_attr_setstacksize(&UE->proc.attr_ue,8192);//5*PTHREAD_STACK_MIN); @@ -1130,9 +1135,12 @@ void init_UE_threads(PHY_VARS_UE *UE) { UE->proc.proc_rxtx[i].sub_frame_step=nb_threads; pthread_create(&UE->proc.proc_rxtx[i].pthread_rxtx, NULL, UE_thread_rxn_txnp4, rtd); +#ifdef UE_SLOT_PARALLELISATION pthread_mutex_init(&UE->proc.proc_rxtx[i].mutex_fep_slot1,NULL); pthread_cond_init(&UE->proc.proc_rxtx[i].cond_fep_slot1,NULL); pthread_create(&UE->proc.proc_rxtx[i].pthread_fep_slot1,NULL,UE_thread_fep_slot1, rtd); +#endif + } pthread_create(&UE->proc.pthread_synch,NULL,UE_thread_synch,(void*)UE); } -- GitLab