summaryrefslogtreecommitdiff
path: root/spec/if/rtems/basedefs
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-05-06 12:44:23 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-05-28 10:38:22 +0200
commit31a305f1d26256c5439d1dd552a4136848e841f0 (patch)
treef8c6584f4ec5ca2c98e94476da874fe066519a8d /spec/if/rtems/basedefs
parentd9559b23f02f3e5e699334ea88f2fdae290c485c (diff)
spec: Add some interface items
Diffstat (limited to 'spec/if/rtems/basedefs')
-rw-r--r--spec/if/rtems/basedefs/alias.yml30
-rw-r--r--spec/if/rtems/basedefs/aligned.yml31
-rw-r--r--spec/if/rtems/basedefs/alloc-align.yml31
-rw-r--r--spec/if/rtems/basedefs/alloc-size-2.yml35
-rw-r--r--spec/if/rtems/basedefs/alloc-size.yml31
-rw-r--r--spec/if/rtems/basedefs/array-size.yml27
-rw-r--r--spec/if/rtems/basedefs/compiler-deprecated-attribute.yml19
-rw-r--r--spec/if/rtems/basedefs/compiler-memory-barrier.yml27
-rw-r--r--spec/if/rtems/basedefs/compiler-no-return-attribute.yml19
-rw-r--r--spec/if/rtems/basedefs/compiler-packed-attribute.yml19
-rw-r--r--spec/if/rtems/basedefs/compiler-pure-attribute.yml19
-rw-r--r--spec/if/rtems/basedefs/compiler-used-attribute.yml19
-rw-r--r--spec/if/rtems/basedefs/concat.yml31
-rw-r--r--spec/if/rtems/basedefs/const.yml24
-rw-r--r--spec/if/rtems/basedefs/container-of.yml36
-rw-r--r--spec/if/rtems/basedefs/declare-global-symbol.yml28
-rw-r--r--spec/if/rtems/basedefs/deconst.yml33
-rw-r--r--spec/if/rtems/basedefs/define-global-symbol.yml43
-rw-r--r--spec/if/rtems/basedefs/deprecated.yml23
-rw-r--r--spec/if/rtems/basedefs/dequalify-depthx.yml50
-rw-r--r--spec/if/rtems/basedefs/dequalify.yml33
-rw-r--r--spec/if/rtems/basedefs/devolatile.yml33
-rw-r--r--spec/if/rtems/basedefs/expand.yml26
-rw-r--r--spec/if/rtems/basedefs/false.yml18
-rw-r--r--spec/if/rtems/basedefs/have-member-same-type.yml47
-rw-r--r--spec/if/rtems/basedefs/header.yml25
-rw-r--r--spec/if/rtems/basedefs/inline-routine.yml22
-rw-r--r--spec/if/rtems/basedefs/malloclike.yml23
-rw-r--r--spec/if/rtems/basedefs/no-inline.yml22
-rw-r--r--spec/if/rtems/basedefs/no-return.yml23
-rw-r--r--spec/if/rtems/basedefs/obfuscate-variable.yml33
-rw-r--r--spec/if/rtems/basedefs/packed.yml23
-rw-r--r--spec/if/rtems/basedefs/predict-false.yml32
-rw-r--r--spec/if/rtems/basedefs/predict-true.yml32
-rw-r--r--spec/if/rtems/basedefs/printflike.yml36
-rw-r--r--spec/if/rtems/basedefs/pure.yml24
-rw-r--r--spec/if/rtems/basedefs/return-address.yml26
-rw-r--r--spec/if/rtems/basedefs/section.yml31
-rw-r--r--spec/if/rtems/basedefs/static-assert.yml40
-rw-r--r--spec/if/rtems/basedefs/string.yml27
-rw-r--r--spec/if/rtems/basedefs/symbol-name.yml32
-rw-r--r--spec/if/rtems/basedefs/true.yml18
-rw-r--r--spec/if/rtems/basedefs/typeof-refx.yml36
-rw-r--r--spec/if/rtems/basedefs/unreachable.yml28
-rw-r--r--spec/if/rtems/basedefs/unused.yml23
-rw-r--r--spec/if/rtems/basedefs/used.yml22
-rw-r--r--spec/if/rtems/basedefs/warn-unused-result.yml23
-rw-r--r--spec/if/rtems/basedefs/weak-alias.yml31
-rw-r--r--spec/if/rtems/basedefs/weak.yml25
-rw-r--r--spec/if/rtems/basedefs/xconcat.yml33
-rw-r--r--spec/if/rtems/basedefs/xstring.yml27
-rw-r--r--spec/if/rtems/basedefs/zero-length-array.yml21
52 files changed, 1470 insertions, 0 deletions
diff --git a/spec/if/rtems/basedefs/alias.yml b/spec/if/rtems/basedefs/alias.yml
new file mode 100644
index 00000000..dfaee293
--- /dev/null
+++ b/spec/if/rtems/basedefs/alias.yml
@@ -0,0 +1,30 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2016 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Instructs the compiler to generate an alias to the specified target function.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__alias__(#_target)))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_ALIAS
+interface-params:
+- description: |
+ is the target function name.
+ dir: null
+ name: _target
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/aligned.yml b/spec/if/rtems/basedefs/aligned.yml
new file mode 100644
index 00000000..5b48bc34
--- /dev/null
+++ b/spec/if/rtems/basedefs/aligned.yml
@@ -0,0 +1,31 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2016 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Instructs the compiler in a declaration or definition to enforce the
+ specified alignment.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__aligned__(_alignment)))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_ALIGNED
+interface-params:
+- description: |
+ is the desired alignment in bytes.
+ dir: null
+ name: _alignment
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/alloc-align.yml b/spec/if/rtems/basedefs/alloc-align.yml
new file mode 100644
index 00000000..a10a85cd
--- /dev/null
+++ b/spec/if/rtems/basedefs/alloc-align.yml
@@ -0,0 +1,31 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Tells the compiler in a declaration that the memory allocation alignment
+ parameter of this function is similar to aligned_alloc().
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__alloc_align__(_index)))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_ALLOC_ALIGN
+interface-params:
+- description: |
+ is the allocation alignment parameter index (starting with one).
+ dir: null
+ name: _index
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/alloc-size-2.yml b/spec/if/rtems/basedefs/alloc-size-2.yml
new file mode 100644
index 00000000..a2a6e407
--- /dev/null
+++ b/spec/if/rtems/basedefs/alloc-size-2.yml
@@ -0,0 +1,35 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Tells the compiler in a declaration that the memory allocation item count and
+ item size parameter of this function is similar to calloc().
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__alloc_size__(_count_index, _size_index)))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_ALLOC_SIZE_2
+interface-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
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/alloc-size.yml b/spec/if/rtems/basedefs/alloc-size.yml
new file mode 100644
index 00000000..1b15bea6
--- /dev/null
+++ b/spec/if/rtems/basedefs/alloc-size.yml
@@ -0,0 +1,31 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Tells the compiler in a declaration that the memory allocation size parameter
+ of this function is similar to malloc().
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__alloc_size__(_index)))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_ALLOC_SIZE
+interface-params:
+- description: |
+ is the allocation size parameter index (starting with one).
+ dir: null
+ name: _index
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/array-size.yml b/spec/if/rtems/basedefs/array-size.yml
new file mode 100644
index 00000000..fdd8ca63
--- /dev/null
+++ b/spec/if/rtems/basedefs/array-size.yml
@@ -0,0 +1,27 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Returns the element count of the specified array.
+interface-definition:
+ default: |
+ (sizeof(_array) / sizeof((_array)[0]))
+ variants: []
+interface-description: null
+interface-name: RTEMS_ARRAY_SIZE
+interface-params:
+- description: |
+ is the name of the array.
+ dir: null
+ name: _array
+interface-return:
+ return: The element count of the specified array.
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/compiler-deprecated-attribute.yml b/spec/if/rtems/basedefs/compiler-deprecated-attribute.yml
new file mode 100644
index 00000000..38416d19
--- /dev/null
+++ b/spec/if/rtems/basedefs/compiler-deprecated-attribute.yml
@@ -0,0 +1,19 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Provided for backward compatibility.
+interface-definition:
+ default: |
+ ${deprecated:/interface-name}
+ variants: []
+interface-description: null
+interface-name: RTEMS_COMPILER_DEPRECATED_ATTRIBUTE
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/compiler-memory-barrier.yml b/spec/if/rtems/basedefs/compiler-memory-barrier.yml
new file mode 100644
index 00000000..05558956
--- /dev/null
+++ b/spec/if/rtems/basedefs/compiler-memory-barrier.yml
@@ -0,0 +1,27 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ This macro forbids the compiler to reorder read and write commands around it.
+interface-definition:
+ default: |
+ do { } while ( 0 )
+ variants:
+ - definition: |
+ __asm__ volatile( "" ::: "memory" )
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_COMPILER_MEMORY_BARRIER
+interface-params: []
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/compiler-no-return-attribute.yml b/spec/if/rtems/basedefs/compiler-no-return-attribute.yml
new file mode 100644
index 00000000..b4c58f9a
--- /dev/null
+++ b/spec/if/rtems/basedefs/compiler-no-return-attribute.yml
@@ -0,0 +1,19 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Provided for backward compatibility.
+interface-definition:
+ default: |
+ ${no-return:/interface-name}
+ variants: []
+interface-description: null
+interface-name: RTEMS_COMPILER_NO_RETURN_ATTRIBUTE
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/compiler-packed-attribute.yml b/spec/if/rtems/basedefs/compiler-packed-attribute.yml
new file mode 100644
index 00000000..559b384f
--- /dev/null
+++ b/spec/if/rtems/basedefs/compiler-packed-attribute.yml
@@ -0,0 +1,19 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Provided for backward compatibility.
+interface-definition:
+ default: |
+ ${packed:/interface-name}
+ variants: []
+interface-description: null
+interface-name: RTEMS_COMPILER_PACKED_ATTRIBUTE
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/compiler-pure-attribute.yml b/spec/if/rtems/basedefs/compiler-pure-attribute.yml
new file mode 100644
index 00000000..2f58587d
--- /dev/null
+++ b/spec/if/rtems/basedefs/compiler-pure-attribute.yml
@@ -0,0 +1,19 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Provided for backward compatibility.
+interface-definition:
+ default: |
+ ${pure:/interface-name}
+ variants: []
+interface-description: null
+interface-name: RTEMS_COMPILER_PURE_ATTRIBUTE
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/compiler-used-attribute.yml b/spec/if/rtems/basedefs/compiler-used-attribute.yml
new file mode 100644
index 00000000..93625fed
--- /dev/null
+++ b/spec/if/rtems/basedefs/compiler-used-attribute.yml
@@ -0,0 +1,19 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Provided for backward compatibility.
+interface-definition:
+ default: |
+ ${used:/interface-name}
+ variants: []
+interface-description: null
+interface-name: RTEMS_COMPILER_USED_ATTRIBUTE
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/concat.yml b/spec/if/rtems/basedefs/concat.yml
new file mode 100644
index 00000000..014096e3
--- /dev/null
+++ b/spec/if/rtems/basedefs/concat.yml
@@ -0,0 +1,31 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Concatenates _x and _y without expanding.
+interface-definition:
+ default: _x##_y
+ variants: []
+interface-description: null
+interface-name: RTEMS_CONCAT
+interface-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
+interface-return:
+ return: |
+ The concatenation of the tokens _x and _y.
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/const.yml b/spec/if/rtems/basedefs/const.yml
new file mode 100644
index 00000000..302637d8
--- /dev/null
+++ b/spec/if/rtems/basedefs/const.yml
@@ -0,0 +1,24 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2019 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-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.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__const__))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_CONST
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/container-of.yml b/spec/if/rtems/basedefs/container-of.yml
new file mode 100644
index 00000000..8da027fd
--- /dev/null
+++ b/spec/if/rtems/basedefs/container-of.yml
@@ -0,0 +1,36 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2014 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Returns the pointer to the container of a specified member pointer.
+interface-definition:
+ default: |
+ ( (_type *) ( (${/if/c/uintptr_t:/interface-name}) ( _m ) - ${/if/c/offsetof:/interface-name}( _type, _member_name ) ) )
+ variants: []
+interface-description: null
+interface-name: RTEMS_CONTAINER_OF
+interface-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
+interface-return:
+ return: |
+ Returns the pointer to the container of a specified member pointer.
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/declare-global-symbol.yml b/spec/if/rtems/basedefs/declare-global-symbol.yml
new file mode 100644
index 00000000..68b6953f
--- /dev/null
+++ b/spec/if/rtems/basedefs/declare-global-symbol.yml
@@ -0,0 +1,28 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Declares a global symbol with the specified name.
+interface-definition:
+ default: |
+ extern char _name[]
+ variants: []
+interface-description: |
+ This macro must be placed at file scope.
+interface-name: RTEMS_DECLARE_GLOBAL_SYMBOL
+interface-params:
+- description: |
+ is the name of the global symbol. It shall be a valid designator.
+ dir: null
+ name: _name
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/deconst.yml b/spec/if/rtems/basedefs/deconst.yml
new file mode 100644
index 00000000..81b1e373
--- /dev/null
+++ b/spec/if/rtems/basedefs/deconst.yml
@@ -0,0 +1,33 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+- Copyright (C) 2014 Paval Pisa
+enabled-by: []
+interface-brief: |
+ Performs a type cast which removes const qualifiers without warnings to the
+ specified type for the specified pointer variable.
+interface-definition:
+ default:
+ ${dequalify-depthx:/interface-name}(*, _type, _var)
+ variants: []
+interface-description: null
+interface-name: RTEMS_DECONST
+interface-params:
+- description: |
+ is the target type of the cast.
+ dir: null
+ name: _type
+- description: |
+ is the pointer variable.
+ dir: null
+ name: _var
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/define-global-symbol.yml b/spec/if/rtems/basedefs/define-global-symbol.yml
new file mode 100644
index 00000000..2abb27c5
--- /dev/null
+++ b/spec/if/rtems/basedefs/define-global-symbol.yml
@@ -0,0 +1,43 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2018, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Defines a global symbol with the specified name and value.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __asm__(
+ "\t.globl " ${xstring:/interface-name}( ${symbol-name:/interface-name}( _name ) )
+ "\n\t.set " ${xstring:/interface-name}( ${symbol-name:/interface-name}( _name ) )
+ ", " ${string:/interface-name}( _value ) "\n"
+ )
+ enabled-by:
+ - defined(${/if/compiler/user-label-prefix:/interface-name})
+interface-description: |
+ This macro shall be placed at file scope.
+interface-name: RTEMS_DEFINE_GLOBAL_SYMBOL
+interface-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
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/deprecated.yml b/spec/if/rtems/basedefs/deprecated.yml
new file mode 100644
index 00000000..c2079b7b
--- /dev/null
+++ b/spec/if/rtems/basedefs/deprecated.yml
@@ -0,0 +1,23 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2009 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Instructs the compiler in a declaration to issue a warning whenever a
+ variable, function, or type using this declaration will be used.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__deprecated__))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_DEPRECATED
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/dequalify-depthx.yml b/spec/if/rtems/basedefs/dequalify-depthx.yml
new file mode 100644
index 00000000..8858a3ea
--- /dev/null
+++ b/spec/if/rtems/basedefs/dequalify-depthx.yml
@@ -0,0 +1,50 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+- Copyright (C) 2014 Paval Pisa
+enabled-by: []
+interface-brief: |
+ Performs a type cast which removes qualifiers without warnings to the
+ specified type for the specified variable.
+interface-definition:
+ default:
+ ((_type)(${/if/c/uintptr_t:/interface-name})(const volatile void *)(_var))
+ variants:
+ - definition: |
+ (const_cast<_type>(_var))
+ enabled-by:
+ - defined(${/if/compiler/cplusplus:/interface-name})
+ - definition: |
+ ${/if/compiler/builtin-choose-expr:/interface-name}(${/if/compiler/builtin-types-compatible-p:/interface-name}(
+ ${typeof-refx:/interface-name}(_ptr_level, _var),
+ ${typeof-refx:/interface-name}(_ptr_level, _type)
+ ) || ${/if/compiler/builtin-types-compatible-p:/interface-name}(_type, void *),
+ (_type)(_var),
+ ${/if/impl/dequalify-types-not-compatible:/interface-name}())
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_DEQUALIFY_DEPTHX
+interface-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
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/dequalify.yml b/spec/if/rtems/basedefs/dequalify.yml
new file mode 100644
index 00000000..5c9cde66
--- /dev/null
+++ b/spec/if/rtems/basedefs/dequalify.yml
@@ -0,0 +1,33 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+- Copyright (C) 2014 Paval Pisa
+enabled-by: []
+interface-brief: |
+ Performs a type cast which removes all qualifiers without warnings to the
+ specified type for the specified pointer variable.
+interface-definition:
+ default:
+ ${dequalify-depthx:/interface-name}(*, _type, _var)
+ variants: []
+interface-description: null
+interface-name: RTEMS_DEQUALIFY
+interface-params:
+- description: |
+ is the target type of the cast.
+ dir: null
+ name: _type
+- description: |
+ is the pointer variable.
+ dir: null
+ name: _var
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/devolatile.yml b/spec/if/rtems/basedefs/devolatile.yml
new file mode 100644
index 00000000..d2bf898b
--- /dev/null
+++ b/spec/if/rtems/basedefs/devolatile.yml
@@ -0,0 +1,33 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+- Copyright (C) 2014 Paval Pisa
+enabled-by: []
+interface-brief: |
+ Performs a type cast which removes volatile qualifiers without warnings to
+ the specified type for the specified pointer variable.
+interface-definition:
+ default:
+ ${dequalify-depthx:/interface-name}(*, _type, _var)
+ variants: []
+interface-description: null
+interface-name: RTEMS_DEVOLATILE
+interface-params:
+- description: |
+ is the target type of the cast.
+ dir: null
+ name: _type
+- description: |
+ is the pointer variable.
+ dir: null
+ name: _var
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/expand.yml b/spec/if/rtems/basedefs/expand.yml
new file mode 100644
index 00000000..e6857f6e
--- /dev/null
+++ b/spec/if/rtems/basedefs/expand.yml
@@ -0,0 +1,26 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Helper macro to perform a macro expansion on the specified token.
+interface-definition:
+ default: _token
+ variants: []
+interface-description: null
+interface-name: RTEMS_EXPAND
+interface-params:
+- description: |
+ is the token to expand.
+ dir: null
+ name: _token
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/false.yml b/spec/if/rtems/basedefs/false.yml
new file mode 100644
index 00000000..b0fb90e0
--- /dev/null
+++ b/spec/if/rtems/basedefs/false.yml
@@ -0,0 +1,18 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by:
+ - not: "FALSE"
+interface-brief: If FALSE is undefined, then FALSE is defined to 0.
+interface-description: null
+interface-name: "FALSE"
+interface-definition:
+ default: "0"
+ variants: []
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/have-member-same-type.yml b/spec/if/rtems/basedefs/have-member-same-type.yml
new file mode 100644
index 00000000..1928c693
--- /dev/null
+++ b/spec/if/rtems/basedefs/have-member-same-type.yml
@@ -0,0 +1,47 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2017 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Evaluates to true if the specified members of two types have compatible
+ types, otherwise to false.
+interface-definition:
+ default: |
+ ${/if/c/true:/interface-name}
+ variants:
+ - definition: |
+ ${/if/compiler/builtin-types-compatible-p:/interface-name}(
+ ${/if/compiler/typeof:/interface-name}( ( (_t_lhs *) 0 )->_m_lhs ),
+ ${/if/compiler/typeof:/interface-name}( ( (_t_rhs *) 0 )->_m_rhs )
+ )
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_HAVE_MEMBER_SAME_TYPE
+interface-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
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/header.yml b/spec/if/rtems/basedefs/header.yml
new file mode 100644
index 00000000..500a373f
--- /dev/null
+++ b/spec/if/rtems/basedefs/header.yml
@@ -0,0 +1,25 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-domain: rtems
+interface-type: header-file
+links:
+- role: interface-include
+ uid: /if/build-options/cpuopts
+ enabled-by: []
+- role: interface-include
+ uid: /if/c/stddef
+ enabled-by:
+ not: ASM
+- role: interface-include
+ uid: /if/c/stdbool
+ enabled-by:
+ not: ASM
+- role: interface-include
+ uid: /if/c/stdint
+ enabled-by:
+ not: ASM
+interface-path: rtems/score/basedefs.h
+interface-prefix: cpukit/include
+type: interface
diff --git a/spec/if/rtems/basedefs/inline-routine.yml b/spec/if/rtems/basedefs/inline-routine.yml
new file mode 100644
index 00000000..49912ef8
--- /dev/null
+++ b/spec/if/rtems/basedefs/inline-routine.yml
@@ -0,0 +1,22 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Gives a hint to the compiler in a function declaration to inline this
+ function.
+interface-definition:
+ default: static inline
+ variants:
+ - definition: static __inline__
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_INLINE_ROUTINE
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/malloclike.yml b/spec/if/rtems/basedefs/malloclike.yml
new file mode 100644
index 00000000..5c76442a
--- /dev/null
+++ b/spec/if/rtems/basedefs/malloclike.yml
@@ -0,0 +1,23 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Tells the compiler in a declaration that this function is a memory allocation
+ function similar to malloc().
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__malloc__))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_MALLOCLIKE
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/no-inline.yml b/spec/if/rtems/basedefs/no-inline.yml
new file mode 100644
index 00000000..591bdc0f
--- /dev/null
+++ b/spec/if/rtems/basedefs/no-inline.yml
@@ -0,0 +1,22 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Instructs the compiler in a function declaration to not inline this function.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__noinline__))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_NO_INLINE
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/no-return.yml b/spec/if/rtems/basedefs/no-return.yml
new file mode 100644
index 00000000..e2279647
--- /dev/null
+++ b/spec/if/rtems/basedefs/no-return.yml
@@ -0,0 +1,23 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Tells the compiler in a function declaration that this function does not
+ return.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__noreturn__))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_NO_RETURN
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/obfuscate-variable.yml b/spec/if/rtems/basedefs/obfuscate-variable.yml
new file mode 100644
index 00000000..e3d377fd
--- /dev/null
+++ b/spec/if/rtems/basedefs/obfuscate-variable.yml
@@ -0,0 +1,33 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2016, 2018 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Obfuscates the variable so that the compiler cannot perform optimizations
+ based on the variable value.
+interface-definition:
+ default: |
+ (void) (_var)
+ variants:
+ - definition: |
+ __asm__("" : "+r" (_var))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: |
+ The variable must be simple enough to fit into a register.
+interface-name: RTEMS_OBFUSCATE_VARIABLE
+interface-params:
+- description: |
+ is the variable to obfuscate.
+ dir: null
+ name: _var
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/packed.yml b/spec/if/rtems/basedefs/packed.yml
new file mode 100644
index 00000000..c192fc8f
--- /dev/null
+++ b/spec/if/rtems/basedefs/packed.yml
@@ -0,0 +1,23 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Instructs the compiler in a type definition to place members of a structure
+ or union so that the memory required is minimized.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__packed__))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_PACKED
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/predict-false.yml b/spec/if/rtems/basedefs/predict-false.yml
new file mode 100644
index 00000000..a6e5f090
--- /dev/null
+++ b/spec/if/rtems/basedefs/predict-false.yml
@@ -0,0 +1,32 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Returns the value of the specified integral expression and tells the compiler
+ that the predicted value is false (1).
+interface-definition:
+ default: |
+ ( _exp )
+ variants:
+ - definition: |
+ ${/if/compiler/builtin-expect:/interface-name}( ( _exp ), 0 )
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_PREDICT_FALSE
+interface-params:
+- description: |
+ is the expression.
+ dir: null
+ name: _exp
+interface-return:
+ return: The value of the expression.
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/predict-true.yml b/spec/if/rtems/basedefs/predict-true.yml
new file mode 100644
index 00000000..7c0ef55b
--- /dev/null
+++ b/spec/if/rtems/basedefs/predict-true.yml
@@ -0,0 +1,32 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Returns the value of the specified integral expression and tells the compiler
+ that the predicted value is true (1).
+interface-definition:
+ default: |
+ ( _exp )
+ variants:
+ - definition: |
+ ${/if/compiler/builtin-expect:/interface-name}( ( _exp ), 1 )
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_PREDICT_TRUE
+interface-params:
+- description: |
+ is the expression.
+ dir: null
+ name: _exp
+interface-return:
+ return: The value of the expression.
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/printflike.yml b/spec/if/rtems/basedefs/printflike.yml
new file mode 100644
index 00000000..c04e2d11
--- /dev/null
+++ b/spec/if/rtems/basedefs/printflike.yml
@@ -0,0 +1,36 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2016 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Tells the compiler in a declaration that this function expects printf()-like
+ arguments.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__format__(__printf__, _format_pos, _ap_pos)))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_PRINTFLIKE
+interface-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
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/pure.yml b/spec/if/rtems/basedefs/pure.yml
new file mode 100644
index 00000000..5ce7aadc
--- /dev/null
+++ b/spec/if/rtems/basedefs/pure.yml
@@ -0,0 +1,24 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2011 On-Line Applications Research Corporation (OAR)
+enabled-by: []
+interface-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.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__pure__))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_PURE
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/return-address.yml b/spec/if/rtems/basedefs/return-address.yml
new file mode 100644
index 00000000..02529fba
--- /dev/null
+++ b/spec/if/rtems/basedefs/return-address.yml
@@ -0,0 +1,26 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2019 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Returns the return address of the current function.
+interface-definition:
+ default: ${/if/c/null:/interface-name}
+ variants:
+ - definition: |
+ ${/if/compiler/builtin-return-address:/interface-name}(0)
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_RETURN_ADDRESS
+interface-params: []
+interface-return:
+ return: The return address of the current function.
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/section.yml b/spec/if/rtems/basedefs/section.yml
new file mode 100644
index 00000000..cf0cc7ee
--- /dev/null
+++ b/spec/if/rtems/basedefs/section.yml
@@ -0,0 +1,31 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Instructs the compiler to place a specific variable or function in the
+ specified section.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__section__(_section)))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_SECTION
+interface-params:
+- description: |
+ is the section name as a string.
+ dir: null
+ name: _section
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/static-assert.yml b/spec/if/rtems/basedefs/static-assert.yml
new file mode 100644
index 00000000..92571992
--- /dev/null
+++ b/spec/if/rtems/basedefs/static-assert.yml
@@ -0,0 +1,40 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2011, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Asserts at compile time that the specified condition is satisfied.
+interface-definition:
+ default: |
+ struct rtems_static_assert_ ## _msg
+ { int rtems_static_assert_ ## _msg : (_cond) ? 1 : -1; }
+ variants:
+ - definition: |
+ static_assert(_cond, # _msg)
+ enabled-by:
+ - ${/if/compiler/cplusplus:/interface-name} >= 201103L
+ - definition: |
+ _Static_assert(_cond, # _msg)
+ enabled-by:
+ - ${/if/compiler/stdc-version:/interface-name} >= 201112L
+interface-description: null
+interface-name: RTEMS_STATIC_ASSERT
+interface-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
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/string.yml b/spec/if/rtems/basedefs/string.yml
new file mode 100644
index 00000000..9b4eab4a
--- /dev/null
+++ b/spec/if/rtems/basedefs/string.yml
@@ -0,0 +1,27 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Stringifies _x without expanding.
+interface-definition:
+ default: "#_x"
+ variants: []
+interface-description: null
+interface-name: RTEMS_STRING
+interface-params:
+- description: |
+ is the token to stringify.
+ dir: null
+ name: _x
+interface-return:
+ return: |
+ The stringification of the token _x.
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/symbol-name.yml b/spec/if/rtems/basedefs/symbol-name.yml
new file mode 100644
index 00000000..8008a3bb
--- /dev/null
+++ b/spec/if/rtems/basedefs/symbol-name.yml
@@ -0,0 +1,32 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Constructs a symbol name.
+interface-definition:
+ default: |
+ ${expand:/interface-name}(_name)
+ variants:
+ - definition: |
+ ${xconcat:/interface-name}(${/if/compiler/user-label-prefix:/interface-name}, _name)
+ enabled-by:
+ - defined(${/if/compiler/user-label-prefix:/interface-name})
+interface-description: null
+interface-name: RTEMS_SYMBOL_NAME
+interface-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
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/true.yml b/spec/if/rtems/basedefs/true.yml
new file mode 100644
index 00000000..7ced1dd8
--- /dev/null
+++ b/spec/if/rtems/basedefs/true.yml
@@ -0,0 +1,18 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by:
+ - not: "TRUE"
+interface-brief: If TRUE is undefined, then TRUE is defined to 1.
+interface-description: null
+interface-name: "TRUE"
+interface-definition:
+ default: "1"
+ variants: []
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/typeof-refx.yml b/spec/if/rtems/basedefs/typeof-refx.yml
new file mode 100644
index 00000000..b6a6f0c7
--- /dev/null
+++ b/spec/if/rtems/basedefs/typeof-refx.yml
@@ -0,0 +1,36 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+- Copyright (C) 2014 Paval Pisa
+enabled-by: []
+interface-brief: |
+ Returns the type of a pointer reference of the specified level to the specified type.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ ${/if/compiler/typeof:/interface-name}(_level(union { int z; ${/if/compiler/typeof:/interface-name}(_target) x; }){0}.x)
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: |
+ The reference type idea is based on libHX by Jan Engelhardt.
+interface-name: RTEMS_TYPEOF_REFX
+interface-params:
+- description: |
+ is the pointer indirection level expressed in *.
+ dir: null
+ name: _level
+- description: |
+ is the reference target type.
+ dir: null
+ name: _target
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/unreachable.yml b/spec/if/rtems/basedefs/unreachable.yml
new file mode 100644
index 00000000..91182c09
--- /dev/null
+++ b/spec/if/rtems/basedefs/unreachable.yml
@@ -0,0 +1,28 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2016 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Tells the compiler that this program point is unreachable.
+interface-definition:
+ default: |
+ ${/if/impl/assert-unreachable:/interface-name}()
+ variants:
+ - definition: |
+ do {
+ ${/if/compiler/builtin-unreachable:/interface-name}();
+ ${/if/impl/assert-unreachable:/interface-name}();
+ } while ( 0 )
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_UNREACHABLE
+interface-params: []
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+type: interface
diff --git a/spec/if/rtems/basedefs/unused.yml b/spec/if/rtems/basedefs/unused.yml
new file mode 100644
index 00000000..0a8a31b5
--- /dev/null
+++ b/spec/if/rtems/basedefs/unused.yml
@@ -0,0 +1,23 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2013 On-Line Applications Research Corporation (OAR)
+enabled-by: []
+interface-brief: |
+ Tells the compiler that a specific variable or function is deliberately
+ unused.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__unused__))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_UNUSED
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/used.yml b/spec/if/rtems/basedefs/used.yml
new file mode 100644
index 00000000..88a78745
--- /dev/null
+++ b/spec/if/rtems/basedefs/used.yml
@@ -0,0 +1,22 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2009 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Tells the compiler that a specific variable or function is used.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__used__))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_USED
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/warn-unused-result.yml b/spec/if/rtems/basedefs/warn-unused-result.yml
new file mode 100644
index 00000000..05905c26
--- /dev/null
+++ b/spec/if/rtems/basedefs/warn-unused-result.yml
@@ -0,0 +1,23 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Tells the compiler in a declaration that the result of this function should
+ be used.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__warn_unused_result__))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_WARN_UNUSED_RESULT
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/weak-alias.yml b/spec/if/rtems/basedefs/weak-alias.yml
new file mode 100644
index 00000000..31a772d0
--- /dev/null
+++ b/spec/if/rtems/basedefs/weak-alias.yml
@@ -0,0 +1,31 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2017 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Instructs the compiler to generate a weak alias to the specified target
+ function.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__weak__, __alias__(#_target)))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: null
+interface-name: RTEMS_WEAK_ALIAS
+interface-params:
+- description: |
+ is the target function name.
+ dir: null
+ name: _target
+interface-return:
+ return: null
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/weak.yml b/spec/if/rtems/basedefs/weak.yml
new file mode 100644
index 00000000..f53b4aab
--- /dev/null
+++ b/spec/if/rtems/basedefs/weak.yml
@@ -0,0 +1,25 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Tells the compiler in a function definition that this function should be
+ weak.
+interface-definition:
+ default: ""
+ variants:
+ - definition: |
+ __attribute__((__weak__))
+ enabled-by:
+ - defined(${/if/compiler/gnuc:/interface-name})
+interface-description: |
+ Use this attribute for function definitions. Do not use it for function
+ declarations.
+interface-name: RTEMS_WEAK
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/xconcat.yml b/spec/if/rtems/basedefs/xconcat.yml
new file mode 100644
index 00000000..9b25e7a3
--- /dev/null
+++ b/spec/if/rtems/basedefs/xconcat.yml
@@ -0,0 +1,33 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Concatenates expansion of _x and expansion of _y.
+interface-definition:
+ default: ${concat:/interface-name}( _x, _y )
+ variants: []
+interface-description: null
+interface-name: RTEMS_XCONCAT
+interface-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
+interface-return:
+ return: |
+ The concatenation of the expansions of tokens _x and _y.
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/xstring.yml b/spec/if/rtems/basedefs/xstring.yml
new file mode 100644
index 00000000..66048de5
--- /dev/null
+++ b/spec/if/rtems/basedefs/xstring.yml
@@ -0,0 +1,27 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2015 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ Stringifies the expansion of _x.
+interface-definition:
+ default: ${string:/interface-name}( _x )
+ variants: []
+interface-description: null
+interface-name: RTEMS_XSTRING
+interface-params:
+- description: |
+ is the token expand and stringify.
+ dir: null
+ name: _x
+interface-return:
+ return: |
+ The stringification of the expansion of token _x.
+ return-values: []
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface
diff --git a/spec/if/rtems/basedefs/zero-length-array.yml b/spec/if/rtems/basedefs/zero-length-array.yml
new file mode 100644
index 00000000..c0526186
--- /dev/null
+++ b/spec/if/rtems/basedefs/zero-length-array.yml
@@ -0,0 +1,21 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2014 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: []
+interface-brief: |
+ This is a constant to declare zero-length arrays.
+interface-definition:
+ default: "0"
+ variants: []
+interface-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.
+interface-name: RTEMS_ZERO_LENGTH_ARRAY
+interface-type: define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: /groups/api/basedefs
+type: interface