From 988515ab19a715773086a7a8c023ddb8249c7e37 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 14 Nov 2016 14:30:34 -0800 Subject: Device3: Change packet-based flow control to byte-based flow control --- host/lib/transport/zero_copy_flow_ctrl.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'host/lib/transport/zero_copy_flow_ctrl.cpp') 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(), _mb->size()); } -- cgit v1.2.3