commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 02/02: blocks: Fix pdu_to_tagged_stream CPU


From: git
Subject: [Commit-gnuradio] [gnuradio] 02/02: blocks: Fix pdu_to_tagged_stream CPU spinning using blocking with timeout
Date: Thu, 15 Jan 2015 20:47:29 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit 838793ce38e42b936ce0b12aff917c90377cf11d
Author: Sylvain Munaut <address@hidden>
Date:   Thu Jan 15 20:53:08 2015 +0100

    blocks: Fix pdu_to_tagged_stream CPU spinning using blocking with timeout
    
    This is not ideal, but until the scheduler supports something better, this
    will have to do.
    
    Signed-off-by: Sylvain Munaut <address@hidden>
---
 gr-blocks/lib/pdu_to_tagged_stream_impl.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gr-blocks/lib/pdu_to_tagged_stream_impl.cc 
b/gr-blocks/lib/pdu_to_tagged_stream_impl.cc
index a8ba5d2..d505e14 100644
--- a/gr-blocks/lib/pdu_to_tagged_stream_impl.cc
+++ b/gr-blocks/lib/pdu_to_tagged_stream_impl.cc
@@ -52,7 +52,10 @@ namespace gr {
     int pdu_to_tagged_stream_impl::calculate_output_stream_length(const 
gr_vector_int &)
     {
       if (d_curr_len == 0) {
-        pmt::pmt_t msg(delete_head_nowait(PDU_PORT_ID));
+          /* FIXME: This blocking call is far from ideal but is the best we
+          *        can do at the moment
+          */
+        pmt::pmt_t msg(delete_head_blocking(PDU_PORT_ID, 100));
         if (msg.get() == NULL) {
           return 0;
         }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]