RTEMS  5.0.0
Files | Macros | Enumerations | Functions
Status Codes

Files

file  status.h
 
file  status.c
 Status Mapping Arrays.
 
file  statustext.c
 
file  statustoerrno.c
 Status Mapping Arrays.
 

Macros

#define RTEMS_STATUS_CODES_FIRST   RTEMS_SUCCESSFUL
 
#define RTEMS_STATUS_CODES_LAST   RTEMS_PROXY_BLOCKING
 

Enumerations

enum  rtems_status_code {
  RTEMS_SUCCESSFUL = 0, RTEMS_TASK_EXITTED = 1, RTEMS_MP_NOT_CONFIGURED = 2, RTEMS_INVALID_NAME = 3,
  RTEMS_INVALID_ID = 4, RTEMS_TOO_MANY = 5, RTEMS_TIMEOUT = 6, RTEMS_OBJECT_WAS_DELETED = 7,
  RTEMS_INVALID_SIZE = 8, RTEMS_INVALID_ADDRESS = 9, RTEMS_INVALID_NUMBER = 10, RTEMS_NOT_DEFINED = 11,
  RTEMS_RESOURCE_IN_USE = 12, RTEMS_UNSATISFIED = 13, RTEMS_INCORRECT_STATE = 14, RTEMS_ALREADY_SUSPENDED = 15,
  RTEMS_ILLEGAL_ON_SELF = 16, RTEMS_ILLEGAL_ON_REMOTE_OBJECT = 17, RTEMS_CALLED_FROM_ISR = 18, RTEMS_INVALID_PRIORITY = 19,
  RTEMS_INVALID_CLOCK = 20, RTEMS_INVALID_NODE = 21, RTEMS_NOT_CONFIGURED = 22, RTEMS_NOT_OWNER_OF_RESOURCE = 23,
  RTEMS_NOT_IMPLEMENTED = 24, RTEMS_INTERNAL_ERROR = 25, RTEMS_NO_MEMORY = 26, RTEMS_IO_ERROR = 27,
  RTEMS_PROXY_BLOCKING = 28
}
 Classic API Status. More...
 

Functions

RTEMS_INLINE_ROUTINE bool rtems_is_status_successful (rtems_status_code code)
 Checks if the status code is equal to RTEMS_SUCCESSFUL. More...
 
RTEMS_INLINE_ROUTINE bool rtems_are_statuses_equal (rtems_status_code code1, rtems_status_code code2)
 Checks if the status code1 is equal to code2. More...
 
int rtems_status_code_to_errno (rtems_status_code sc)
 RTEMS Status Code to Errno Mapping Function. More...
 
const char * rtems_status_text (rtems_status_code code)
 Returns a text for a status code. More...
 

Detailed Description

This encapsulates functionality related to the status codes returned by Classic API directives.

Macro Definition Documentation

◆ RTEMS_STATUS_CODES_FIRST

#define RTEMS_STATUS_CODES_FIRST   RTEMS_SUCCESSFUL

This is the lowest valid value for a Classic API status code.

◆ RTEMS_STATUS_CODES_LAST

#define RTEMS_STATUS_CODES_LAST   RTEMS_PROXY_BLOCKING

This is the highest valid value for a Classic API status code.

Enumeration Type Documentation

◆ rtems_status_code

Classic API Status.

This enumerates the possible status values returned b Classic API directives.

Enumerator
RTEMS_SUCCESSFUL 

This is the status to indicate successful completion.

RTEMS_TASK_EXITTED 

This is the status to indicate that a thread exited.

RTEMS_MP_NOT_CONFIGURED 

This is the status to indicate multiprocessing is not configured.

RTEMS_INVALID_NAME 

This is the status to indicate that the object name was invalid.

RTEMS_INVALID_ID 

This is the status to indicate that the object Id was invalid.

RTEMS_TOO_MANY 

This is the status to indicate you have attempted to create too many instances of a particular object class.

RTEMS_TIMEOUT 

This is the status to indicate that a blocking directive timed out.

RTEMS_OBJECT_WAS_DELETED 

This is the status to indicate the the object was deleted while the task was blocked waiting.

RTEMS_INVALID_SIZE 

This is the status to indicate that the specified size was invalid.

RTEMS_INVALID_ADDRESS 

This is the status to indicate that the specified address is invalid.

RTEMS_INVALID_NUMBER 

This is the status to indicate that the specified number was invalid.

RTEMS_NOT_DEFINED 

This is the status to indicate that the item has not been initialized.

