RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Macros | Functions
basedefs.h File Reference

This header file provides basic definitions used by the API and the implementation. More...

#include <rtems/score/cpuopts.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Macros

#define RTEMS_ALIAS(_target)
 Instructs the compiler to generate an alias to the target function.
 
#define RTEMS_ALIGN_DOWN(_value, _alignment)    ( ( _value ) & ~( ( _alignment ) - 1 ) )
 Aligns down the value to the alignment.
 
#define RTEMS_ALIGN_UP(_value, _alignment)    ( ( ( _value ) + ( _alignment ) - 1 ) & ~( ( _alignment ) - 1 ) )
 Aligns up the value to the alignment.
 
#define RTEMS_ALIGNED(_alignment)
 Instructs the compiler in a declaration or definition to enforce the alignment.
 
#define RTEMS_ALIGNOF(_type_name)   sizeof( _type_name )
 Gets the alignment requirement of the type.
 
#define RTEMS_ALLOC_ALIGN(_index)
 Tells the compiler in a declaration that the memory allocation alignment parameter of this function is similar to aligned_alloc().
 
#define RTEMS_ALLOC_SIZE(_index)
 Tells the compiler in a declaration that the memory allocation size parameter of this function is similar to malloc().
 
#define RTEMS_ALLOC_SIZE_2(_count_index, _size_index)
 Tells the compiler in a declaration that the memory allocation item count and item size parameter of this function is similar to calloc().
 
#define RTEMS_ARRAY_SIZE(_array)    ( sizeof( _array ) / sizeof( ( _array )[ 0 ] ) )
 Gets the element count of the array.
 
#define RTEMS_COMPILER_MEMORY_BARRIER()   do { } while ( 0 )
 This macro forbids the compiler to reorder read and write commands around it.
 
#define RTEMS_CONCAT(_x, _y)   _x##_y
 Concatenates _x and _y without expanding.
 
#define RTEMS_CONST
 Tells the compiler in a function declaration that this function has no effect except the return value and that the return value depends only on the value of parameters.
 
#define RTEMS_CONTAINER_OF(_m, _type, _member_name)    ( (_type *) ( (uintptr_t) ( _m ) - offsetof( _type, _member_name ) ) )
 Gets the container of a member.
 
#define RTEMS_DECLARE_GLOBAL_SYMBOL(_name)   extern char _name[]
 Declares a global symbol with the name.
 
#define RTEMS_DEPRECATED
 Instructs the compiler in a declaration to issue a warning whenever a variable, function, or type using this declaration will be used.
 
#define RTEMS_COMPILER_DEPRECATED_ATTRIBUTE   RTEMS_DEPRECATED
 Provided for backward compatibility.
 
#define RTEMS_EXPAND(_token)   _token
 Helper macro to perform a macro expansion on the token.
 
#define RTEMS_FUNCTION_NAME   __func__
 Expands to the name of the function containing the use of this define.
 
#define RTEMS_NO_RETURN
 Tells the compiler in a function declaration that this function does not return.
 
#define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE   RTEMS_NO_RETURN
 Provided for backward compatibility.
 
#define RTEMS_SECTION(_section)
 Instructs the compiler to place the variable or function in the section.
 
#define RTEMS_STRING(...)   #__VA_ARGS__
 Stringifies the arguments without expanding them.
 
#define RTEMS_TYPEOF_REFX(_level, _target)
 Gets the pointer reference type.
 
#define RTEMS_XCONCAT(_x, _y)   RTEMS_CONCAT( _x, _y )
 Concatenates expansion of _x and expansion of _y.
 
#define RTEMS_DEQUALIFY_DEPTHX(_ptr_level, _type, _var)    ( (_type) (uintptr_t) (const volatile void *)( _var ) )
 Performs a type cast which removes qualifiers without warnings to the type for the variable.
 
#define RTEMS_DECONST(_type, _var)   RTEMS_DEQUALIFY_DEPTHX( *, _type, _var )
 Performs a type cast which removes const qualifiers without warnings to the type for the pointer variable.
 
#define RTEMS_DEQUALIFY(_type, _var)   RTEMS_DEQUALIFY_DEPTHX( *, _type, _var )
 Performs a type cast which removes all qualifiers without warnings to the type for the pointer variable.
 
