aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/zero_copy_flow_ctrl.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-11-14 14:30:34 -0800
committerMartin Braun <martin.braun@ettus.com>2018-07-25 15:34:03 -0700
commit988515ab19a715773086a7a8c023ddb8249c7e37 (patch)
tree71c861c3a1d0a5e295dad5939358dd30e0a33f3b /host/lib/transport/zero_copy_flow_ctrl.cpp
parent8b16ab706fb4768f802ddb65a81fc26e1562cb0d (diff)
downloaduhd-988515ab19a715773086a7a8c023ddb8249c7e37.tar.gz
uhd-988515ab19a715773086a7a8c023ddb8249c7e37.tar.bz2
uhd-988515ab19a715773086a7a8c023ddb8249c7e37.zip
Device3: Change packet-based flow control to byte-based flow control
Diffstat (limited to 'host/lib/transport/zero_copy_flow_ctrl.cpp')
-rw-r--r--host/lib/transport/zero_copy_flow_ctrl.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/host/lib/transport/zero_copy_flow_ctrl.cpp b/host/lib/transport/zero_copy_flow_ctrl.cpp
index 709b9e981..25be35569 100644
--- a/host/lib/transport/zero_copy_flow_ctrl.cpp
+++ b/host/lib/transport/zero_copy_flow_ctrl.cpp
@@ -65,7 +65,7 @@ public:
zero_copy_flow_ctrl_mrb(
flow_ctrl_func flow_ctrl
) :
- _mb(nullptr),
+ _mb(NULL),
_flow_ctrl(flow_ctrl)
{
/* NOP */
@@ -80,8 +80,6 @@ public:
{
if (_mb)
{
- _mb->commit(size());
- while (_flow_ctrl and not _flow_ctrl(_mb)) {}
_mb.reset();
}
}
@@ -89,6 +87,7 @@ public:
UHD_INLINE sptr get(sptr &mb)
{
_mb = mb;
+ while (_flow_ctrl and not _flow_ctrl(_mb)) {}
return make(this, _mb->cast<void *>(), _mb->size());
}