Commit 682888c7 authored by Raymond Knopp's avatar Raymond Knopp

added mutex to not allow two simultaneous SLSCH decoding

parent 2ce76e77
......@@ -1341,6 +1341,7 @@ typedef struct {
pthread_mutex_t slss_mutex;
pthread_mutex_t sldch_mutex;
pthread_mutex_t slsch_mutex;
pthread_mutex_t slsch_rx_mutex;
int slbch_errors;
int slbch_rxops;
//Paging parameters
......
......@@ -4801,10 +4801,13 @@ void phy_procedures_UE_SL_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
if (ue->is_SynchRef == 0 && frame_rx==0 && subframe_rx==0) LOG_I(PHY,"Connected with SyncRef UE (slbch errors %d/%d)\n",
ue->slbch_errors,ue->slbch_rxops);
AssertFatal(0==pthread_mutex_lock(&ue->slsch_rx_mutex),"");
rx_slcch(ue,proc,frame_rx,subframe_rx);
rx_slsch(ue,proc,frame_rx,subframe_rx);
AssertFatal(0==pthread_mutex_unlock(&ue->slsch_rx_mutex),"");
if (frame_rx==0 && subframe_rx==0) {
for (int i=0;i<MAX_SLDCH;i++) if (ue->sldch_rxcnt[i]>0) LOG_I(PHY,"n_psdch %d RX count %d\n",i,ue->sldch_rxcnt[i]);
for (int i=0;i<4;i++) if (ue->slsch_rxcnt[i]>0) LOG_I(PHY,"n_pssch[%d] rx count %d\n",i,ue->slsch_rxcnt[i]);
......
......@@ -1639,6 +1639,7 @@ void init_UE_threads(int inst) {
pthread_mutex_init(&UE->slss_mutex,NULL);
pthread_mutex_init(&UE->sldch_mutex,NULL);
pthread_mutex_init(&UE->slsch_mutex,NULL);
pthread_mutex_init(&UE->slsch_rx_mutex,NULL);
pthread_create(&UE->proc.pthread_synchSL,NULL,UE_thread_synchSL,(void*)UE);
}
}
......
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