diff options
author | Josh Blum <josh@joshknows.com> | 2010-10-02 23:15:46 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-10-02 23:15:46 -0700 |
commit | 7352c95037fa57d37dd7adc4c2ea6935006b56c8 (patch) | |
tree | af0e2a3cbb42db9296ddbfe18e4d5eb7efc27de6 /host/lib/transport/vrt_packet_handler.hpp | |
parent | 00cd6018405b57a0982b0ce103ff858c646ee18c (diff) | |
download | uhd-7352c95037fa57d37dd7adc4c2ea6935006b56c8.tar.gz uhd-7352c95037fa57d37dd7adc4c2ea6935006b56c8.tar.bz2 uhd-7352c95037fa57d37dd7adc4c2ea6935006b56c8.zip |
uhd: reworked the zero copy interface
- recv buffers have a release call
- safe make function for recv buffers (buff + release callback)
- send buffer commits now have a void return
- safe make function for send buffers (buff + commit callback)
The reason for the void return from commit is that ssize_t num_bytes was never returning anything of use.
That is for all of the zero copy implementations so far, commit cannot really error (being asynchronous).
libusb zero copy impl was reworked to support the new interface.
USRP1 io_impl with the psuedo managed buffer was replaced with safe_make.
Also, usrp1 io_impl was simplified greatly due to commit returning void now.
UDP zero copy asio was disabled (in this commit, until its reworked).
Phony send and recv interfaces were removed completely.
Diffstat (limited to 'host/lib/transport/vrt_packet_handler.hpp')
-rw-r--r-- | host/lib/transport/vrt_packet_handler.hpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/host/lib/transport/vrt_packet_handler.hpp b/host/lib/transport/vrt_packet_handler.hpp index e11afff30..939517411 100644 --- a/host/lib/transport/vrt_packet_handler.hpp +++ b/host/lib/transport/vrt_packet_handler.hpp @@ -343,9 +343,7 @@ template <typename T> UHD_INLINE T get_context_code( //commit the samples to the zero-copy interface size_t num_bytes_total = (vrt_header_offset_words32+if_packet_info.num_packet_words32)*sizeof(boost::uint32_t); - if (send_buffs[i]->commit(num_bytes_total) < ssize_t(num_bytes_total)){ - std::cerr << "commit to send buffer returned less than commit size" << std::endl; - } + send_buffs[i]->commit(num_bytes_total); } return num_samps; } |