aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/errno.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/odp/api/errno.h')
-rw-r--r--include/odp/api/errno.h37
1 files changed, 27 insertions, 10 deletions
diff --git a/include/odp/api/errno.h b/include/odp/api/errno.h
index 982980738..33998b61b 100644
--- a/include/odp/api/errno.h
+++ b/include/odp/api/errno.h
@@ -17,20 +17,38 @@
extern "C" {
#endif
-/** @defgroup odp_errno ODP ERRNO
+/**
+ * @defgroup odp_errno ODP ERRNO
+ * @details
+ * <b> ODP errno </b>
+ *
+ * ODP errno (error number) is a thread local variable that any ODP function may
+ * set on a failure. It expresses additional information about the cause of
+ * the latest failure. A successful function call never sets errno. Application
+ * may initialize errno to zero at anytime by calling odp_errno_zero(). Other
+ * ODP functions never set errno to zero. Valid errno values are non-zero
+ * and implementation specific. It's also implementation specific which
+ * functions set errno in addition to those explicitly specified by
+ * the API spec. ODP errno is initially zero.
+ *
* @{
*/
/**
-* Return latest ODP errno
+* Latest ODP errno
*
-* @return ODP errno
-* @retval 0 No error
+* Returns the current ODP errno value on the calling thread. A non-zero value
+* indicates cause of the latest errno setting failure.
+*
+* @return Latest ODP errno value
+* @retval 0 Errno has not been set since the last initialization to zero
*/
int odp_errno(void);
/**
* Set ODP errno to zero
+*
+* Sets errno value to zero on the calling thread.
*/
void odp_errno_zero(void);
@@ -40,20 +58,19 @@ void odp_errno_zero(void);
* Interprets the value of ODP errno as an error message, and prints it,
* optionally preceding it with the custom message specified in str.
*
-* @param str NULL, or pointer to the string to be appended
+* @param str Pointer to the string to be appended, or NULL
*/
void odp_errno_print(const char *str);
/**
* Error message string
*
-* Interprets the value of ODP errno, generating a string with a
-* message that describes the error.
-* It uses the system definition of errno.
+* Interprets the value of ODP errno, generating a string with a message that
+* describes the error. Errno values and messages are implementation specific.
*
-* @param errnum Error code
+* @param errnum ODP errno value
*
-* @retval Pointer to the string
+* @retval Pointer to the error message string
*/
const char *odp_errno_str(int errnum);