commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r8856 - in usrp2/branches/features/host-ng/host-ng: ap


From: jcorgan
Subject: [Commit-gnuradio] r8856 - in usrp2/branches/features/host-ng/host-ng: apps lib
Date: Wed, 9 Jul 2008 22:02:09 -0600 (MDT)

Author: jcorgan
Date: 2008-07-09 22:02:07 -0600 (Wed, 09 Jul 2008)
New Revision: 8856

Modified:
   usrp2/branches/features/host-ng/host-ng/apps/test_usrp2.cc
   usrp2/branches/features/host-ng/host-ng/lib/ring.cc
   usrp2/branches/features/host-ng/host-ng/lib/usrp2_impl.cc
Log:
Cleanup.  usrp2::rx_samples is working, ready now for writing format/endianess 
converting function objects.

Modified: usrp2/branches/features/host-ng/host-ng/apps/test_usrp2.cc
===================================================================
--- usrp2/branches/features/host-ng/host-ng/apps/test_usrp2.cc  2008-07-10 
03:29:08 UTC (rev 8855)
+++ usrp2/branches/features/host-ng/host-ng/apps/test_usrp2.cc  2008-07-10 
04:02:07 UTC (rev 8856)
@@ -134,7 +134,9 @@
     exit(1);
   }
 
-  while(1)
+  // Temporary to allow program to finish
+  int n = 0;
+  while(n++ < 100000)
     u2->rx_samples(0, NULL);
 
   u2->stop_rx_streaming();

Modified: usrp2/branches/features/host-ng/host-ng/lib/ring.cc
===================================================================
--- usrp2/branches/features/host-ng/host-ng/lib/ring.cc 2008-07-10 03:29:08 UTC 
(rev 8855)
+++ usrp2/branches/features/host-ng/host-ng/lib/ring.cc 2008-07-10 04:02:07 UTC 
(rev 8856)
@@ -53,9 +53,9 @@
       
     d_ring[d_write_ind].d_len = len;
     d_ring[d_write_ind].d_base = p;
-    d_not_empty.signal();
 
     inc_write_ind();
+    d_not_empty.signal();
     return true;
   }
 

Modified: usrp2/branches/features/host-ng/host-ng/lib/usrp2_impl.cc
===================================================================
--- usrp2/branches/features/host-ng/host-ng/lib/usrp2_impl.cc   2008-07-10 
03:29:08 UTC (rev 8855)
+++ usrp2/branches/features/host-ng/host-ng/lib/usrp2_impl.cc   2008-07-10 
04:02:07 UTC (rev 8856)
@@ -106,7 +106,6 @@
   
   usrp2::impl::~impl()
   {
-    
     stop_bg();
     d_bg_thread = 0; // thread class deletes itself
     delete d_pf;
@@ -409,7 +408,7 @@
       // will signal this thread to continue.
       {
         omni_mutex_lock l(d_enqueued_mutex);
-        while(d_num_enqueued > 0)
+        while(d_num_enqueued > 0 && d_bg_running)
          d_bg_pending_cond.wait();
       }
     }





reply via email to

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