From 6ae43c40de8cc35af3b3ba401fa6504ff782cd86 Mon Sep 17 00:00:00 2001 From: Matthew Bentham Date: Mon, 10 Jan 2022 13:34:12 +0000 Subject: Fix thread safety issues in TimelineDecoder and associated unit tests Enforce serialized access to TimelineDecoder::m_Model by removing public access funtion and replacing with an 'Apply' method taking a lambda and uses a std::lock. Use the new lambda when invoking callbacks. Change-Id: I6ea2fbca990736f3be63e80897f175421f19f0c1 Signed-off-by: Matthew Bentham --- src/backends/backendsCommon/test/MockBackend.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/backends/backendsCommon/test/MockBackend.hpp b/src/backends/backendsCommon/test/MockBackend.hpp index 6761ce5f08..3a5e79a224 100644 --- a/src/backends/backendsCommon/test/MockBackend.hpp +++ b/src/backends/backendsCommon/test/MockBackend.hpp @@ -113,7 +113,7 @@ private: IBackendInternal::IBackendProfilingPtr m_BackendProfiling; uint32_t m_CapturePeriod; std::vector m_ActiveCounters; - bool m_IsTimelineEnabled; + std::atomic m_IsTimelineEnabled; }; class MockBackendProfilingService -- cgit v1.2.1