#define RTEMS_DEVOLATILE(_type, _var)   RTEMS_DEQUALIFY_DEPTHX( *, _type, _var )
 Performs a type cast which removes volatile qualifiers without warnings to the type for the pointer variable.
 
#define FALSE   0
 If FALSE is undefined, then FALSE is defined to 0.
 
#define RTEMS_HAVE_MEMBER_SAME_TYPE(_t_lhs, _m_lhs, _t_rhs, _m_rhs)   true
 Checks if members of two types have compatible types.
 
#define RTEMS_INLINE_ROUTINE   static inline
 Gives a hint to the compiler in a function declaration to inline this function.
 
#define RTEMS_MALLOCLIKE
 Tells the compiler in a declaration that this function is a memory allocation function similar to malloc().
 
#define RTEMS_NO_INLINE
 Instructs the compiler in a function declaration to not inline this function.
 
#define RTEMS_NOINIT   RTEMS_SECTION( ".noinit" )
 Instructs the compiler to place the variable in a section which is not initialized.
 
#define RTEMS_OBFUSCATE_VARIABLE(_var)   (void) ( _var )
 Obfuscates the variable so that the compiler cannot perform optimizations based on the variable value.
 
#define RTEMS_PACKED
 Instructs the compiler in a type definition to place members of a structure or union so that the memory required is minimized.
 
#define RTEMS_COMPILER_PACKED_ATTRIBUTE   RTEMS_PACKED
 Provided for backward compatibility.
 
#define RTEMS_PREDICT_FALSE(_exp)   ( _exp )
 Evaluates the integral expression and tells the compiler that the predicted value is false (0).
 
#define RTEMS_PREDICT_TRUE(_exp)   ( _exp )
 Evaluates the integral expression and tells the compiler that the predicted value is true (1).
 
#define RTEMS_PRINTFLIKE(_format_pos, _ap_pos)
 Tells the compiler in a declaration that this function expects printf()-like arguments.
 
#define RTEMS_PURE
 Tells the compiler in a function declaration that this function has no effect except the return value and that the return value depends only on the value of parameters and/or global variables.
 
#define RTEMS_COMPILER_PURE_ATTRIBUTE   RTEMS_PURE
 Provided for backward compatibility.
 
#define RTEMS_RETURN_ADDRESS()   NULL
 Gets the return address of the current function.
 
#define RTEMS_STATIC_ASSERT(_cond, _msg)
 It is defined if a static analysis run is performed.
 
#define RTEMS_SYMBOL_NAME(_name)   RTEMS_EXPAND( _name )
 Maps the name to the associated symbol name.
 
#define TRUE   1
 If TRUE is undefined, then TRUE is defined to 1.
 
#define RTEMS_UNREACHABLE()   do { } while ( 0 )
 Tells the compiler that this program point is unreachable.
 
#define RTEMS_UNUSED
 Tells the compiler that the variable or function is deliberately unused.
 
#define RTEMS_COMPILER_UNUSED_ATTRIBUTE   RTEMS_UNUSED
 Provided for backward compatibility.
 
#define RTEMS_USED
 Tells the compiler that the variable or function is used.
 
#define RTEMS_WARN_UNUSED_RESULT
 Tells the compiler in a declaration that the result of this function should be used.
 
#define RTEMS_WEAK
 Tells the compiler in a function definition that this function should be weak.
 
#define RTEMS_WEAK_ALIAS(_target)
 Instructs the compiler to generate a weak alias to the target function.
 
#define RTEMS_XSTRING(...)   RTEMS_STRING( __VA_ARGS__ )
 Stringifies the expansion of the arguments.
 
#define RTEMS_DEFINE_GLOBAL_SYMBOL(_name, _value)
 Defines a global symbol with the name and value.
 
#define RTEMS_ZERO_LENGTH_ARRAY   0
 This constant represents the element count of a zero-length array.
 

Functions

void * RTEMS_DEQUALIFY_types_not_compatible (void)
 A not implemented function to trigger compile time errors with an error message.
 

Detailed Description

This header file provides basic definitions used by the API and the implementation.