Commit cbbefb59 authored by Florian Kaltenberger's avatar Florian Kaltenberger

forgot to commit openair2


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4175 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 27a311ab
......@@ -4191,6 +4191,7 @@ void eNB_dlsch_ulsch_scheduler(u8 Mod_id,u8 cooperation_flag, u32 frame, u8 subf
unsigned int nCCE=0;
int mbsfn_status=0;
u32 RBalloc=0;
int ret;
DCI_PDU *DCI_pdu= &eNB_mac_inst[Mod_id].DCI_pdu;
// LOG_D(MAC,"[eNB %d] Frame %d, Subframe %d, entering MAC scheduler\n",Mod_id, frame, subframe);
......@@ -4213,8 +4214,12 @@ void eNB_dlsch_ulsch_scheduler(u8 Mod_id,u8 cooperation_flag, u32 frame, u8 subf
#ifdef EXMIMO
//pdcp_run(frame, 1, 0, Mod_id);
if (pthread_mutex_lock (&pdcp_mutex) != 0) {
LOG_E(PDCP,"Cannot lock mutex\n");
ret = pthread_mutex_trylock (&pdcp_mutex);
if (ret != 0) {
if (ret==EBUSY)
LOG_E(PDCP,"Mutex busy\n");
else
LOG_E(PDCP,"Cannot lock mutex\n");
//return(-1);
}
else {
......@@ -4231,7 +4236,6 @@ void eNB_dlsch_ulsch_scheduler(u8 Mod_id,u8 cooperation_flag, u32 frame, u8 subf
LOG_W(PDCP,"PDCP thread busy!!! inst_cnt=%d\n",pdcp_instance_cnt);
}
}
#endif
#ifdef CELLULAR
rrc_rx_tx(Mod_id, frame, 0, 0);
......
......@@ -1272,7 +1272,8 @@ UE_L2_STATE_t ue_scheduler(u8 Mod_id,u32 frame, u8 subframe, lte_subframe_t dire
// mac_rlc_status_resp_t rlc_status[MAX_NUM_LCGID]; // 4
// s8 lcg_id;
struct RACH_ConfigCommon *rach_ConfigCommon = (struct RACH_ConfigCommon *)NULL;
int ret;
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER, VCD_FUNCTION_IN);
//Mac_rlc_xface->frame=frame;
......@@ -1281,8 +1282,12 @@ UE_L2_STATE_t ue_scheduler(u8 Mod_id,u32 frame, u8 subframe, lte_subframe_t dire
#ifdef EXMIMO
//pdcp_run(frame, 0, Mod_id, eNB_index);
if (pthread_mutex_lock (&pdcp_mutex) != 0) {
LOG_E(PDCP,"Cannot lock mutex\n");
ret = pthread_mutex_trylock (&pdcp_mutex);
if (ret != 0) {
if (ret==EBUSY)
LOG_E(PDCP,"Mutex busy\n");
else
LOG_E(PDCP,"Cannot lock mutex\n");
//return(-1);
}
else {
......@@ -1299,7 +1304,6 @@ UE_L2_STATE_t ue_scheduler(u8 Mod_id,u32 frame, u8 subframe, lte_subframe_t dire
LOG_W(PDCP,"PDCP thread busy!!! inst_cnt=%d\n",pdcp_instance_cnt);
}
}
#endif
UE_mac_inst[Mod_id].frame = frame;
UE_mac_inst[Mod_id].subframe = subframe;
......
......@@ -92,7 +92,7 @@ extern pthread_cond_t pdcp_cond;
extern int pdcp_instance_cnt;
static void *pdcp_thread_main(void* param);
int init_pdcp_thread(u8 eNB_flag);
int init_pdcp_thread(void);
void cleanup_pdcp_thread(void);
typedef unsigned char BOOL;
......
......@@ -49,6 +49,7 @@
#define OPENAIR_THREAD_PRIORITY 255
extern int oai_exit;
extern char UE_flag;
pthread_t pdcp_thread;
pthread_attr_t pdcp_thread_attr;
......@@ -58,7 +59,10 @@ int pdcp_instance_cnt;
static void *pdcp_thread_main(void* param) {
u8 eNB_flag = *((u8*)param);
//u8 eNB_flag = *((u8*)param);
u8 eNB_flag = !UE_flag;
LOG_I(PDCP,"This is pdcp_thread eNB_flag = %d\n",eNB_flag);
while (!oai_exit) {
......@@ -78,11 +82,11 @@ static void *pdcp_thread_main(void* param) {
if (eNB_flag) {
pdcp_run(PHY_vars_eNB_g[0]->frame, eNB_flag, PHY_vars_eNB_g[0]->Mod_id, 0);
//LOG_I(PDCP,"Calling pdcp_run (eNB) for frame %d\n",PHY_vars_eNB_g[0]->frame);
LOG_D(PDCP,"Calling pdcp_run (eNB) for frame %d\n",PHY_vars_eNB_g[0]->frame);
}
else {
pdcp_run(PHY_vars_UE_g[0]->frame, eNB_flag, 0, PHY_vars_UE_g[0]->Mod_id);
//LOG_I(PDCP,"Calling pdcp_run (UE) for frame %d\n",PHY_vars_UE_g[0]->frame);
LOG_D(PDCP,"Calling pdcp_run (UE) for frame %d\n",PHY_vars_UE_g[0]->frame);
}
......@@ -101,7 +105,7 @@ static void *pdcp_thread_main(void* param) {
int init_pdcp_thread(u8 eNB_flag) {
int init_pdcp_thread(void) {
int error_code;
struct sched_param p;
......@@ -123,7 +127,7 @@ int init_pdcp_thread(u8 eNB_flag) {
error_code = pthread_create(&pdcp_thread,
&pdcp_thread_attr,
pdcp_thread_main,
(void*)(&eNB_flag));
(void*)NULL);
if (error_code!= 0) {
LOG_I(PDCP,"Could not allocate PDCP thread, error %d\n",error_code);
......
......@@ -42,7 +42,7 @@ include $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated
ASN_CONVERTER_SOURCES+=asn1_msg.c
EXTRA_CFLAGS += -I. -I$(OPENAIR2_DIR)/RRC/LITE/MESSAGES -g -ggdb #-DEMIT_ASN_DEBUG #-Wall
EXTRA_CFLAGS += -I. -I$(OPENAIR2_DIR)/RRC/LITE/MESSAGES
ASN1_MODULE_OBJS=${ASN_MODULE_SOURCES:.c=.o}
ASN1_CONVERTER_OBJS=${ASN_CONVERTER_SOURCES:.c=.o}
......
......@@ -148,6 +148,10 @@ const char* eurecomFunctionsNames[] = {
"phy_enb_ulsch_decoding",
"phy_ue_ulsch_modulation",
"phy_ue_ulsch_encoding",
"phy_ue_ulsch_scramblig",
"phy_eNB_dlsch_modulation",
"phy_eNB_dlsch_encoding",
"phy_eNB_dlsch_scramblig",
"pdcp_apply_security",
"pdcp_validate_security",
"test"
......
......@@ -120,6 +120,10 @@ typedef enum
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_MODULATION,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_SCRAMBLING,
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION,
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING,
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_APPLY_SECURITY,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_VALIDATE_SECURITY,
VCD_SIGNAL_DUMPER_FUNCTIONS_TEST,
......
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