From be0541aa8c2d7a1eacd0164bf717fa4588c2fd8d Mon Sep 17 00:00:00 2001
From: laurent <laurent.thomas@free.fr>
Date: Thu, 16 Feb 2017 11:38:38 +0100
Subject: [PATCH] remove a race

---
 .../GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf      | 8 ++++----
 targets/RT/USER/lte-ue.c                                  | 2 ++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf
index 27ec2831150..752ab6d1235 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf
@@ -31,16 +31,16 @@ eNBs =
         tdd_config_s            			      = 0;
         prefix_type             			      = "NORMAL";
         eutra_band              			      = 7;
-        downlink_frequency      			      = 2660000000L;
+        downlink_frequency      			      = 2630000000L;
         uplink_frequency_offset 			      = -120000000;
         Nid_cell					      = 0;
-        N_RB_DL                 			      = 25;
+        N_RB_DL                 			      = 50;
         Nid_cell_mbsfn          			      = 0;
         nb_antenna_ports          			      = 1;
         nb_antennas_tx          			      = 1;
         nb_antennas_rx          			      = 1;
-        tx_gain                                            = 80;
-        rx_gain                                            = 90;
+        tx_gain                                            = 90;
+        rx_gain                                            = 110;
         prach_root              			      = 0;
         prach_config_index      			      = 0;
         prach_high_speed        			      = "DISABLE";
diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c
index decc793411a..b4e02f1874d 100644
--- a/targets/RT/USER/lte-ue.c
+++ b/targets/RT/USER/lte-ue.c
@@ -625,7 +625,9 @@ void *UE_thread(void *arg) {
                                                             rxp,
                                                             UE->frame_parms.samples_per_tti*10,
                                                             UE->frame_parms.nb_antennas_rx), "");
+		AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), "");
                 instance_cnt_synch = ++UE->proc.instance_cnt_synch;
+		AssertFatal ( 0== pthread_mutex_unlock(&UE->proc.mutex_synch), "");
                 if (instance_cnt_synch == 0) {
                     AssertFatal( 0 == pthread_cond_signal(&UE->proc.cond_synch), "");
                 } else {
-- 
GitLab