still to compile

This commit is contained in:
Laurent
2019-04-30 14:25:42 +02:00
parent 8a92138086
commit 4d787625ab
22 changed files with 39 additions and 148 deletions
+4 -12
View File
@@ -38,6 +38,8 @@
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include <common/utils/LOG/log.h>
#include <common/utils/system.h>
#include "PHY/types.h"
@@ -676,8 +678,8 @@ static void* gNB_thread_prach( void* param ) {
}
*/
extern void init_td_thread(PHY_VARS_gNB *, pthread_attr_t *);
extern void init_te_thread(PHY_VARS_gNB *, pthread_attr_t *);
extern void init_td_thread(PHY_VARS_gNB *);
extern void init_te_thread(PHY_VARS_gNB *);
void init_gNB_proc(int inst) {
int i=0;
@@ -685,8 +687,6 @@ void init_gNB_proc(int inst) {
PHY_VARS_gNB *gNB;
gNB_L1_proc_t *proc;
gNB_L1_rxtx_proc_t *L1_proc,*L1_proc_tx;
pthread_attr_t *attr0=NULL,*attr1=NULL;
//*attr_prach=NULL;
LOG_I(PHY,"%s(inst:%d) RC.nb_nr_CC[inst]:%d \n",__FUNCTION__,inst,RC.nb_nr_CC[inst]);
for (CC_id=0; CC_id<RC.nb_nr_CC[inst]; CC_id++) {
@@ -721,14 +721,6 @@ void init_gNB_proc(int inst) {
pthread_mutex_init( &proc->mutex_RU_PRACH,NULL);
pthread_cond_init( &proc->cond_prach, NULL);
pthread_cond_init( &proc->cond_asynch_rxtx, NULL);
pthread_attr_init( &proc->attr_prach);
pthread_attr_init( &proc->attr_asynch_rxtx);
// pthread_attr_init( &proc->attr_td);
// pthread_attr_init( &proc->attr_te);
pthread_attr_init( &L1_proc->attr);
pthread_attr_init( &L1_proc_tx->attr);
attr0 = &L1_proc->attr;
attr1 = &L1_proc_tx->attr;
LOG_I(PHY,"gNB->single_thread_flag:%d\n", gNB->single_thread_flag);
if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) {
+4 -30
View File
@@ -604,7 +604,6 @@ static void *emulatedRF_thread(void *param) {
struct timespec req = {0};
req.tv_sec = 0;
req.tv_nsec = (numerology>0)? ((microsec * 1000L)/numerology):(microsec * 1000L)*2;
threadTopInit("emulatedRF",-1,OAI_PRIORITY_RT_LOW);
wait_sync("emulatedRF_thread");
while(!oai_exit) {
@@ -1592,17 +1591,12 @@ extern void ru_fep_full_2thread(RU_t *ru);
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_nr_feptx_thread(RU_t *ru,pthread_attr_t *attr);
extern void init_fep_thread(RU_t *ru);
extern void init_nr_feptx_thread(RU_t *ru);
void init_RU_proc(RU_t *ru) {
int i=0;
RU_proc_t *proc;
pthread_attr_t *attr_FH=NULL, *attr_FH1=NULL,*attr_prach=NULL,*attr_asynch=NULL, *attr_emulateRF=NULL;// *attr_synch=NULL;
//pthread_attr_t *attr_fep=NULL;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
//pthread_attr_t *attr_prach_br=NULL;
#endif
char name[100];
#ifndef OCP_FRAMEWORK
LOG_I(PHY,"Initializing RU proc %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
@@ -1639,21 +1633,6 @@ 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);
pthread_attr_init( &proc->attr_FH);
pthread_attr_init( &proc->attr_FH1);
pthread_attr_init( &proc->attr_emulateRF);
pthread_attr_init( &proc->attr_prach);
pthread_attr_init( &proc->attr_synch);
pthread_attr_init( &proc->attr_asynch_rxtx);
pthread_attr_init( &proc->attr_fep);
#ifndef DEADLINE_SCHEDULER
attr_FH = &proc->attr_FH;
attr_FH1 = &proc->attr_FH1;
attr_emulateRF = &proc->attr_emulateRF;
attr_prach = &proc->attr_prach;
//attr_synch = &proc->attr_synch;
attr_asynch = &proc->attr_asynch_rxtx;
#endif
threadCreate( &proc->pthread_FH, ru_thread, (void *)ru, "thread_FH", -1, OAI_PRIORITY_RT );
if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT)
@@ -1679,9 +1658,9 @@ void init_RU_proc(RU_t *ru) {
}
if (get_nprocs()>=2) {
if (ru->feprx) init_fep_thread(ru,NULL);
if (ru->feprx) init_fep_thread(ru);
if (ru->feptx_ofdm) nr_init_feptx_thread(ru,NULL);
if (ru->feptx_ofdm) nr_init_feptx_thread(ru);
}
if (opp_enabled == 1) threadCreate(&ru->ru_stats_thread,ru_stats_thread,(void *)ru, "emulateRF", -1, OAI_PRIORITY_RT_LOW);
@@ -1769,11 +1748,6 @@ void kill_RU_proc(int inst) {
pthread_cond_destroy(&proc->cond_asynch_rxtx);
pthread_cond_destroy(&proc->cond_synch);
pthread_cond_destroy(&proc->cond_gNBs);
pthread_attr_destroy(&proc->attr_FH);
pthread_attr_destroy(&proc->attr_prach);
pthread_attr_destroy(&proc->attr_synch);
pthread_attr_destroy(&proc->attr_asynch_rxtx);
pthread_attr_destroy(&proc->attr_fep);
}
int check_capabilities(RU_t *ru,RRU_capabilities_t *cap) {
+1 -5
View File
@@ -394,7 +394,6 @@ void reset_stats(FL_OBJECT *button, long arg) {
}
static void *scope_thread(void *arg) {
threadTopInit("scope",-1,OAI_PRIORITY_RT_LOW);
int UE_id, CC_id;
int ue_cnt=0;
# ifdef ENABLE_XFORMS_WRITE_STATS
@@ -1065,10 +1064,7 @@ int main( int argc, char **argv ) {
} // CC_id
} // UE_id
ret = threadCreate(&forms_thread, scope_thread, NULL, "scope", -1, OAI_PRIORITY_RT_LOW);
if (ret == 0)
pthread_setname_np( forms_thread, "xforms" );
threadCreate(&forms_thread, scope_thread, NULL, "scope", -1, OAI_PRIORITY_RT_LOW);
printf("Scope thread created, ret=%d\n",ret);
}
+1 -1
View File
@@ -240,7 +240,7 @@ extern void set_function_spec_param(RU_t *ru);
extern void reset_opp_meas(void);
extern void print_opp_meas(void);
extern void init_fep_thread(PHY_VARS_gNB *, pthread_attr_t *);
extern void init_fep_thread(PHY_VARS_gNB *);
void init_gNB_afterRU(void);
-6
View File
@@ -538,7 +538,6 @@ int computeSamplesShift(PHY_VARS_NR_UE *UE) {
void *UE_thread(void *arg) {
//this thread should be over the processing thread to keep in real time
threadTopInit("UE_IQ",1,OAI_PRIORITY_RT_MAX);
PHY_VARS_NR_UE *UE = (PHY_VARS_NR_UE *) arg;
// int tx_enabled = 0;
openair0_timestamp timestamp;
@@ -741,11 +740,6 @@ void init_UE(int nb_inst) {
int inst;
NR_UE_MAC_INST_t *mac_inst;
pthread_t threads[nb_inst];
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
pthread_attr_setschedpolicy(&attr, SCHED_FIFO);
for (inst=0; inst < nb_inst; inst++) {
PHY_VARS_NR_UE *UE = PHY_vars_UE_g[inst][0];