RTEMS 6.1-rc6
|
Files | |
file | seterr.h |
This header file defines macros to set errno and return minus one. | |
Macros | |
#define | rtems_set_errno_and_return_value(_error, _value) do { errno = ( _error ); return ( _value ); } while ( 0 ) |
#define | rtems_set_errno_and_return_minus_one(_error) rtems_set_errno_and_return_value( _error, -1 ) |
#define rtems_set_errno_and_return_minus_one | ( | _error | ) | rtems_set_errno_and_return_value( _error, -1 ) |
This is a helper macro which will set the variable errno and return -1 to the caller. This pattern is common to many POSIX methods.
[in] | _error | is the error code |
#define rtems_set_errno_and_return_value | ( | _error, | |
_value | |||
) | do { errno = ( _error ); return ( _value ); } while ( 0 ) |
This is a helper macro which will set the variable errno and return the specified value to the caller.
[in] | _error | is the error code |
[in] | _value | is the value to return |