API Reference Manual  1.45.0
ODP ERRNO

API Description

Error number.

ODP errno

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. ODP errno is initially zero.

Functions

int odp_errno (void)
 Latest ODP errno. More...
 
void odp_errno_zero (void)
 Set ODP errno to zero. More...
 
void odp_errno_print (const char *str)
 Print ODP errno. More...
 
const char * odp_errno_str (int errnum)
 Error message string. More...
 

Function Documentation

◆ odp_errno()

int odp_errno ( void  )

Latest ODP errno.

Returns the current ODP errno value on the calling thread. A non-zero value indicates cause of the latest errno setting failure.

Returns
Latest ODP errno value
Return values
0Errno has not been set since the last initialization to zero

◆ odp_errno_zero()

void odp_errno_zero ( void  )

Set ODP errno to zero.

Sets errno value to zero on the calling thread.

◆ odp_errno_print()

void odp_errno_print ( const char *  str)

Print ODP errno.

Interprets the value of ODP errno as an error message, and prints it, optionally preceding it with the custom message specified in str.

Parameters
strPointer to the string to be appended, or NULL

◆ odp_errno_str()

const char* odp_errno_str ( int  errnum)

Error message string.

Interprets the value of ODP errno, generating a string with a message that describes the error. Errno values and messages are implementation specific.

Parameters
errnumODP errno value
Return values
Pointerto the error message string