libbladeRF: Added BLADERF_ERR_WOULD_BLOCK

This will be returned by API functions when an operation would need
to block to complete, but the caller has requested non-blocking
operation.  In this situation, the caller may need to wait and
resubmit the request at a later time.
This commit is contained in:
Jon Szymaniak 2015-11-19 18:43:40 -05:00 • committed by Jon Szymaniak
commit f84df2601d
2 changed files with 7 additions and 0 deletions

View file

@ -92,6 +92,11 @@ extern "C" {
#define BLADERF_ERR_FPGA_OP (-16) /**< An FPGA operation reported failure */
#define BLADERF_ERR_PERMISSION (-17) /**< Insufficient permissions for the
* requested operation */
#define BLADERF_ERR_WOULD_BLOCK (-18) /**< Operation would block, but has been
* requested to be non-blocking. This
* indicates to a caller that it may
* need to retry the operation later.
*/
/** @} (End RETCODES) */

View file

@ -1288,6 +1288,8 @@ const char * bladerf_strerror(int error)
return "An FPGA operation reported a failure";
case BLADERF_ERR_PERMISSION:
return "Insufficient permissions for the requested operation";
case BLADERF_ERR_WOULD_BLOCK:
return "The operation would block, but has been requested to be non-blocking";
case 0:
return "Success";
default: