diff --git a/lib/include/srslte/common/timers.h b/lib/include/srslte/common/timers.h index a931b25b4..a597a4133 100644 --- a/lib/include/srslte/common/timers.h +++ b/lib/include/srslte/common/timers.h @@ -100,7 +100,7 @@ class timer_handler void run() { - std::lock_guard lock(parent->mutex); + std::unique_lock lock(parent->mutex); if (not active) { ERROR("Error: calling run() for inactive timer id=%d\n", id()); return; diff --git a/lib/test/common/timer_test.cc b/lib/test/common/timer_test.cc index f69a92260..13359f0cc 100644 --- a/lib/test/common/timer_test.cc +++ b/lib/test/common/timer_test.cc @@ -199,7 +199,7 @@ int timers2_test3() static std::vector timers2_test4_t; static srslte::tti_sync_cv timers2_test4_tti_sync1; static srslte::tti_sync_cv timers2_test4_tti_sync2; -static uint32_t duration = 10000; +static uint32_t duration = 1000; static void timers2_test4_thread() {