summaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-10 15:26:38 -0800
committerJosh Blum <josh@joshknows.com>2011-02-10 15:26:38 -0800
commit5845c437dddb1e6d661054a4388c9db6f6f06e73 (patch)
tree1665ca02db72f2801fa6a97a43bc55054e88790a /host/lib/transport
parentf01e9decbe7c37386006360c8acb2256cd8a841b (diff)
downloaduhd-5845c437dddb1e6d661054a4388c9db6f6f06e73.tar.gz
uhd-5845c437dddb1e6d661054a4388c9db6f6f06e73.tar.bz2
uhd-5845c437dddb1e6d661054a4388c9db6f6f06e73.zip
udp: udp_zero_copy_asio comments and tweaks
Diffstat (limited to 'host/lib/transport')
-rw-r--r--host/lib/transport/udp_zero_copy_asio.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/host/lib/transport/udp_zero_copy_asio.cpp b/host/lib/transport/udp_zero_copy_asio.cpp
index c45b196cf..2794d383c 100644
--- a/host/lib/transport/udp_zero_copy_asio.cpp
+++ b/host/lib/transport/udp_zero_copy_asio.cpp
@@ -194,12 +194,8 @@ public:
* Return the managed receive buffer with the new length.
* When the caller is finished with the managed buffer,
* the managed receive buffer is released back into the queue.
- *
- * Assumptions:
- * - A managed buffer is always available.
- * - The queue can never be over-filled.
******************************************************************/
- UHD_INLINE bool is_recv_socket_ready(double timeout){
+ UHD_INLINE bool is_recv_ready(double timeout){
//setup timeval for timeout
timeval tv;
tv.tv_sec = 0;
@@ -216,7 +212,7 @@ public:
managed_recv_buffer::sptr get_recv_buff(double timeout){
udp_zero_copy_asio_mrb *mrb = NULL;
- if (is_recv_socket_ready(timeout) and _pending_recv_buffs.pop_with_timed_wait(mrb, timeout)){
+ if (is_recv_ready(timeout) and _pending_recv_buffs.pop_with_timed_wait(mrb, timeout)){
return mrb->get_new(::recv(_sock_fd, mrb->cast<char *>(), _recv_frame_size, 0));
}
return managed_recv_buffer::sptr();
@@ -240,10 +236,6 @@ public:
* The caller will fill the buffer and commit it when finished.
* The commit routine will perform a blocking send operation,
* and push the managed send buffer back into the queue.
- *
- * Assumptions:
- * - A managed buffer is always available.
- * - The queue can never be over-filled.
******************************************************************/
managed_send_buffer::sptr get_send_buff(double timeout){
udp_zero_copy_asio_msb *msb = NULL;