aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include
diff options
context:
space:
mode:
authorAaron Rossetto <aaron.rossetto@ni.com>2020-10-19 14:05:34 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2020-10-22 15:01:15 -0500
commit24154b99a70ca59c8f91f6506370244ee68a0365 (patch)
treee76e9b7dd010e779544459447d098ee15230a119 /host/lib/include
parent5ea43897419aac8db824944abc764868232b45af (diff)
downloaduhd-24154b99a70ca59c8f91f6506370244ee68a0365.tar.gz
uhd-24154b99a70ca59c8f91f6506370244ee68a0365.tar.bz2
uhd-24154b99a70ca59c8f91f6506370244ee68a0365.zip
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.
Diffstat (limited to 'host/lib/include')
-rw-r--r--host/lib/include/uhdlib/rfnoc/graph.hpp4
1 files changed, 2 insertions, 2 deletions
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.