diff options
author | Ciro Nishiguchi <ciro.nishiguchi@ni.com> | 2019-10-28 14:28:33 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 12:21:33 -0800 |
commit | a8e286b106f19c37d6cf20de886c65f3c04da162 (patch) | |
tree | 5c1baf4310abc0e4e082c960dffabd18a9fb6a3e /host/lib/include/uhdlib/transport/inline_io_service.hpp | |
parent | 10b9d2688b5bcb150eec786a9ef7473f1c1c28ac (diff) | |
download | uhd-a8e286b106f19c37d6cf20de886c65f3c04da162.tar.gz uhd-a8e286b106f19c37d6cf20de886c65f3c04da162.tar.bz2 uhd-a8e286b106f19c37d6cf20de886c65f3c04da162.zip |
rfnoc: Make polling I/O service not block on flow control
Add a new method to io_service::send_io to check whether the destination
is ready for data, to make it possible to poll send_io rather than block
waiting for flow control credits.
Diffstat (limited to 'host/lib/include/uhdlib/transport/inline_io_service.hpp')
-rw-r--r-- | host/lib/include/uhdlib/transport/inline_io_service.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/host/lib/include/uhdlib/transport/inline_io_service.hpp b/host/lib/include/uhdlib/transport/inline_io_service.hpp index d4a6dbbae..b0153a951 100644 --- a/host/lib/include/uhdlib/transport/inline_io_service.hpp +++ b/host/lib/include/uhdlib/transport/inline_io_service.hpp @@ -52,7 +52,8 @@ public: send_io_if::send_callback_t send_cb, recv_link_if::sptr recv_link, size_t num_recv_frames, - recv_callback_t recv_cb); + recv_callback_t recv_cb, + send_io_if::fc_callback_t fc_cb); private: friend class inline_recv_io; @@ -113,8 +114,9 @@ private: * \param recv_io_cb the callback+interface initiating the operation * \param recv_link link to perform receive on * \param timeout_ms timeout to wait for a buffer on the link + * \return Whether a flow control update was received */ - void recv_flow_ctrl( + bool recv_flow_ctrl( inline_recv_cb* recv_io_cb, recv_link_if* recv_link, int32_t timeout_ms); /* Track whether link is muxed and the callback */ |