commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r8648 - usrp2/branches/features/host-ng/host-ng/lib


From: eb
Subject: [Commit-gnuradio] r8648 - usrp2/branches/features/host-ng/host-ng/lib
Date: Sat, 21 Jun 2008 15:33:25 -0600 (MDT)

Author: eb
Date: 2008-06-21 15:33:24 -0600 (Sat, 21 Jun 2008)
New Revision: 8648

Modified:
   usrp2/branches/features/host-ng/host-ng/lib/eth_buffer.cc
   usrp2/branches/features/host-ng/host-ng/lib/eth_buffer.h
Log:
Removed transient invalid state of d_head.


Modified: usrp2/branches/features/host-ng/host-ng/lib/eth_buffer.cc
===================================================================
--- usrp2/branches/features/host-ng/host-ng/lib/eth_buffer.cc   2008-06-21 
21:23:40 UTC (rev 8647)
+++ usrp2/branches/features/host-ng/host-ng/lib/eth_buffer.cc   2008-06-21 
21:33:24 UTC (rev 8648)
@@ -212,8 +212,7 @@
       
       // data_handler::KEEP not yet implemented
       hdr->tp_status = TP_STATUS_KERNEL; // mark it free
-      if (++d_head == d_frame_nr)
-       d_head = 0;
+      inc_head();
 
       if (r & data_handler::DONE)
         break;

Modified: usrp2/branches/features/host-ng/host-ng/lib/eth_buffer.h
===================================================================
--- usrp2/branches/features/host-ng/host-ng/lib/eth_buffer.h    2008-06-21 
21:23:40 UTC (rev 8647)
+++ usrp2/branches/features/host-ng/host-ng/lib/eth_buffer.h    2008-06-21 
21:33:24 UTC (rev 8648)
@@ -56,6 +56,15 @@
   
     bool frame_available();
 
+    void inc_head()
+    {
+      if (d_head + 1 >= d_frame_nr)
+       d_head = 0;
+      else
+       d_head = d_head + 1;
+    }
+
+
   public:
 
     static const unsigned int MAX_PKTLEN = 1512;





reply via email to

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