diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-08-01 17:45:29 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:34 -0800 |
commit | ec991efc06676521267aa05259df59898c758338 (patch) | |
tree | 3eab00d1062cd0af9a7fc9e153ed85e88165b62c /host/lib/rfnoc/rfnoc_graph.cpp | |
parent | 1e51dd7774017cbad84315284596417636ab044d (diff) | |
download | uhd-ec991efc06676521267aa05259df59898c758338.tar.gz uhd-ec991efc06676521267aa05259df59898c758338.tar.bz2 uhd-ec991efc06676521267aa05259df59898c758338.zip |
rfnoc: graph: Lock release/commit state
Property propagation and action handling depend on the release state,
but they are lengthy operations. It is therefore imperative to not
change the release/commit state during those methods.
This commit changes the following:
- Change the release state counter from an atomic to a non-atomic
variable
- Instead, use a mutex to lock the release state counter, and use the
same mutex for locking access to the property propagation and action
handling
The rfnoc_graph now tries to release the graph before shutting down
blocks to make sure they don't get destroyed while those algorithms are
still running.
Diffstat (limited to 'host/lib/rfnoc/rfnoc_graph.cpp')
-rw-r--r-- | host/lib/rfnoc/rfnoc_graph.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/host/lib/rfnoc/rfnoc_graph.cpp b/host/lib/rfnoc/rfnoc_graph.cpp index b3bff6c12..795ffd289 100644 --- a/host/lib/rfnoc/rfnoc_graph.cpp +++ b/host/lib/rfnoc/rfnoc_graph.cpp @@ -66,8 +66,11 @@ public: ~rfnoc_graph_impl() { - _graph.reset(); + UHD_LOG_TRACE(LOG_ID, "Releasing detail::graph..."); + _graph->release(); + UHD_LOG_TRACE(LOG_ID, "Shutting down all blocks ..."); _block_registry->shutdown(); + _graph.reset(); } /************************************************************************** |