From 921a04ce6542508f843c088e6657cb4f12831508 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 15 Jul 2021 17:39:19 +0200 Subject: [PATCH] enb,mac_nr: turn UE object into normal std::unique_ptr --- srsenb/hdr/stack/mac/mac_nr.h | 3 ++- srsenb/src/stack/mac/nr/mac_nr.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/srsenb/hdr/stack/mac/mac_nr.h b/srsenb/hdr/stack/mac/mac_nr.h index 1e26415ea..6c54cd4f0 100644 --- a/srsenb/hdr/stack/mac/mac_nr.h +++ b/srsenb/hdr/stack/mac/mac_nr.h @@ -99,7 +99,8 @@ private: // Map of active UEs pthread_rwlock_t rwlock = {}; static const uint16_t FIRST_RNTI = 0x4601; - rnti_map_t > ue_db; + srsran::static_circular_map, SRSENB_MAX_UES> ue_db; + std::atomic ue_counter; // BCH buffers diff --git a/srsenb/src/stack/mac/nr/mac_nr.cc b/srsenb/src/stack/mac/nr/mac_nr.cc index 5668ea225..9a7d275cb 100644 --- a/srsenb/src/stack/mac/nr/mac_nr.cc +++ b/srsenb/src/stack/mac/nr/mac_nr.cc @@ -173,7 +173,7 @@ uint16_t mac_nr::add_ue(uint32_t enb_cc_idx) // Allocate and initialize UE object // TODO: add sched interface - unique_rnti_ptr ue_ptr = make_rnti_obj(rnti, rnti, enb_cc_idx, nullptr, rrc, rlc, phy, logger); + std::unique_ptr ue_ptr = std::unique_ptr(new ue_nr(rnti, enb_cc_idx, nullptr, rrc, rlc, phy, logger)); // Add UE to rnti map srsran::rwlock_write_guard rw_lock(rwlock);