diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-05-06 12:44:23 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-05-28 10:38:22 +0200 |
commit | 31a305f1d26256c5439d1dd552a4136848e841f0 (patch) | |
tree | f8c6584f4ec5ca2c98e94476da874fe066519a8d | |
parent | interface: Support void functions (diff) | |
download | rtems-central-31a305f1d26256c5439d1dd552a4136848e841f0.tar.bz2 |
spec: Add some interface items
109 files changed, 2087 insertions, 0 deletions
@@ -79,3 +79,10 @@ appl-config: target: external/rtems-docs/c-user/config/task-stack-alloc.rst validation: base-directory: external/rtems +interface: + item-level-interfaces: + - /if/build-options/domain + - /if/compiler/domain + - /if/use/domain + interface-domains: + rtems: external/rtems diff --git a/rtems_spec_to_x.py b/rtems_spec_to_x.py index 1024c0d0..348fd143 100755 --- a/rtems_spec_to_x.py +++ b/rtems_spec_to_x.py @@ -34,6 +34,7 @@ import rtemsqual.applconfig import rtemsqual.build from rtemsqual.items import ItemCache import rtemsqual.glossary +import rtemsqual.interface import rtemsqual.util import rtemsqual.validation @@ -91,6 +92,7 @@ def main() -> None: item_cache = ItemCache(config["spec"]) rtemsqual.glossary.generate(config["glossary"], item_cache) rtemsqual.applconfig.generate(config["appl-config"], item_cache) + rtemsqual.interface.generate(config["interface"], item_cache) rtemsqual.validation.generate(config["validation"], item_cache) _run_pre_qualified_only_build(config["build"], item_cache) _run_pre_qualified_doxygen(config["build"]) diff --git a/spec/groups/api.yml b/spec/groups/api.yml new file mode 100644 index 00000000..80e79fec --- /dev/null +++ b/spec/groups/api.yml @@ -0,0 +1,14 @@ +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: [] +group-brief: API +group-description: | + This group contains the RTEMS Application Programming Interface (API). +group-identifier: RTEMSAPI +group-name: API +interface-type: group +links: +- role: interface-placement + uid: /if/rtems/basedefs/header +type: interface diff --git a/spec/groups/api/basedefs.yml b/spec/groups/api/basedefs.yml new file mode 100644 index 00000000..9d9d516e --- /dev/null +++ b/spec/groups/api/basedefs.yml @@ -0,0 +1,17 @@ +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: [] +group-brief: API +group-description: | + This group contains basic macros to give access to compiler-specific + features. +group-identifier: RTEMSAPIBaseDefs +group-name: Base Definitions +interface-type: group +links: +- role: interface-placement + uid: /if/rtems/basedefs/header +- role: interface-ingroup + uid: /groups/api +type: interface diff --git a/spec/if/build-options/ada.yml b/spec/if/build-options/ada.yml new file mode 100644 index 00000000..6b0eabb9 --- /dev/null +++ b/spec/if/build-options/ada.yml @@ -0,0 +1,10 @@ +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-name: __RTEMS_ADA__ +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/build-options/cpuopts.yml b/spec/if/build-options/cpuopts.yml new file mode 100644 index 00000000..29f8c7a4 --- /dev/null +++ b/spec/if/build-options/cpuopts.yml @@ -0,0 +1,10 @@ +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: build-options +interface-type: header-file +links: [] +interface-path: rtems/score/cpuopts.h +interface-prefix: "" +type: interface diff --git a/spec/if/build-options/debug.yml b/spec/if/build-options/debug.yml new file mode 100644 index 00000000..b67ea76c --- /dev/null +++ b/spec/if/build-options/debug.yml @@ -0,0 +1,10 @@ +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-name: RTEMS_DEBUG +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/build-options/domain.yml b/spec/if/build-options/domain.yml new file mode 100644 index 00000000..372f75ce --- /dev/null +++ b/spec/if/build-options/domain.yml @@ -0,0 +1,8 @@ +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: build-options +interface-type: container +links: [] +type: interface diff --git a/spec/if/build-options/drvmgr.yml b/spec/if/build-options/drvmgr.yml new file mode 100644 index 00000000..63323f9a --- /dev/null +++ b/spec/if/build-options/drvmgr.yml @@ -0,0 +1,10 @@ +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-name: RTEMS_DRVMGR_STARTUP +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/build-options/multiprocessing.yml b/spec/if/build-options/multiprocessing.yml new file mode 100644 index 00000000..b8a76c82 --- /dev/null +++ b/spec/if/build-options/multiprocessing.yml @@ -0,0 +1,10 @@ +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-name: RTEMS_MULTIPROCESSING +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/build-options/networking.yml b/spec/if/build-options/networking.yml new file mode 100644 index 00000000..8c4c7560 --- /dev/null +++ b/spec/if/build-options/networking.yml @@ -0,0 +1,10 @@ +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-name: RTEMS_NETWORKING +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/build-options/paravirt.yml b/spec/if/build-options/paravirt.yml new file mode 100644 index 00000000..0091d5d5 --- /dev/null +++ b/spec/if/build-options/paravirt.yml @@ -0,0 +1,10 @@ +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-name: RTEMS_PARAVIRT +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/build-options/posix.yml b/spec/if/build-options/posix.yml new file mode 100644 index 00000000..aaa144a7 --- /dev/null +++ b/spec/if/build-options/posix.yml @@ -0,0 +1,10 @@ +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-name: RTEMS_POSIX_API +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/build-options/profiling.yml b/spec/if/build-options/profiling.yml new file mode 100644 index 00000000..20818b55 --- /dev/null +++ b/spec/if/build-options/profiling.yml @@ -0,0 +1,10 @@ +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-name: RTEMS_PROFILING +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/build-options/smp.yml b/spec/if/build-options/smp.yml new file mode 100644 index 00000000..846d86df --- /dev/null +++ b/spec/if/build-options/smp.yml @@ -0,0 +1,10 @@ +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-name: RTEMS_SMP +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/c/false.yml b/spec/if/c/false.yml new file mode 100644 index 00000000..529e73be --- /dev/null +++ b/spec/if/c/false.yml @@ -0,0 +1,11 @@ +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: c +interface-name: "false" +interface-type: define +links: +- role: interface-placement + uid: stdbool +type: interface diff --git a/spec/if/c/int16_t.yml b/spec/if/c/int16_t.yml new file mode 100644 index 00000000..4571b9b6 --- /dev/null +++ b/spec/if/c/int16_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: int16_t +interface-type: typedef +links: +- role: interface-placement + uid: stdint +type: interface diff --git a/spec/if/c/int32_t.yml b/spec/if/c/int32_t.yml new file mode 100644 index 00000000..dab18090 --- /dev/null +++ b/spec/if/c/int32_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: int32_t +interface-type: typedef +links: +- role: interface-placement + uid: stdint +type: interface diff --git a/spec/if/c/int64_t.yml b/spec/if/c/int64_t.yml new file mode 100644 index 00000000..7e7a3dc4 --- /dev/null +++ b/spec/if/c/int64_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: int64_t +interface-type: typedef +links: +- role: interface-placement + uid: stdint +type: interface diff --git a/spec/if/c/int8_t.yml b/spec/if/c/int8_t.yml new file mode 100644 index 00000000..e719da9f --- /dev/null +++ b/spec/if/c/int8_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: int8_t +interface-type: typedef +links: +- role: interface-placement + uid: stdint +type: interface diff --git a/spec/if/c/intmax_t.yml b/spec/if/c/intmax_t.yml new file mode 100644 index 00000000..8c00a6b6 --- /dev/null +++ b/spec/if/c/intmax_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: intmax_t +interface-type: typedef +links: +- role: interface-placement + uid: stdint +type: interface diff --git a/spec/if/c/intptr_t.yml b/spec/if/c/intptr_t.yml new file mode 100644 index 00000000..778016bd --- /dev/null +++ b/spec/if/c/intptr_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: intptr_t +interface-type: typedef +links: +- role: interface-placement + uid: stdint +type: interface diff --git a/spec/if/c/null.yml b/spec/if/c/null.yml new file mode 100644 index 00000000..1e7e9f2a --- /dev/null +++ b/spec/if/c/null.yml @@ -0,0 +1,11 @@ +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: c +interface-name: "NULL" +interface-type: define +links: +- role: interface-placement + uid: stddef +type: interface diff --git a/spec/if/c/offsetof.yml b/spec/if/c/offsetof.yml new file mode 100644 index 00000000..5453c65a --- /dev/null +++ b/spec/if/c/offsetof.yml @@ -0,0 +1,10 @@ +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-name: offsetof +interface-type: macro +links: +- role: interface-placement + uid: stddef +type: interface diff --git a/spec/if/c/size_t.yml b/spec/if/c/size_t.yml new file mode 100644 index 00000000..5ed1227c --- /dev/null +++ b/spec/if/c/size_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: size_t +interface-type: typedef +links: +- role: interface-placement + uid: stddef +type: interface diff --git a/spec/if/c/stdatomic.yml b/spec/if/c/stdatomic.yml new file mode 100644 index 00000000..a9c33d38 --- /dev/null +++ b/spec/if/c/stdatomic.yml @@ -0,0 +1,10 @@ +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: c +interface-type: header-file +links: [] +interface-path: stdatomic.h +interface-prefix: "" +type: interface diff --git a/spec/if/c/stdbool.yml b/spec/if/c/stdbool.yml new file mode 100644 index 00000000..0374c57f --- /dev/null +++ b/spec/if/c/stdbool.yml @@ -0,0 +1,10 @@ +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: c +interface-type: header-file +links: [] +interface-path: stdbool.h +interface-prefix: "" +type: interface diff --git a/spec/if/c/stddef.yml b/spec/if/c/stddef.yml new file mode 100644 index 00000000..ea8bf5bf --- /dev/null +++ b/spec/if/c/stddef.yml @@ -0,0 +1,10 @@ +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: c +interface-type: header-file +links: [] +interface-path: stddef.h +interface-prefix: "" +type: interface diff --git a/spec/if/c/stdint.yml b/spec/if/c/stdint.yml new file mode 100644 index 00000000..309c5488 --- /dev/null +++ b/spec/if/c/stdint.yml @@ -0,0 +1,10 @@ +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: c +interface-type: header-file +links: [] +interface-path: stdint.h +interface-prefix: "" +type: interface diff --git a/spec/if/c/string.yml b/spec/if/c/string.yml new file mode 100644 index 00000000..60c82788 --- /dev/null +++ b/spec/if/c/string.yml @@ -0,0 +1,10 @@ +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: c +interface-type: header-file +links: [] +interface-path: string.h +interface-prefix: "" +type: interface diff --git a/spec/if/c/sys-types.yml b/spec/if/c/sys-types.yml new file mode 100644 index 00000000..5044ff40 --- /dev/null +++ b/spec/if/c/sys-types.yml @@ -0,0 +1,10 @@ +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: c +interface-type: header-file +links: [] +interface-path: sys/types.h +interface-prefix: "" +type: interface diff --git a/spec/if/c/time.yml b/spec/if/c/time.yml new file mode 100644 index 00000000..86e0a5c3 --- /dev/null +++ b/spec/if/c/time.yml @@ -0,0 +1,10 @@ +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: c +interface-type: header-file +links: [] +interface-path: time.h +interface-prefix: "" +type: interface diff --git a/spec/if/c/time_t.yml b/spec/if/c/time_t.yml new file mode 100644 index 00000000..c1217556 --- /dev/null +++ b/spec/if/c/time_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: time_t +interface-type: typedef +links: +- role: interface-placement + uid: time +type: interface diff --git a/spec/if/c/true.yml b/spec/if/c/true.yml new file mode 100644 index 00000000..1a2593d4 --- /dev/null +++ b/spec/if/c/true.yml @@ -0,0 +1,11 @@ +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: c +interface-name: "true" +interface-type: define +links: +- role: interface-placement + uid: stdbool +type: interface diff --git a/spec/if/c/uint16_t.yml b/spec/if/c/uint16_t.yml new file mode 100644 index 00000000..e0aa4787 --- /dev/null +++ b/spec/if/c/uint16_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: uint16_t +interface-type: typedef +links: +- role: interface-placement + uid: stdint +type: interface diff --git a/spec/if/c/uint32_t.yml b/spec/if/c/uint32_t.yml new file mode 100644 index 00000000..1ecbf33f --- /dev/null +++ b/spec/if/c/uint32_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: uint32_t +interface-type: typedef +links: +- role: interface-placement + uid: stdint +type: interface diff --git a/spec/if/c/uint64_t.yml b/spec/if/c/uint64_t.yml new file mode 100644 index 00000000..a9cb2381 --- /dev/null +++ b/spec/if/c/uint64_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: uint64_t +interface-type: typedef +links: +- role: interface-placement + uid: stdint +type: interface diff --git a/spec/if/c/uint8_t.yml b/spec/if/c/uint8_t.yml new file mode 100644 index 00000000..3865dfd0 --- /dev/null +++ b/spec/if/c/uint8_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: uint8_t +interface-type: typedef +links: +- role: interface-placement + uid: stdint +type: interface diff --git a/spec/if/c/uintmax_t.yml b/spec/if/c/uintmax_t.yml new file mode 100644 index 00000000..11e8a0b4 --- /dev/null +++ b/spec/if/c/uintmax_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: uintmax_t +interface-type: typedef +links: +- role: interface-placement + uid: stdint +type: interface diff --git a/spec/if/c/uintptr_t.yml b/spec/if/c/uintptr_t.yml new file mode 100644 index 00000000..c8c3dbda --- /dev/null +++ b/spec/if/c/uintptr_t.yml @@ -0,0 +1,11 @@ +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: c +interface-name: uintptr_t +interface-type: typedef +links: +- role: interface-placement + uid: stdint +type: interface diff --git a/spec/if/compiler/builtin-choose-expr.yml b/spec/if/compiler/builtin-choose-expr.yml new file mode 100644 index 00000000..2d3fdd79 --- /dev/null +++ b/spec/if/compiler/builtin-choose-expr.yml @@ -0,0 +1,10 @@ +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-name: __builtin_choose_expr +interface-type: macro +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/compiler/builtin-expect.yml b/spec/if/compiler/builtin-expect.yml new file mode 100644 index 00000000..afd8c90a --- /dev/null +++ b/spec/if/compiler/builtin-expect.yml @@ -0,0 +1,10 @@ +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-name: __builtin_expect +interface-type: function +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/compiler/builtin-return-address.yml b/spec/if/compiler/builtin-return-address.yml new file mode 100644 index 00000000..84a05815 --- /dev/null +++ b/spec/if/compiler/builtin-return-address.yml @@ -0,0 +1,10 @@ +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-name: __builtin_return_address +interface-type: function +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/compiler/builtin-types-compatible-p.yml b/spec/if/compiler/builtin-types-compatible-p.yml new file mode 100644 index 00000000..329b0cbc --- /dev/null +++ b/spec/if/compiler/builtin-types-compatible-p.yml @@ -0,0 +1,10 @@ +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-name: __builtin_types_compatible_p +interface-type: macro +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/compiler/builtin-unreachable.yml b/spec/if/compiler/builtin-unreachable.yml new file mode 100644 index 00000000..caa5740b --- /dev/null +++ b/spec/if/compiler/builtin-unreachable.yml @@ -0,0 +1,10 @@ +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-name: __builtin_unreachable +interface-type: function +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/compiler/cplusplus.yml b/spec/if/compiler/cplusplus.yml new file mode 100644 index 00000000..150ba9bf --- /dev/null +++ b/spec/if/compiler/cplusplus.yml @@ -0,0 +1,10 @@ +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-name: __cplusplus +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/compiler/domain.yml b/spec/if/compiler/domain.yml new file mode 100644 index 00000000..7c99e5a6 --- /dev/null +++ b/spec/if/compiler/domain.yml @@ -0,0 +1,8 @@ +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: compiler +interface-type: container +links: [] +type: interface diff --git a/spec/if/compiler/gnuc.yml b/spec/if/compiler/gnuc.yml new file mode 100644 index 00000000..4421797e --- /dev/null +++ b/spec/if/compiler/gnuc.yml @@ -0,0 +1,10 @@ +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-name: __GNUC__ +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/compiler/stdc-version.yml b/spec/if/compiler/stdc-version.yml new file mode 100644 index 00000000..5a89f3ca --- /dev/null +++ b/spec/if/compiler/stdc-version.yml @@ -0,0 +1,10 @@ +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-name: __STDC_VERSION__ +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/compiler/typeof.yml b/spec/if/compiler/typeof.yml new file mode 100644 index 00000000..022953a4 --- /dev/null +++ b/spec/if/compiler/typeof.yml @@ -0,0 +1,10 @@ +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-name: __typeof__ +interface-type: macro +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/compiler/user-label-prefix.yml b/spec/if/compiler/user-label-prefix.yml new file mode 100644 index 00000000..a40d2634 --- /dev/null +++ b/spec/if/compiler/user-label-prefix.yml @@ -0,0 +1,10 @@ +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-name: __USER_LABEL_PREFIX__ +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/impl/assert-unreachable.yml b/spec/if/impl/assert-unreachable.yml new file mode 100644 index 00000000..f49e7fa4 --- /dev/null +++ b/spec/if/impl/assert-unreachable.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: | + Asserts that this program point is unreachable. +interface-definition: + default: | + do { } while ( 0 ) + variants: + - definition: | + _Assert( 0 ) + enabled-by: + - defined(${/if/build-options/debug:/interface-name}) +interface-description: null +interface-name: _Assert_Unreachable +interface-params: [] +interface-return: + return: null + return-values: [] +interface-type: macro +links: +- role: interface-placement + uid: /if/rtems/basedefs/header +type: interface diff --git a/spec/if/impl/dequalify-types-not-compatible.yml b/spec/if/impl/dequalify-types-not-compatible.yml new file mode 100644 index 00000000..c7fe4164 --- /dev/null +++ b/spec/if/impl/dequalify-types-not-compatible.yml @@ -0,0 +1,30 @@ +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: + not: ASM +interface-brief: | + A not implemented function to trigger compile time errors with an error + message. +interface-definition: + default: + params: [] + return: void * + variants: + - definition: + params: [] + return: __attribute__((__error__("RTEMS_DEQUALIFY() types differ not only by volatile and const"))) void * + enabled-by: + - defined(${/if/compiler/gnuc:/interface-name}) +interface-description: null +interface-name: RTEMS_DEQUALIFY_types_not_compatible +interface-params: [] +interface-return: + return: null + return-values: [] +interface-type: function +links: +- role: interface-placement + uid: /if/rtems/basedefs/header +type: interface 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 diff --git a/spec/if/use/asm.yml b/spec/if/use/asm.yml new file mode 100644 index 00000000..a71176d8 --- /dev/null +++ b/spec/if/use/asm.yml @@ -0,0 +1,10 @@ +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-name: ASM +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/use/domain.yml b/spec/if/use/domain.yml new file mode 100644 index 00000000..7f302e57 --- /dev/null +++ b/spec/if/use/domain.yml @@ -0,0 +1,8 @@ +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: use +interface-type: container +links: [] +type: interface diff --git a/spec/if/use/false.yml b/spec/if/use/false.yml new file mode 100644 index 00000000..2dbf04ec --- /dev/null +++ b/spec/if/use/false.yml @@ -0,0 +1,10 @@ +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-name: "FALSE" +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface diff --git a/spec/if/use/true.yml b/spec/if/use/true.yml new file mode 100644 index 00000000..a62f213d --- /dev/null +++ b/spec/if/use/true.yml @@ -0,0 +1,10 @@ +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-name: "TRUE" +interface-type: define +links: +- role: interface-placement + uid: domain +type: interface |