diff options
author | Josh Blum <josh@joshknows.com> | 2010-07-10 03:09:59 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-07-10 03:09:59 +0000 |
commit | 55338617fea9fe79ff62e76e674b6c08580ac562 (patch) | |
tree | 1686c74d9abb86a450b9bc1fe25ddb0251b997ab /host/include | |
parent | e5a05a4476a6b30b2c36bef71a9a67611fae7cc4 (diff) | |
parent | c898ca9751d1b274ae8f8f7afc2d5bc54b6ef30c (diff) | |
download | uhd-55338617fea9fe79ff62e76e674b6c08580ac562.tar.gz uhd-55338617fea9fe79ff62e76e674b6c08580ac562.tar.bz2 uhd-55338617fea9fe79ff62e76e674b6c08580ac562.zip |
Merge branch 'error_handling' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/transport/zero_copy.hpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/host/include/uhd/transport/zero_copy.hpp b/host/include/uhd/transport/zero_copy.hpp index da10bfbe2..513291b63 100644 --- a/host/include/uhd/transport/zero_copy.hpp +++ b/host/include/uhd/transport/zero_copy.hpp @@ -82,8 +82,9 @@ namespace uhd{ namespace transport{ * This should be called to commit the write to the transport object. * After calling, the referenced memory should be considered invalid. * \param num_bytes the number of bytes written into the buffer + * \return the number of bytes written, 0 for timeout, negative for error */ - virtual void commit(size_t num_bytes) = 0; + virtual ssize_t commit(size_t num_bytes) = 0; /*! * Get the size of the underlying buffer. @@ -121,6 +122,7 @@ namespace uhd{ namespace transport{ /*! * Get a new receive buffer from this transport object. + * \return a managed buffer, or null sptr on timeout/error */ virtual managed_recv_buffer::sptr get_recv_buff(void) = 0; @@ -135,6 +137,7 @@ namespace uhd{ namespace transport{ /*! * Get a new send buffer from this transport object. + * \return a managed buffer, or null sptr on timeout/error */ virtual managed_send_buffer::sptr get_send_buff(void) = 0; @@ -175,9 +178,9 @@ namespace uhd{ namespace transport{ /*! * Perform a private copying recv. * \param buff the buffer to write data into - * \return the number of bytes written to buff + * \return the number of bytes written to buff, 0 for timeout, negative for error */ - virtual size_t recv(const boost::asio::mutable_buffer &buff) = 0; + virtual ssize_t recv(const boost::asio::mutable_buffer &buff) = 0; UHD_PIMPL_DECL(impl) _impl; }; @@ -208,9 +211,9 @@ namespace uhd{ namespace transport{ /*! * Perform a private copying send. * \param buff the buffer to read data from - * \return the number of bytes read from buff + * \return the number of bytes read from buff, 0 for timeout, negative for error */ - virtual size_t send(const boost::asio::const_buffer &buff) = 0; + virtual ssize_t send(const boost::asio::const_buffer &buff) = 0; UHD_PIMPL_DECL(impl) _impl; }; |