diff options
author | Josh Blum <josh@joshknows.com> | 2010-10-01 18:22:41 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-10-01 18:22:41 -0700 |
commit | 00cd6018405b57a0982b0ce103ff858c646ee18c (patch) | |
tree | d930efd38829ed3d9f9b79c7ceec503202387288 /host/lib/transport/zero_copy.cpp | |
parent | a772f4536e46227df3301c637927c3fbfb69a08d (diff) | |
download | uhd-00cd6018405b57a0982b0ce103ff858c646ee18c.tar.gz uhd-00cd6018405b57a0982b0ce103ff858c646ee18c.tar.bz2 uhd-00cd6018405b57a0982b0ce103ff858c646ee18c.zip |
uhd: implemented a double timeout (in seconds) for send and recv chains
converted all size_t timeout_ms to double timeout
bounded and alignment buffer now take double timeout
added timeout to device::send and zero_copy_if::get_send_buff
Diffstat (limited to 'host/lib/transport/zero_copy.cpp')
-rw-r--r-- | host/lib/transport/zero_copy.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/transport/zero_copy.cpp b/host/lib/transport/zero_copy.cpp index 1fcf846a0..dfb65951f 100644 --- a/host/lib/transport/zero_copy.cpp +++ b/host/lib/transport/zero_copy.cpp @@ -68,12 +68,12 @@ phony_zero_copy_recv_if::~phony_zero_copy_recv_if(void){ /* NOP */ } -managed_recv_buffer::sptr phony_zero_copy_recv_if::get_recv_buff(size_t timeout_ms){ +managed_recv_buffer::sptr phony_zero_copy_recv_if::get_recv_buff(double timeout){ //allocate memory boost::uint8_t *recv_mem = new boost::uint8_t[_impl->max_buff_size]; //call recv() with timeout option - ssize_t num_bytes = this->recv(boost::asio::buffer(recv_mem, _impl->max_buff_size), timeout_ms); + ssize_t num_bytes = this->recv(boost::asio::buffer(recv_mem, _impl->max_buff_size), timeout); if (num_bytes <= 0) return managed_recv_buffer::sptr(); //NULL sptr @@ -138,6 +138,6 @@ phony_zero_copy_send_if::~phony_zero_copy_send_if(void){ delete [] _impl->send_mem; } -managed_send_buffer::sptr phony_zero_copy_send_if::get_send_buff(void){ +managed_send_buffer::sptr phony_zero_copy_send_if::get_send_buff(double){ return _impl->send_buff; //FIXME there is only ever one send buff, we assume that the caller doesnt hang onto these } |