RTEMS_RESOURCE_IN_USE 

This is the status to indicate that the object still has resources in use.

RTEMS_UNSATISFIED 

This is the status to indicate that the request was not satisfied.

RTEMS_INCORRECT_STATE 

This is the status to indicate that a thread is in wrong state was in the wrong execution state for the requested operation.

RTEMS_ALREADY_SUSPENDED 

This is the status to indicate thread was already suspended.

RTEMS_ILLEGAL_ON_SELF 

This is the status to indicate that the operation is illegal on calling thread.

RTEMS_ILLEGAL_ON_REMOTE_OBJECT 

This is the status to indicate illegal for remote object.

RTEMS_CALLED_FROM_ISR 

This is the status to indicate that the operation should not be called from from this excecution environment.

RTEMS_INVALID_PRIORITY 

This is the status to indicate that an invalid thread priority was provided.

RTEMS_INVALID_CLOCK 

This is the status to indicate that the specified date/time was invalid.

RTEMS_INVALID_NODE 

This is the status to indicate that the specified node Id was invalid.

RTEMS_NOT_CONFIGURED 

This is the status to indicate that the directive was not configured.

RTEMS_NOT_OWNER_OF_RESOURCE 

This is the status to indicate that the caller is not the owner of the resource.

RTEMS_NOT_IMPLEMENTED 

This is the status to indicate the the directive or requested portion of the directive is not implemented. This is a hint that you have stumbled across an opportunity to submit code to the RTEMS Project.

RTEMS_INTERNAL_ERROR 

This is the status to indicate that an internal RTEMS inconsistency was detected.

RTEMS_NO_MEMORY 

This is the status to indicate that the directive attempted to allocate memory but was unable to do so.

RTEMS_IO_ERROR 

This is the status to indicate an driver IO error.

RTEMS_PROXY_BLOCKING 

This is the status is used internally to RTEMS when performing operations on behalf of remote tasks. This is referred to as proxying operations and this status indicates that the operation could not be completed immediately and the "proxy is blocking."

Note
This status will NOT be returned to the user.

Function Documentation

◆ rtems_are_statuses_equal()

RTEMS_INLINE_ROUTINE bool rtems_are_statuses_equal ( rtems_status_code  code1,
rtems_status_code  code2 
)

Checks if the status code1 is equal to code2.

This function returns TRUE if the status code1 is equal to code2, and FALSE otherwise.

◆ rtems_is_status_successful()

RTEMS_INLINE_ROUTINE bool rtems_is_status_successful ( rtems_status_code  code)

Checks if the status code is equal to RTEMS_SUCCESSFUL.

This function returns TRUE if the status code is equal to RTEMS_SUCCESSFUL, and FALSE otherwise.

◆ rtems_status_code_to_errno()

int rtems_status_code_to_errno ( rtems_status_code  sc)

RTEMS Status Code to Errno Mapping Function.

This function recieves an RTEMS status code and returns an errno error code. The retval values show the mappings between rtems_status_codes and errno error codes.

Return values
0RTEMS_SUCCESSFUL
EIORTEMS_TASK_EXITED, RTEMS_MP_NOT_CONFIGURED, RTEMS_INVALID_ID, RTEMS_TOO_MANY, RTEMS_OBJECT_WAS_DELETED, RTEMS_INVALID_SIZE, RTEMS_INVALID_ADDRESS, RTEMS_NOT_DEFINED, RTEMS_INCORRECT_STATE, RTEMS_ILLEGAL_ON_SELF, RTEMS_ILLEGAL_ON_REMOTE_OBJECT, RTEMS_CALLED_FROM_ISR, RTEMS_INVALID_PRIORITY, RTEMS_INTERNAL_ERROR, RTEMS_IO_ERROR, RTEMS_PROXY_BLOCKING
EINVALRTEMS_INVALID_NAME, RTEMS_INVALID_CLOCK, RTEMS_INVALID_NODE
ETIMEDOUTRTEMS_TIMEOUT
EBADFRTEMS_INVALID_NUMBER
EBUSYRTEMS_RESOURCE_IN_USE
ENODEVRTEMS_UNSATISFIED
ENOSYSRTEMS_NOT_IMPLEMENTED, RTEMS_NOT_CONFIGURED
ENOMEMRTEMS_NO_MEMORY

◆ rtems_status_text()

const char* rtems_status_text ( rtems_status_code  code)

Returns a text for a status code.

The text for each status code is the enumerator constant.

Parameters
[in]codeThe status code.
Return values
textThe status code text.
?The passed status code is invalid.