From a7e92c384ebd6208dbcaa87346706ba466e5164f Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Wed, 18 Dec 2019 13:35:52 +0100 Subject: [PATCH] srsLTE: applied minor comments in tti semaphore --- lib/include/srslte/common/tti_sempahore.h | 13 ++++++------- srsue/src/phy/phy_common.cc | 2 -- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/include/srslte/common/tti_sempahore.h b/lib/include/srslte/common/tti_sempahore.h index 30221d471..2fa08eac3 100644 --- a/lib/include/srslte/common/tti_sempahore.h +++ b/lib/include/srslte/common/tti_sempahore.h @@ -39,11 +39,6 @@ private: std::deque fifo; public: - void reset() - { - // Do something here - } - void wait(T id) { bool expired = false; @@ -55,7 +50,9 @@ public: expired = (cvar.wait_until(lock, expire_time) == std::cv_status::timeout); } - assert(!expired); + if (expired) { + perror("TTI semaphore wait timeout"); + } } void push(T id) @@ -82,7 +79,9 @@ public: expired = (cvar.wait_until(lock, expire_time) == std::cv_status::timeout); } - assert(!expired); + if (expired) { + perror("TTI semaphore wait all expired"); + } } }; } // namespace srslte diff --git a/srsue/src/phy/phy_common.cc b/srsue/src/phy/phy_common.cc index fae74afbc..3e75586b6 100644 --- a/srsue/src/phy/phy_common.cc +++ b/srsue/src/phy/phy_common.cc @@ -649,8 +649,6 @@ void phy_common::get_sync_metrics(sync_metrics_t m[SRSLTE_MAX_CARRIERS]) void phy_common::reset_radio() { - semaphore.reset(); - // End Tx streams even if they are continuous // Since is_first_of_burst is set to true, the radio need to send // end of burst in order to stall correctly the Tx stream.