diff options
Diffstat (limited to 'spec/rtems/basedefs/if')
55 files changed, 1613 insertions, 0 deletions
diff --git a/spec/rtems/basedefs/if/alias.yml b/spec/rtems/basedefs/if/alias.yml new file mode 100644 index 00000000..dcd8827c --- /dev/null +++ b/spec/rtems/basedefs/if/alias.yml @@ -0,0 +1,31 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Instructs the compiler to generate an alias to the specified target function. +copyrights: +- Copyright (C) 2016 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__alias__(#_target))) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_ALIAS +notes: null +params: +- description: | + is the target function name. + dir: null + name: _target +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/align-down.yml b/spec/rtems/basedefs/if/align-down.yml new file mode 100644 index 00000000..a309b03f --- /dev/null +++ b/spec/rtems/basedefs/if/align-down.yml @@ -0,0 +1,35 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Returns the specified value aligned down to the specified alignment. +copyrights: +- Copyright (C) 2016 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + ( ( ${.:/params[0]/name} ) & ~( ( ${.:/params[1]/name} ) - 1 ) ) + variants: [] +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_ALIGN_DOWN +notes: null +params: +- description: | + is the value to align down. + dir: null + name: _value +- description: | + is the desired alignment in bytes. The alignment shall be a power of two, + otherwise the returned value is undefined. The alignment parameter is + evaluated twice. + dir: null + name: _alignment +return: + return: | + The specified value aligned down to the specified alignment is returned. + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/align-up.yml b/spec/rtems/basedefs/if/align-up.yml new file mode 100644 index 00000000..cb3a46dd --- /dev/null +++ b/spec/rtems/basedefs/if/align-up.yml @@ -0,0 +1,35 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Returns the specified value aligned up to the specified alignment. +copyrights: +- Copyright (C) 2016 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + ( ( ( ${.:/params[0]/name} ) + ( ${.:/params[1]/name} ) - 1 ) & ~( ( ${.:/params[1]/name} ) - 1 ) ) + variants: [] +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_ALIGN_UP +notes: null +params: +- description: | + is the value to align up. + dir: null + name: _value +- description: | + is the desired alignment in bytes. The alignment shall be a power of two, + otherwise the returned value is undefined. The alignment parameter is + evaluated twice. + dir: null + name: _alignment +return: + return: | + The specified value aligned up to the specified alignment is returned. + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/aligned.yml b/spec/rtems/basedefs/if/aligned.yml new file mode 100644 index 00000000..9dfc84aa --- /dev/null +++ b/spec/rtems/basedefs/if/aligned.yml @@ -0,0 +1,32 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Instructs the compiler in a declaration or definition to enforce the + specified alignment. +copyrights: +- Copyright (C) 2016 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__aligned__(_alignment))) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_ALIGNED +notes: null +params: +- description: | + is the desired alignment in bytes. + dir: null + name: _alignment +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/alloc-align.yml b/spec/rtems/basedefs/if/alloc-align.yml new file mode 100644 index 00000000..32a39b73 --- /dev/null +++ b/spec/rtems/basedefs/if/alloc-align.yml @@ -0,0 +1,32 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Tells the compiler in a declaration that the memory allocation alignment + parameter of this function is similar to aligned_alloc(). +copyrights: +- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__alloc_align__(_index))) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_ALLOC_ALIGN +notes: null +params: +- description: | + is the allocation alignment parameter index (starting with one). + dir: null + name: _index +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/alloc-size-2.yml b/spec/rtems/basedefs/if/alloc-size-2.yml new file mode 100644 index 00000000..08791bfb --- /dev/null +++ b/spec/rtems/basedefs/if/alloc-size-2.yml @@ -0,0 +1,36 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Tells the compiler in a declaration that the memory allocation item count and + item size parameter of this function is similar to calloc(). +copyrights: +- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__alloc_size__(_count_index, _size_index))) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_ALLOC_SIZE_2 +notes: null +params: +- description: | + is the allocation item count parameter index (starting with one). + dir: null + name: _count_index +- description: | + is the allocation item size parameter index (starting with one). + dir: null + name: _size_index +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/alloc-size.yml b/spec/rtems/basedefs/if/alloc-size.yml new file mode 100644 index 00000000..76a52baa --- /dev/null +++ b/spec/rtems/basedefs/if/alloc-size.yml @@ -0,0 +1,32 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Tells the compiler in a declaration that the memory allocation size parameter + of this function is similar to malloc(). +copyrights: +- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__alloc_size__(_index))) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_ALLOC_SIZE +notes: null +params: +- description: | + is the allocation size parameter index (starting with one). + dir: null + name: _index +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/array-size.yml b/spec/rtems/basedefs/if/array-size.yml new file mode 100644 index 00000000..61131d9d --- /dev/null +++ b/spec/rtems/basedefs/if/array-size.yml @@ -0,0 +1,28 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Returns the element count of the specified array. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + (sizeof(_array) / sizeof((_array)[0])) + variants: [] +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_ARRAY_SIZE +notes: null +params: +- description: | + is the name of the array. + dir: null + name: _array +return: + return: The element count of the specified array. + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/compiler-deprecated-attribute.yml b/spec/rtems/basedefs/if/compiler-deprecated-attribute.yml new file mode 100644 index 00000000..4530cb73 --- /dev/null +++ b/spec/rtems/basedefs/if/compiler-deprecated-attribute.yml @@ -0,0 +1,20 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Provided for backward compatibility. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + ${deprecated:/name} + variants: [] +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_COMPILER_DEPRECATED_ATTRIBUTE +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/compiler-memory-barrier.yml b/spec/rtems/basedefs/if/compiler-memory-barrier.yml new file mode 100644 index 00000000..709eb350 --- /dev/null +++ b/spec/rtems/basedefs/if/compiler-memory-barrier.yml @@ -0,0 +1,28 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + This macro forbids the compiler to reorder read and write commands around it. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + do { } while ( 0 ) + variants: + - definition: | + ${/compiler/if/asm:/name} volatile( "" ::: "memory" ) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_COMPILER_MEMORY_BARRIER +notes: null +params: [] +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/compiler-no-return-attribute.yml b/spec/rtems/basedefs/if/compiler-no-return-attribute.yml new file mode 100644 index 00000000..b47611f3 --- /dev/null +++ b/spec/rtems/basedefs/if/compiler-no-return-attribute.yml @@ -0,0 +1,20 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Provided for backward compatibility. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + ${no-return:/name} + variants: [] +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_COMPILER_NO_RETURN_ATTRIBUTE +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/compiler-packed-attribute.yml b/spec/rtems/basedefs/if/compiler-packed-attribute.yml new file mode 100644 index 00000000..75e7d956 --- /dev/null +++ b/spec/rtems/basedefs/if/compiler-packed-attribute.yml @@ -0,0 +1,20 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Provided for backward compatibility. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + ${packed:/name} + variants: [] +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_COMPILER_PACKED_ATTRIBUTE +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/compiler-pure-attribute.yml b/spec/rtems/basedefs/if/compiler-pure-attribute.yml new file mode 100644 index 00000000..5acbc6e6 --- /dev/null +++ b/spec/rtems/basedefs/if/compiler-pure-attribute.yml @@ -0,0 +1,20 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Provided for backward compatibility. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + ${pure:/name} + variants: [] +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_COMPILER_PURE_ATTRIBUTE +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/compiler-used-attribute.yml b/spec/rtems/basedefs/if/compiler-used-attribute.yml new file mode 100644 index 00000000..29f60daa --- /dev/null +++ b/spec/rtems/basedefs/if/compiler-used-attribute.yml @@ -0,0 +1,20 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Provided for backward compatibility. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + ${used:/name} + variants: [] +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_COMPILER_USED_ATTRIBUTE +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/concat.yml b/spec/rtems/basedefs/if/concat.yml new file mode 100644 index 00000000..7fb231e9 --- /dev/null +++ b/spec/rtems/basedefs/if/concat.yml @@ -0,0 +1,32 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Concatenates _x and _y without expanding. +copyrights: +- Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: _x##_y + variants: [] +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_CONCAT +notes: null +params: +- description: | + is the left hand side token of the concatenation. + dir: null + name: _x +- description: | + is the right hand side token of the concatenation. + dir: null + name: _y +return: + return: | + The concatenation of the tokens _x and _y. + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/const.yml b/spec/rtems/basedefs/if/const.yml new file mode 100644 index 00000000..adbe611b --- /dev/null +++ b/spec/rtems/basedefs/if/const.yml @@ -0,0 +1,25 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + 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. +copyrights: +- Copyright (C) 2019 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__const__)) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_CONST +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/container-of.yml b/spec/rtems/basedefs/if/container-of.yml new file mode 100644 index 00000000..4a7b7a83 --- /dev/null +++ b/spec/rtems/basedefs/if/container-of.yml @@ -0,0 +1,37 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Returns the pointer to the container of a specified member pointer. +copyrights: +- Copyright (C) 2014 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + ( (_type *) ( (${/c/if/uintptr_t:/name}) ( _m ) - ${/c/if/offsetof:/name}( _type, _member_name ) ) ) + variants: [] +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_CONTAINER_OF +notes: null +params: +- description: | + is the pointer to a member of the container. + dir: null + name: _m +- description: | + is the type of the container. + dir: null + name: _type +- description: | + is the designator name of the container member. + dir: null + name: _member_name +return: + return: | + Returns the pointer to the container of a specified member pointer. + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/declare-global-symbol.yml b/spec/rtems/basedefs/if/declare-global-symbol.yml new file mode 100644 index 00000000..b46bc08d --- /dev/null +++ b/spec/rtems/basedefs/if/declare-global-symbol.yml @@ -0,0 +1,29 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Declares a global symbol with the specified name. +copyrights: +- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + extern char _name[] + variants: [] +description: | + This macro must be placed at file scope. +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_DECLARE_GLOBAL_SYMBOL +notes: null +params: +- description: | + is the name of the global symbol. It shall be a valid designator. + dir: null + name: _name +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/deconst.yml b/spec/rtems/basedefs/if/deconst.yml new file mode 100644 index 00000000..683ae87a --- /dev/null +++ b/spec/rtems/basedefs/if/deconst.yml @@ -0,0 +1,33 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Performs a type cast which removes const qualifiers without warnings to the + specified type for the specified pointer variable. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +- Copyright (C) 2014 Paval Pisa +definition: + default: ${dequalify-depthx:/name}(*, _type, _var) + variants: [] +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_DECONST +notes: null +params: +- description: | + is the target type of the cast. + dir: null + name: _type +- description: | + is the pointer variable. + dir: null + name: _var +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/define-global-symbol.yml b/spec/rtems/basedefs/if/define-global-symbol.yml new file mode 100644 index 00000000..ae3116f6 --- /dev/null +++ b/spec/rtems/basedefs/if/define-global-symbol.yml @@ -0,0 +1,44 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Defines a global symbol with the specified name and value. +copyrights: +- Copyright (C) 2018, 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + ${/compiler/if/asm:/name}( + "\t.globl " ${xstring:/name}( ${symbol-name:/name}( _name ) ) + "\n\t.set " ${xstring:/name}( ${symbol-name:/name}( _name ) ) + ", " ${string:/name}( _value ) "\n" + ) + enabled-by: + - defined(${/compiler/if/user-label-prefix:/name}) +description: | + This macro shall be placed at file scope. +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_DEFINE_GLOBAL_SYMBOL +notes: null +params: +- description: | + is the user defined name of the symbol. The name shall be a valid + designator. On the name a macro expansion is performed and afterwards it + is stringified. + dir: null + name: _name +- description: | + is the value of the symbol. On the value a macro expansion is performed + and afterwards it is stringified. It shall expand to an integer expression + understood by the assembler. + dir: null + name: _value +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/deprecated.yml b/spec/rtems/basedefs/if/deprecated.yml new file mode 100644 index 00000000..ca7e2137 --- /dev/null +++ b/spec/rtems/basedefs/if/deprecated.yml @@ -0,0 +1,24 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Instructs the compiler in a declaration to issue a warning whenever a + variable, function, or type using this declaration will be used. +copyrights: +- Copyright (C) 2009 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__deprecated__)) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_DEPRECATED +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/dequalify-depthx.yml b/spec/rtems/basedefs/if/dequalify-depthx.yml new file mode 100644 index 00000000..a3ad7cec --- /dev/null +++ b/spec/rtems/basedefs/if/dequalify-depthx.yml @@ -0,0 +1,50 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Performs a type cast which removes qualifiers without warnings to the + specified type for the specified variable. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +- Copyright (C) 2014 Paval Pisa +definition: + default: ((_type)(${/c/if/uintptr_t:/name})(const volatile void *)(_var)) + variants: + - definition: | + (const_cast<_type>(_var)) + enabled-by: + - defined(${/compiler/if/cplusplus:/name}) + - definition: | + ${/compiler/if/builtin-choose-expr:/name}(${/compiler/if/builtin-types-compatible-p:/name}( + ${typeof-refx:/name}(_ptr_level, _var), + ${typeof-refx:/name}(_ptr_level, _type) + ) || ${/compiler/if/builtin-types-compatible-p:/name}(_type, void *), + (_type)(_var), + ${/score/if/dequalify-types-not-compatible:/name}()) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_DEQUALIFY_DEPTHX +notes: null +params: +- description: | + is the pointer indirection level expressed in *. + dir: null + name: _ptr_level +- description: | + is the target type of the cast. + dir: null + name: _type +- description: | + is the variable. + dir: null + name: _var +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/dequalify.yml b/spec/rtems/basedefs/if/dequalify.yml new file mode 100644 index 00000000..9573284b --- /dev/null +++ b/spec/rtems/basedefs/if/dequalify.yml @@ -0,0 +1,33 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Performs a type cast which removes all qualifiers without warnings to the + specified type for the specified pointer variable. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +- Copyright (C) 2014 Paval Pisa +definition: + default: ${dequalify-depthx:/name}(*, _type, _var) + variants: [] +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_DEQUALIFY +notes: null +params: +- description: | + is the target type of the cast. + dir: null + name: _type +- description: | + is the pointer variable. + dir: null + name: _var +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/devolatile.yml b/spec/rtems/basedefs/if/devolatile.yml new file mode 100644 index 00000000..5fcab59c --- /dev/null +++ b/spec/rtems/basedefs/if/devolatile.yml @@ -0,0 +1,33 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Performs a type cast which removes volatile qualifiers without warnings to + the specified type for the specified pointer variable. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +- Copyright (C) 2014 Paval Pisa +definition: + default: ${dequalify-depthx:/name}(*, _type, _var) + variants: [] +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_DEVOLATILE +notes: null +params: +- description: | + is the target type of the cast. + dir: null + name: _type +- description: | + is the pointer variable. + dir: null + name: _var +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/expand.yml b/spec/rtems/basedefs/if/expand.yml new file mode 100644 index 00000000..f1a198fd --- /dev/null +++ b/spec/rtems/basedefs/if/expand.yml @@ -0,0 +1,27 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Helper macro to perform a macro expansion on the specified token. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: _token + variants: [] +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_EXPAND +notes: null +params: +- description: | + is the token to expand. + dir: null + name: _token +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/false.yml b/spec/rtems/basedefs/if/false.yml new file mode 100644 index 00000000..e566e0bd --- /dev/null +++ b/spec/rtems/basedefs/if/false.yml @@ -0,0 +1,19 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: If FALSE is undefined, then FALSE is defined to 0. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '0' + variants: [] +description: null +enabled-by: +- not: 'FALSE' +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: 'FALSE' +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/group.yml b/spec/rtems/basedefs/if/group.yml new file mode 100644 index 00000000..87218ed8 --- /dev/null +++ b/spec/rtems/basedefs/if/group.yml @@ -0,0 +1,19 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + This group contains basic macros and defines to give access to + compiler-specific features. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +description: null +enabled-by: true +identifier: RTEMSAPIBaseDefs +interface-type: group +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: /if/api +name: Base Definitions +text: | + The API shall provide an interface to compiler-specific features. +type: interface diff --git a/spec/rtems/basedefs/if/have-member-same-type.yml b/spec/rtems/basedefs/if/have-member-same-type.yml new file mode 100644 index 00000000..ba099a24 --- /dev/null +++ b/spec/rtems/basedefs/if/have-member-same-type.yml @@ -0,0 +1,48 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Evaluates to true if the specified members of two types have compatible + types, otherwise to false. +copyrights: +- Copyright (C) 2017 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + ${/c/if/true:/name} + variants: + - definition: | + ${/compiler/if/builtin-types-compatible-p:/name}( + ${/compiler/if/typeof:/name}( ( (_t_lhs *) 0 )->_m_lhs ), + ${/compiler/if/typeof:/name}( ( (_t_rhs *) 0 )->_m_rhs ) + ) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_HAVE_MEMBER_SAME_TYPE +notes: null +params: +- description: | + is the left hand side type. + dir: null + name: _t_lhs +- description: | + is the left hand side member. + dir: null + name: _m_lhs +- description: | + is the right hand side type. + dir: null + name: _t_rhs +- description: | + is the right hand side member. + dir: null + name: _m_rhs +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/header.yml b/spec/rtems/basedefs/if/header.yml new file mode 100644 index 00000000..2fc39dcd --- /dev/null +++ b/spec/rtems/basedefs/if/header.yml @@ -0,0 +1,29 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + This header file provides basic definitions used by the API and + the implementation. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +enabled-by: true +interface-type: header-file +links: +- enabled-by: true + role: interface-include + uid: /build-options/if/cpuopts +- enabled-by: + not: ASM + role: interface-include + uid: /c/if/stddef +- enabled-by: + not: ASM + role: interface-include + uid: /c/if/stdbool +- enabled-by: + not: ASM + role: interface-include + uid: /c/if/stdint +- role: interface-placement + uid: /if/domain +path: rtems/score/basedefs.h +prefix: cpukit/include +type: interface diff --git a/spec/rtems/basedefs/if/inline-routine.yml b/spec/rtems/basedefs/if/inline-routine.yml new file mode 100644 index 00000000..d06c1bf0 --- /dev/null +++ b/spec/rtems/basedefs/if/inline-routine.yml @@ -0,0 +1,23 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Gives a hint to the compiler in a function declaration to inline this + function. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: static inline + variants: + - definition: static __inline__ + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_INLINE_ROUTINE +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/malloclike.yml b/spec/rtems/basedefs/if/malloclike.yml new file mode 100644 index 00000000..01d60260 --- /dev/null +++ b/spec/rtems/basedefs/if/malloclike.yml @@ -0,0 +1,24 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Tells the compiler in a declaration that this function is a memory allocation + function similar to malloc(). +copyrights: +- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__malloc__)) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_MALLOCLIKE +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/no-inline.yml b/spec/rtems/basedefs/if/no-inline.yml new file mode 100644 index 00000000..85c0ac08 --- /dev/null +++ b/spec/rtems/basedefs/if/no-inline.yml @@ -0,0 +1,23 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Instructs the compiler in a function declaration to not inline this function. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__noinline__)) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_NO_INLINE +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/no-return.yml b/spec/rtems/basedefs/if/no-return.yml new file mode 100644 index 00000000..614ad159 --- /dev/null +++ b/spec/rtems/basedefs/if/no-return.yml @@ -0,0 +1,24 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Tells the compiler in a function declaration that this function does not + return. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__noreturn__)) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_NO_RETURN +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/obfuscate-variable.yml b/spec/rtems/basedefs/if/obfuscate-variable.yml new file mode 100644 index 00000000..7ad18bef --- /dev/null +++ b/spec/rtems/basedefs/if/obfuscate-variable.yml @@ -0,0 +1,34 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Obfuscates the variable so that the compiler cannot perform optimizations + based on the variable value. +copyrights: +- Copyright (C) 2016, 2018 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + (void) (_var) + variants: + - definition: | + ${/compiler/if/asm:/name}( "" : "+r" ( _var ) ) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: | + The variable must be simple enough to fit into a register. +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_OBFUSCATE_VARIABLE +notes: null +params: +- description: | + is the variable to obfuscate. + dir: null + name: _var +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/packed.yml b/spec/rtems/basedefs/if/packed.yml new file mode 100644 index 00000000..a575a77f --- /dev/null +++ b/spec/rtems/basedefs/if/packed.yml @@ -0,0 +1,24 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Instructs the compiler in a type definition to place members of a structure + or union so that the memory required is minimized. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__packed__)) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_PACKED +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/predict-false.yml b/spec/rtems/basedefs/if/predict-false.yml new file mode 100644 index 00000000..5bf13563 --- /dev/null +++ b/spec/rtems/basedefs/if/predict-false.yml @@ -0,0 +1,33 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Returns the value of the specified integral expression and tells the compiler + that the predicted value is false (1). +copyrights: +- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + ( _exp ) + variants: + - definition: | + ${/compiler/if/builtin-expect:/name}( ( _exp ), 0 ) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_PREDICT_FALSE +notes: null +params: +- description: | + is the expression. + dir: null + name: _exp +return: + return: The value of the expression. + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/predict-true.yml b/spec/rtems/basedefs/if/predict-true.yml new file mode 100644 index 00000000..47bea311 --- /dev/null +++ b/spec/rtems/basedefs/if/predict-true.yml @@ -0,0 +1,33 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Returns the value of the specified integral expression and tells the compiler + that the predicted value is true (1). +copyrights: +- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + ( _exp ) + variants: + - definition: | + ${/compiler/if/builtin-expect:/name}( ( _exp ), 1 ) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_PREDICT_TRUE +notes: null +params: +- description: | + is the expression. + dir: null + name: _exp +return: + return: The value of the expression. + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/printflike.yml b/spec/rtems/basedefs/if/printflike.yml new file mode 100644 index 00000000..07ba944a --- /dev/null +++ b/spec/rtems/basedefs/if/printflike.yml @@ -0,0 +1,37 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Tells the compiler in a declaration that this function expects printf()-like + arguments. +copyrights: +- Copyright (C) 2016 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__format__(__printf__, _format_pos, _ap_pos))) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_PRINTFLIKE +notes: null +params: +- description: | + is the position of the format parameter index (starting with one). + dir: null + name: _format_pos +- description: | + is the position of the argument pointer parameter index (starting with + one). + dir: null + name: _ap_pos +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/pure.yml b/spec/rtems/basedefs/if/pure.yml new file mode 100644 index 00000000..f5c946a4 --- /dev/null +++ b/spec/rtems/basedefs/if/pure.yml @@ -0,0 +1,25 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + 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. +copyrights: +- Copyright (C) 2011 On-Line Applications Research Corporation (OAR) +definition: + default: '' + variants: + - definition: | + __attribute__((__pure__)) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_PURE +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/return-address.yml b/spec/rtems/basedefs/if/return-address.yml new file mode 100644 index 00000000..6ce94694 --- /dev/null +++ b/spec/rtems/basedefs/if/return-address.yml @@ -0,0 +1,27 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Returns the return address of the current function. +copyrights: +- Copyright (C) 2019 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: ${/c/if/null:/name} + variants: + - definition: | + ${/compiler/if/builtin-return-address:/name}(0) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_RETURN_ADDRESS +notes: null +params: [] +return: + return: The return address of the current function. + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/section.yml b/spec/rtems/basedefs/if/section.yml new file mode 100644 index 00000000..12a6c200 --- /dev/null +++ b/spec/rtems/basedefs/if/section.yml @@ -0,0 +1,32 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Instructs the compiler to place a specific variable or function in the + specified section. +copyrights: +- Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__section__(_section))) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_SECTION +notes: null +params: +- description: | + is the section name as a string. + dir: null + name: _section +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/static-assert.yml b/spec/rtems/basedefs/if/static-assert.yml new file mode 100644 index 00000000..fd95fc0a --- /dev/null +++ b/spec/rtems/basedefs/if/static-assert.yml @@ -0,0 +1,41 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Asserts at compile time that the specified condition is satisfied. +copyrights: +- Copyright (C) 2011, 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + struct rtems_static_assert_ ## _msg + { int rtems_static_assert_ ## _msg : (_cond) ? 1 : -1; } + variants: + - definition: | + static_assert(_cond, # _msg) + enabled-by: + - ${/compiler/if/cplusplus:/name} >= 201103L + - definition: | + _Static_assert(_cond, # _msg) + enabled-by: + - ${/compiler/if/stdc-version:/name} >= 201112L +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_STATIC_ASSERT +notes: null +params: +- description: | + is the condition this static assertion shall satisfy. + dir: null + name: _cond +- description: | + is the error message in case the static assertion fails. + dir: null + name: _msg +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/string.yml b/spec/rtems/basedefs/if/string.yml new file mode 100644 index 00000000..2c15de47 --- /dev/null +++ b/spec/rtems/basedefs/if/string.yml @@ -0,0 +1,28 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Stringifies _x without expanding. +copyrights: +- Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '#_x' + variants: [] +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_STRING +notes: null +params: +- description: | + is the token to stringify. + dir: null + name: _x +return: + return: | + The stringification of the token _x. + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/symbol-name.yml b/spec/rtems/basedefs/if/symbol-name.yml new file mode 100644 index 00000000..f06ed9d8 --- /dev/null +++ b/spec/rtems/basedefs/if/symbol-name.yml @@ -0,0 +1,33 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Constructs a symbol name. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + ${expand:/name}(_name) + variants: + - definition: | + ${xconcat:/name}(${/compiler/if/user-label-prefix:/name}, _name) + enabled-by: + - defined(${/compiler/if/user-label-prefix:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_SYMBOL_NAME +notes: null +params: +- description: | + is the user defined name of the symbol. The name shall be a valid + designator. On the name a macro expansion is performed. + dir: null + name: _name +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/true.yml b/spec/rtems/basedefs/if/true.yml new file mode 100644 index 00000000..a63fdda6 --- /dev/null +++ b/spec/rtems/basedefs/if/true.yml @@ -0,0 +1,19 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: If TRUE is undefined, then TRUE is defined to 1. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '1' + variants: [] +description: null +enabled-by: +- not: 'TRUE' +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: 'TRUE' +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/typeof-refx.yml b/spec/rtems/basedefs/if/typeof-refx.yml new file mode 100644 index 00000000..7532ffef --- /dev/null +++ b/spec/rtems/basedefs/if/typeof-refx.yml @@ -0,0 +1,37 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Returns the type of a pointer reference of the specified level to the specified type. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +- Copyright (C) 2014 Paval Pisa +definition: + default: '' + variants: + - definition: | + ${/compiler/if/typeof:/name}(_level(union { int z; ${/compiler/if/typeof:/name}(_target) x; }){0}.x) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: | + The reference type idea is based on libHX by Jan Engelhardt. +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_TYPEOF_REFX +notes: null +params: +- description: | + is the pointer indirection level expressed in *. + dir: null + name: _level +- description: | + is the reference target type. + dir: null + name: _target +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/unreachable.yml b/spec/rtems/basedefs/if/unreachable.yml new file mode 100644 index 00000000..3a86be75 --- /dev/null +++ b/spec/rtems/basedefs/if/unreachable.yml @@ -0,0 +1,29 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Tells the compiler that this program point is unreachable. +copyrights: +- Copyright (C) 2016 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: | + ${/score/if/assert-unreachable:/name}() + variants: + - definition: | + do { + ${/compiler/if/builtin-unreachable:/name}(); + ${/score/if/assert-unreachable:/name}(); + } while ( 0 ) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +name: RTEMS_UNREACHABLE +notes: null +params: [] +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/unused.yml b/spec/rtems/basedefs/if/unused.yml new file mode 100644 index 00000000..44ffe02d --- /dev/null +++ b/spec/rtems/basedefs/if/unused.yml @@ -0,0 +1,24 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Tells the compiler that a specific variable or function is deliberately + unused. +copyrights: +- Copyright (C) 2013 On-Line Applications Research Corporation (OAR) +definition: + default: '' + variants: + - definition: | + __attribute__((__unused__)) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_UNUSED +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/used.yml b/spec/rtems/basedefs/if/used.yml new file mode 100644 index 00000000..ea8a4c38 --- /dev/null +++ b/spec/rtems/basedefs/if/used.yml @@ -0,0 +1,23 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Tells the compiler that a specific variable or function is used. +copyrights: +- Copyright (C) 2009 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__used__)) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_USED +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/warn-unused-result.yml b/spec/rtems/basedefs/if/warn-unused-result.yml new file mode 100644 index 00000000..df17643d --- /dev/null +++ b/spec/rtems/basedefs/if/warn-unused-result.yml @@ -0,0 +1,24 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Tells the compiler in a declaration that the result of this function should + be used. +copyrights: +- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__warn_unused_result__)) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_WARN_UNUSED_RESULT +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/weak-alias.yml b/spec/rtems/basedefs/if/weak-alias.yml new file mode 100644 index 00000000..b23dec89 --- /dev/null +++ b/spec/rtems/basedefs/if/weak-alias.yml @@ -0,0 +1,32 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Instructs the compiler to generate a weak alias to the specified target + function. +copyrights: +- Copyright (C) 2017 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__weak__, __alias__(#_target))) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_WEAK_ALIAS +notes: null +params: +- description: | + is the target function name. + dir: null + name: _target +return: + return: null + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/weak.yml b/spec/rtems/basedefs/if/weak.yml new file mode 100644 index 00000000..ebd60fb5 --- /dev/null +++ b/spec/rtems/basedefs/if/weak.yml @@ -0,0 +1,26 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Tells the compiler in a function definition that this function should be + weak. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '' + variants: + - definition: | + __attribute__((__weak__)) + enabled-by: + - defined(${/compiler/if/gnuc:/name}) +description: | + Use this attribute for function definitions. Do not use it for function + declarations. +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_WEAK +notes: null +type: interface diff --git a/spec/rtems/basedefs/if/xconcat.yml b/spec/rtems/basedefs/if/xconcat.yml new file mode 100644 index 00000000..b2280356 --- /dev/null +++ b/spec/rtems/basedefs/if/xconcat.yml @@ -0,0 +1,34 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Concatenates expansion of _x and expansion of _y. +copyrights: +- Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: ${concat:/name}( _x, _y ) + variants: [] +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_XCONCAT +notes: null +params: +- description: | + is expanded first and then used as the left hand side token of the + concatenation. + dir: null + name: _x +- description: | + is expanded first and then used as the right hand side token of the + concatenation. + dir: null + name: _y +return: + return: | + The concatenation of the expansions of tokens _x and _y. + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/xstring.yml b/spec/rtems/basedefs/if/xstring.yml new file mode 100644 index 00000000..ba73f8ec --- /dev/null +++ b/spec/rtems/basedefs/if/xstring.yml @@ -0,0 +1,28 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Stringifies the expansion of _x. +copyrights: +- Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: ${string:/name}( _x ) + variants: [] +description: null +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_XSTRING +notes: null +params: +- description: | + is the token expand and stringify. + dir: null + name: _x +return: + return: | + The stringification of the expansion of token _x. + return-values: [] +type: interface diff --git a/spec/rtems/basedefs/if/zero-length-array.yml b/spec/rtems/basedefs/if/zero-length-array.yml new file mode 100644 index 00000000..e69a17ab --- /dev/null +++ b/spec/rtems/basedefs/if/zero-length-array.yml @@ -0,0 +1,25 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + This is a constant to declare zero-length arrays. +copyrights: +- Copyright (C) 2014 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: '0' + variants: + - definition: null + enabled-by: + - ${/compiler/if/stdc-version:/name} >= 199409L +description: | + Zero-length arrays are valid in C99 as flexible array members. C++11 does + not allow flexible array members. Use the GNU extension which is also + supported by other compilers. +enabled-by: true +interface-type: define +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: RTEMS_ZERO_LENGTH_ARRAY +notes: null +type: interface |