From fffa1a3ff8ce9fa2653002e69c000ab9de912e61 Mon Sep 17 00:00:00 2001
From: Laurent THOMAS <laurent.thomas@open-cells.com>
Date: Thu, 20 May 2021 14:20:00 +0200
Subject: [PATCH] fix nr UE bug: random freeze (mutex not init)

---
 executables/nr-ue.c                     | 2 +-
 openair1/SCHED/phy_procedures_lte_eNb.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index 0ff68b131..53ec70330 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -608,7 +608,7 @@ void *UE_thread(void *arg) {
     thread_idx = absolute_slot % NR_RX_NB_TH;
     int slot_nr = absolute_slot % nb_slot_frame;
     notifiedFIFO_elt_t *msgToPush;
-    AssertFatal((msgToPush=pullTpool(&freeBlocks,&(get_nrUE_params()->Tpool))) != NULL,"chained list failure");
+    AssertFatal((msgToPush=pullNotifiedFIFO_nothreadSafe(&freeBlocks)) != NULL,"chained list failure");
     nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(msgToPush);
     curMsg->UE=UE;
     // update thread index for received subframe
diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c
index f40f760f4..973c921d2 100644
--- a/openair1/SCHED/phy_procedures_lte_eNb.c
+++ b/openair1/SCHED/phy_procedures_lte_eNb.c
@@ -55,7 +55,6 @@
 #include "common/ran_context.h"
 extern RAN_CONTEXT_t RC;
 
-nfapi_ue_release_request_body_t release_rntis;
 
 int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t ULSCH_id,uint8_t harq_pid, uint8_t bw_factor) {
   uint32_t Nre,sumKr,MPR_x100,Kr,r;
-- 
2.26.2