From 24154b99a70ca59c8f91f6506370244ee68a0365 Mon Sep 17 00:00:00 2001 From: Aaron Rossetto Date: Mon, 19 Oct 2020 14:05:34 -0500 Subject: graph: Serialize all graph-related functions This commit expands the scope of the former _release_mutex, renaming it _graph_mutex and ensuring that all graph modification functions are serialized against each other. This ensures that callers to graph_t's public functions are always operating on a coherent view of the underlying BGL graph object. --- host/lib/include/uhdlib/rfnoc/graph.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/include') diff --git a/host/lib/include/uhdlib/rfnoc/graph.hpp b/host/lib/include/uhdlib/rfnoc/graph.hpp index fa9921cf6..288de63ce 100644 --- a/host/lib/include/uhdlib/rfnoc/graph.hpp +++ b/host/lib/include/uhdlib/rfnoc/graph.hpp @@ -298,8 +298,8 @@ private: //! Flag to ensure serialized handling of actions std::atomic_flag _action_handling_ongoing; - //! Changes to the release/commit state of the graph are locked with this mutex - std::recursive_mutex _release_mutex; + //! Changes to the state of the graph are locked with this mutex + std::recursive_mutex _graph_mutex; //! This counter gets decremented everytime commit() is called. When zero, // the graph is committed. -- cgit v1.2.3