aboutsummaryrefslogtreecommitdiff
path: root/tests/profiling/gatordmock/GatordMockService.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/profiling/gatordmock/GatordMockService.hpp')
-rw-r--r--tests/profiling/gatordmock/GatordMockService.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/profiling/gatordmock/GatordMockService.hpp b/tests/profiling/gatordmock/GatordMockService.hpp
index a77d7ff480..c3afc333ca 100644
--- a/tests/profiling/gatordmock/GatordMockService.hpp
+++ b/tests/profiling/gatordmock/GatordMockService.hpp
@@ -41,6 +41,7 @@ public:
GatordMockService(armnn::profiling::CommandHandlerRegistry& registry, bool echoPackets)
: m_HandlerRegistry(registry)
, m_EchoPackets(echoPackets)
+ , m_CloseReceivingThread(false)
{
m_PacketsReceivedCount.store(0, std::memory_order_relaxed);
}
@@ -86,6 +87,12 @@ public:
/// command handling code is added.
void WaitForReceivingThread();
+ // @return true only if the receive thread is closed or closing.
+ bool ReceiveThreadRunning()
+ {
+ return !m_CloseReceivingThread.load();
+ }
+
/// Send the counter list to ArmNN.
void SendPeriodicCounterSelectionList(uint32_t period, std::vector<uint16_t> counters);