RTEMS 6.3
Loading...
Searching...
No Matches
Set Error Number Support

Files

file  cpukit/include/rtems/seterr.h
 This header file defines macros to set errno and return minus one.

Macros

#define rtems_set_errno_and_return_value(_error, _value)
#define rtems_set_errno_and_return_minus_one(_error)

Detailed Description

Macro Definition Documentation

◆ rtems_set_errno_and_return_minus_one

#define rtems_set_errno_and_return_minus_one ( _error)
Value:
#define rtems_set_errno_and_return_value(_error, _value)
Definition seterr.h:58

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.

Parameters
[in]_erroris the error code

◆ rtems_set_errno_and_return_value

#define rtems_set_errno_and_return_value ( _error,
_value )
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.

Parameters
[in]_erroris the error code
[in]_valueis the value to return