RTEMS
Files | Macros | Enumerations | Functions
Directive Status Codes

This group contains the Classic API status codes and support functions. More...

Files

file  status.h
 This header file defines the status codes and support functions of the Classic API.
 

Macros

#define RTEMS_STATUS_CODES_FIRST   RTEMS_SUCCESSFUL
 This constant represents the lowest valid value for a Classic API status code.
 
#define RTEMS_STATUS_CODES_LAST   RTEMS_PROXY_BLOCKING
 This constant represents the highest valid value for a Classic API status code.
 

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_INTERRUPTED = 28, RTEMS_PROXY_BLOCKING = 29
}
 This enumeration provides status codes for directives of the Classic API. More...
 

Functions

int rtems_status_code_to_errno (rtems_status_code status_code)
 Maps the specified RTEMS status code to a POSIX error number. More...
 
static bool rtems_are_statuses_equal (rtems_status_code left_status_code, rtems_status_code right_status_code)
 Returns true, if the left hand side status code is equal to the right hand side status code, otherwise returns false. More...
 
static bool rtems_is_status_successful (rtems_status_code status_code)
 Returns true, if the status code is equal to RTEMS_SUCCESSFUL, otherwise returns false. More...
 
const char * rtems_status_text (rtems_status_code status_code)
 Returns a text describing the specified status code. More...
 

Detailed Description

This group contains the Classic API status codes and support functions.

Enumeration Type Documentation

◆ rtems_status_code

This enumeration provides status codes for directives of the Classic API.

Enumerator
RTEMS_SUCCESSFUL 

This status code indicates successful completion.

RTEMS_TASK_EXITTED 

This status code indicates that a thread exited.

RTEMS_MP_NOT_CONFIGURED 

This status code indicates that multiprocessing was not configured.

RTEMS_INVALID_NAME 

This status code indicates that an object name was invalid.

RTEMS_INVALID_ID 

This status code indicates that an object identifier was invalid.

RTEMS_TOO_MANY 

This status code indicates you have attempted to create too many instances of a particular object class.

RTEMS_TIMEOUT 

This status code indicates that a blocking directive timed out.

RTEMS_OBJECT_WAS_DELETED 

This status code indicates the object was deleted while the thread was blocked waiting.

RTEMS_INVALID_SIZE 

This status code indicates that a specified size was invalid.

RTEMS_INVALID_ADDRESS 

This status code indicates that a specified address was invalid.

RTEMS_INVALID_NUMBER 

This status code indicates that a specified number was invalid.

RTEMS_NOT_DEFINED 

This status code indicates that the item has not been initialized.

RTEMS_RESOURCE_IN_USE 

This status code indicates that the object still had resources in use.

RTEMS_UNSATISFIED 

This status code indicates that the request was not satisfied.

RTEMS_INCORRECT_STATE 

This status code indicates that an object was in wrong state for the requested operation.

RTEMS_ALREADY_SUSPENDED 

This status code indicates that the thread was already suspended.

RTEMS_ILLEGAL_ON_SELF 

This status code indicates that the operation was illegal on the calling thread.

RTEMS_ILLEGAL_ON_REMOTE_OBJECT 

This status code indicates that the operation was illegal on a remote object.

RTEMS_CALLED_FROM_ISR 

This status code indicates that the operation should not be called from this execution environment.

RTEMS_INVALID_PRIORITY 

This status code indicates that an invalid thread priority was provided.

RTEMS_INVALID_CLOCK 

This status code indicates that a specified date/time was invalid.

RTEMS_INVALID_NODE 

This status code indicates that a specified node identifier was invalid.

RTEMS_NOT_CONFIGURED 

This status code indicates that the directive was not configured.

RTEMS_NOT_OWNER_OF_RESOURCE 

This status code indicates that the caller was not the owner of the resource.

RTEMS_NOT_IMPLEMENTED 

This status code indicates 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 status code indicates that an internal RTEMS inconsistency was detected.

RTEMS_NO_MEMORY 

This status code indicates that the directive attempted to allocate memory but was unable to do so.

RTEMS_IO_ERROR 

This status code indicates an driver IO error.

RTEMS_INTERRUPTED 

This status code is used internally by the implementation to indicate a blocking device driver call has been interrupted and should be reflected to the caller as interrupted.

RTEMS_PROXY_BLOCKING 

This status code is used internally by the implementation 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.

This status will not be returned to the user.

Definition at line 82 of file status.h.

Function Documentation

◆ rtems_are_statuses_equal()

static bool rtems_are_statuses_equal ( rtems_status_code  left_status_code,
rtems_status_code  right_status_code 
)
inlinestatic

Returns true, if the left hand side status code is equal to the right hand side status code, otherwise returns false.

Parameters
left_status_codeis the left hand side status code.
right_status_codeis the right hand side status code.

Definition at line 321 of file status.h.

◆ rtems_is_status_successful()

static bool rtems_is_status_successful ( rtems_status_code  status_code)
inlinestatic

Returns true, if the status code is equal to RTEMS_SUCCESSFUL, otherwise returns false.

Parameters
status_codeis the status code.

Definition at line 339 of file status.h.

◆ rtems_status_code_to_errno()

int rtems_status_code_to_errno ( rtems_status_code  status_code)

Maps the specified RTEMS status code to a POSIX error number.

Parameters
status_codeis the status code to map.
Return values
0The status code was RTEMS_SUCCESSFUL.
EBADFThe status code was RTEMS_INVALID_NUMBER.
EBUSYThe status code was RTEMS_RESOURCE_IN_USE.
EINTRThe status code was RTEMS_INTERRUPTED.
EINVALThe status code was RTEMS_INVALID_CLOCK, RTEMS_INVALID_NAME, or RTEMS_INVALID_NODE.
EIOThe status code was RTEMS_ALREADY_SUSPENDED, RTEMS_CALLED_FROM_ISR, RTEMS_ILLEGAL_ON_REMOTE_OBJECT, RTEMS_ILLEGAL_ON_SELF, RTEMS_INCORRECT_STATE, RTEMS_INTERNAL_ERROR, RTEMS_INVALID_ADDRESS, RTEMS_INVALID_ID, RTEMS_INVALID_PRIORITY, RTEMS_INVALID_SIZE, RTEMS_IO_ERROR, RTEMS_MP_NOT_CONFIGURED, RTEMS_NOT_DEFINED, RTEMS_OBJECT_WAS_DELETED, RTEMS_PROXY_BLOCKING, RTEMS_TASK_EXITTED, or RTEMS_TOO_MANY.
ENODEVThe status code was RTEMS_UNSATISFIED.
ENOMEMThe status code was RTEMS_NO_MEMORY.
ENOSYSThe status code was RTEMS_NOT_CONFIGURED or RTEMS_NOT_IMPLEMENTED.
EPERMThe status code was RTEMS_NOT_OWNER_OF_RESOURCE.
ETIMEDOUTThe status code was RTEMS_TIMEOUT.

◆ rtems_status_text()

const char* rtems_status_text ( rtems_status_code  status_code)

Returns a text describing the specified status code.

The text for each status code is the enumerator constant.

Parameters
status_codeis the status code.
Return values
?The specified status code is invalid.
Returns
Otherwise, a text describing the status code.

Definition at line 60 of file statustext.c.