From 870b96c643388ae88dd4245b9169f526d6a8d49e Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 25 Mar 2022 21:24:56 +0000 Subject: IVGCVSW-6707 Enables a bare metal compile Change-Id: Icc2f83c5f27f413758fee3e5c1445e9fc44f42c8 Signed-off-by: Jim Flynn --- src/armnn/Runtime.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/armnn/Runtime.cpp') diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp index 657c90735c..75b1ee8179 100644 --- a/src/armnn/Runtime.cpp +++ b/src/armnn/Runtime.cpp @@ -205,7 +205,9 @@ Status RuntimeImpl::LoadNetwork(NetworkId& networkIdOut, } { +#if !defined(ARMNN_DISABLE_THREADS) std::lock_guard lockGuard(m_Mutex); +#endif // Stores the network m_LoadedNetworks[networkIdOut] = std::move(loadedNetwork); @@ -242,7 +244,9 @@ Status RuntimeImpl::UnloadNetwork(NetworkId networkId) std::unique_ptr timelineUtils = arm::pipe::TimelineUtilityMethods::GetTimelineUtils(*m_ProfilingService.get()); { +#if !defined(ARMNN_DISABLE_THREADS) std::lock_guard lockGuard(m_Mutex); +#endif // If timeline recording is on mark the Network end of life if (timelineUtils) @@ -586,7 +590,9 @@ RuntimeImpl::~RuntimeImpl() LoadedNetwork* RuntimeImpl::GetLoadedNetworkPtr(NetworkId networkId) const { +#if !defined(ARMNN_DISABLE_THREADS) std::lock_guard lockGuard(m_Mutex); +#endif return m_LoadedNetworks.at(networkId).get(); } -- cgit v1.2.1