summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/lib/runtime')
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block.h6
-rw-r--r--gnuradio-core/src/lib/runtime/gr_top_block.cc16
2 files changed, 15 insertions, 7 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_block.h b/gnuradio-core/src/lib/runtime/gr_block.h
index 034f6136d9..acd938080a 100644
--- a/gnuradio-core/src/lib/runtime/gr_block.h
+++ b/gnuradio-core/src/lib/runtime/gr_block.h
@@ -628,6 +628,12 @@ class GR_CORE_API gr_block : public gr_basic_block {
std::vector<long> d_max_output_buffer;
std::vector<long> d_min_output_buffer;
+ /*! Used by block's setters and work functions to make
+ * setting/resetting of parameters thread-safe.
+ *
+ * Used by calling gruel::scoped_lock l(d_setlock);
+ */
+ gruel::mutex d_setlock;
// These are really only for internal use, but leaving them public avoids
// having to work up an ever-varying list of friend GR_CORE_APIs
diff --git a/gnuradio-core/src/lib/runtime/gr_top_block.cc b/gnuradio-core/src/lib/runtime/gr_top_block.cc
index e5859768de..c6118bcfdd 100644
--- a/gnuradio-core/src/lib/runtime/gr_top_block.cc
+++ b/gnuradio-core/src/lib/runtime/gr_top_block.cc
@@ -138,13 +138,15 @@ gr_top_block::setup_rpc()
"items", "Max number of output items",
RPC_PRIVLVL_MIN, DISPNULL)));
- add_rpc_variable(
- rpcbasic_sptr(new rpcbasic_register_get<gr_top_block, std::string>(
- alias(), "edge list",
- &gr_top_block::edge_list,
- pmt::mp(""), pmt::mp(""), pmt::mp(""),
- "edges", "List of edges in the graph",
- RPC_PRIVLVL_MIN, DISPNULL)));
+ if(gr_prefs::singleton()->get_bool("ControlPort", "edges_list", false)) {
+ add_rpc_variable(
+ rpcbasic_sptr(new rpcbasic_register_get<gr_top_block, std::string>(
+ alias(), "edge list",
+ &gr_top_block::edge_list,
+ pmt::mp(""), pmt::mp(""), pmt::mp(""),
+ "edges", "List of edges in the graph",
+ RPC_PRIVLVL_MIN, DISPNULL)));
+ }
// Setters
add_rpc_variable(