diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-07-23 10:13:38 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:32 -0800 |
commit | 83abb81e61beec213f9f83843d6fab637a578f4a (patch) | |
tree | c3b95387f4251138f9374cd49b834b04ee10e408 /host/lib/rfnoc/node.cpp | |
parent | 053306f2934e6ac61f03783c36eeff6b2c5ffe0f (diff) | |
download | uhd-83abb81e61beec213f9f83843d6fab637a578f4a.tar.gz uhd-83abb81e61beec213f9f83843d6fab637a578f4a.tar.bz2 uhd-83abb81e61beec213f9f83843d6fab637a578f4a.zip |
rfnoc: actions: Allow sending actions to self
Sending actions to self is useful because calling post_action() from
within an action handler will not actually trigger the action. Instead,
it will defer delivery of the action. Allowing sending actions to self
will allow to add another action, in deterministic order, and the
execution of another action handler.
Diffstat (limited to 'host/lib/rfnoc/node.cpp')
-rw-r--r-- | host/lib/rfnoc/node.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/host/lib/rfnoc/node.cpp b/host/lib/rfnoc/node.cpp index d97588bab..8709df9ef 100644 --- a/host/lib/rfnoc/node.cpp +++ b/host/lib/rfnoc/node.cpp @@ -495,6 +495,12 @@ void node_t::receive_action(const res_source_info& src_info, action_info::sptr a return; } + // We won't forward actions if they were for us + if (src_info.type == res_source_info::USER) { + RFNOC_LOG_TRACE("Dropping USER action " << action->key << "#" << action->id); + return; + } + // Otherwise, we need to figure out the correct default action handling: const auto fwd_policy = [&](const std::string& id) { if (_action_fwd_policies.count(id)) { |