X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnuradio-core%2Fsrc%2Flib%2Fruntime%2Fgr_tpb_detail.h;fp=gnuradio-core%2Fsrc%2Flib%2Fruntime%2Fgr_tpb_detail.h;h=29101d7307b36a6c14877c40f82b3e15616f4864;hb=3d47afffbf216f5ab0fa036de2b70cdc7a1981da;hp=ab955240b3ad0daaad399ed12cccd1080c41b57f;hpb=f67c4ff12f19490d2aeab7ff0fbe0484195037f0;p=debian%2Fgnuradio diff --git a/gnuradio-core/src/lib/runtime/gr_tpb_detail.h b/gnuradio-core/src/lib/runtime/gr_tpb_detail.h index ab955240..29101d73 100644 --- a/gnuradio-core/src/lib/runtime/gr_tpb_detail.h +++ b/gnuradio-core/src/lib/runtime/gr_tpb_detail.h @@ -35,10 +35,10 @@ struct gr_tpb_detail { gruel::condition_variable input_cond; bool output_changed; gruel::condition_variable output_cond; + bool msg_pending; gr_tpb_detail() - : input_changed(false), output_changed(false) {} - + : input_changed(false), output_changed(false), msg_pending(false) { } //! Called by us to tell all our upstream blocks that their output may have changed. void notify_upstream(gr_block_detail *d); @@ -57,6 +57,15 @@ struct gr_tpb_detail { output_changed = false; } + //! Called to notify us that a message is pending in the queue + void notify_msg() + { + gruel::scoped_lock guard(mutex); + msg_pending = true; + input_cond.notify_one(); + output_cond.notify_one(); + } + private: //! Used by notify_downstream @@ -74,7 +83,6 @@ private: output_changed = true; output_cond.notify_one(); } - }; #endif /* INCLUDED_GR_TPB_DETAIL_H */