From f84df2601dbd73f3c254f2606e8c1bcc97ffb84b Mon Sep 17 00:00:00 2001 From: Jon Szymaniak Date: Thu, 19 Nov 2015 18:43:40 -0500 Subject: [PATCH] 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. --- host/libraries/libbladeRF/include/libbladeRF.h | 5 +++++ host/libraries/libbladeRF/src/bladerf.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/host/libraries/libbladeRF/include/libbladeRF.h b/host/libraries/libbladeRF/include/libbladeRF.h index 9ab11be0..71a4b176 100644 --- a/host/libraries/libbladeRF/include/libbladeRF.h +++ b/host/libraries/libbladeRF/include/libbladeRF.h @@ -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) */ diff --git a/host/libraries/libbladeRF/src/bladerf.c b/host/libraries/libbladeRF/src/bladerf.c index b5995751..793011df 100644 --- a/host/libraries/libbladeRF/src/bladerf.c +++ b/host/libraries/libbladeRF/src/bladerf.c @@ -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: