1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00
RIOT/makefiles
Marian Buschsieweke 276ad5716a
sys/net/gnrc/netif: allow checking if a netdev is legacy or new API
A if `netdev_driver_t::confirm_send()` is provided, it provides the
new netdev API. However, detecting the API at runtime and handling
both API styles comes at a cost. This can be optimized in case only
new or only old style netdevs are in use.

To do so, this adds the pseudo modules `netdev_legacy_api` and
`netdev_new_api`. As right now no netdev actually implements the new
API, all netdevs pull in `netdev_legacy_api`. If `netdev_legacy_api` is
in used but `netdev_new_api` is not, we can safely assume at compile
time that only legacy netdevs are in use. Similar, if only
`netdev_new_api` is used, only support for the new API is needed. Only
when both are in use, run time checks are needed.

This provides two helper function to check for a netif if the
corresponding netdev implements the old or the new API. (With one
being the inverse of the other.) They are suitable for constant folding
when only new or only legacy devices are in use. Consequently, dead
branches should be eliminated by the optimizer.
2022-08-17 12:56:07 +02:00
..
arch makefiles/cargo: Drop duplicate workaround remnants 2022-07-09 20:45:51 +02:00
boards sys/xtimer: prefer ztimer_xtimer_compat 2022-03-17 14:37:40 +01:00
boot Merge pull request #18138 from benpicco/makefiles/boot/riotboot-elffile 2022-06-02 16:10:09 +02:00
libc makefiles/libc/picolibc.mk: Fix typo 2022-05-30 12:38:19 +02:00
pkg makefiles/pkg/nimble.adv.mk: add utility to assign adv instance 2022-04-27 08:22:58 +02:00
tests .murdock: print hash input when hashes mismatch 2022-07-11 17:17:15 +02:00
toolchain build system: support wrong target triples with LLVM 2021-02-11 17:19:15 +01:00
tools makefile/tools/esptool: use dio instead of qout or qio flash mode 2022-08-01 15:08:41 +02:00
utils makefiles/utils/ansi: Refactor ansi codes into their own file. 2021-05-04 10:52:50 +02:00
app_dirs.inc.mk make: use $(MAKE) instead of direct make call 2020-07-03 12:03:06 +02:00
application.inc.mk core: split out library code 2022-03-09 21:43:05 +01:00
auto_init.inc.mk makefiles: add common makefile for auto_init modules 2020-06-08 10:27:35 +02:00
bindist.inc.mk makefiles/bindist: copy object files and use .bin to compare 2020-09-04 15:01:15 +02:00
blob.inc.mk makefiles/blob.inc.mk: introduce blob -> hdr utility makefile 2019-11-18 17:53:47 +01:00
boards.inc.mk make: add info-emulated-boards helper target 2021-10-12 10:39:57 +02:00
buildtests.inc.mk many typo fixes 2019-11-23 22:39:07 +01:00
cargo-settings.inc.mk Rust: Add crates-to-module adapter 2022-07-09 21:15:29 +02:00
cargo-targets.inc.mk shell/democommands: Add example Rust module 2022-07-10 21:27:12 +02:00
cflags.inc.mk make: add -ffunction-sections -fdata-sections to LINKFLAGS if LTO=1 2022-02-15 12:28:16 +01:00
clang_tidy.inc.mk makefiles/clang-tidy: initial support 2021-05-28 11:57:20 +02:00
color.inc.mk makefiles/color: Add color functions. 2021-05-04 10:57:47 +02:00
default-radio-settings.inc.mk drivers/cc110x : Add CONFIG_ 2020-04-17 23:27:01 +05:30
defaultmodules_deps.inc.mk buildsystem: split default modules include early and late 2022-06-02 12:56:59 +02:00
defaultmodules_no_recursive_deps.inc.mk buildsystem: split default modules include early and late 2022-06-02 12:56:59 +02:00
defaultmodules_regular.inc.mk buildsystem: split default modules include early and late 2022-06-02 12:56:59 +02:00
dependencies_debug.inc.mk makefiles/dependencies_debug.inc.mk: add TOOLCHAIN 2021-01-27 11:11:43 +01:00
dependency_resolution.inc.mk buildsystem: split default modules include early and late 2022-06-02 12:56:59 +02:00
deprecated_boards.inc.mk cpu/mips: deprecate mips cpu 2021-12-09 10:14:52 +01:00
deprecated_cpus.inc.mk cpu/mips: deprecate mips cpu 2021-12-09 10:14:52 +01:00
deprecated_modules.inc.mk ztimer: deprecate ztimer_now64 and ztimer_now_t 2022-05-04 15:57:57 +02:00
docker.inc.mk docker: don't export KCONFIG_ADD_CONFIG variable 2022-04-25 11:18:17 +02:00
driver_with_disp_dev.mk make: introduce makefile to optimize driver with disp/touch_dev build 2022-01-06 12:07:07 +01:00
driver_with_saul.mk make: introduce makefile to optimize driver with saul build 2022-01-06 12:07:06 +01:00
driver_with_touch_dev.mk make: introduce makefile to optimize driver with disp/touch_dev build 2022-01-06 12:07:07 +01:00
eclipse.inc.mk eclipse.inc.mk: Split eclipse support into it's own file. 2018-12-05 15:22:42 +01:00
features_check.inc.mk build_system: don't optionally use conflicting features 2021-02-22 12:06:27 +01:00
features_modules.inc.mk build system: no periph_init for periph_gpio_ll* 2022-05-24 11:50:52 +02:00
git_version.inc.mk makefiles/git_version.inc.mk: deferred GIT_VERSION definition 2019-07-22 12:00:45 +02:00
info-global.inc.mk buildsystem: split default modules include early and late 2022-06-02 12:56:59 +02:00
info-nproc.inc.mk
info.inc.mk build system: add info-kconfig-variables 2022-08-08 08:15:15 +02:00
kconfig.mk boards: Use BOARD.config pattern for kconfig 2022-02-14 13:10:09 +01:00
mcuboot.mk Merge pull request #11130 from cladmi/pr/make/flashfile/jlink 2019-03-14 12:01:02 +01:00
modules.inc.mk makefile: add a check for real modules 2020-09-04 15:01:16 +02:00
murdock.inc.mk makefiles/murdock.inc.mk: change policy to run tests by default 2019-08-21 12:49:26 +02:00
periph.mk Makefile: remove usage of SUBMODULES_NOFORCE 2020-04-15 12:11:44 +02:00
pseudomodules.inc.mk sys/net/gnrc/netif: allow checking if a netdev is legacy or new API 2022-08-17 12:56:07 +02:00
scan-build.inc.mk makefiles: avoid building archives when compiling 2020-09-04 15:01:10 +02:00
stdio.inc.mk sys/net/application_layer: add telnet server module 2022-03-01 23:07:22 +01:00
suit.base.inc.mk makefiles/suit: avoid unwanted key creation trigger 2022-07-20 12:35:33 +02:00
suit.inc.mk makefiles/suit: allow to overwrite SUIT_VENDOR_DOMAIN 2022-06-01 13:18:00 +02:00
tests.inc.mk make: run static_tests.sh directly with static-tests target 2020-12-17 15:16:36 +01:00
ubsan.inc.mk make: add initial ubsan support 2022-02-16 12:20:45 +01:00
usb-codes.inc.mk makefile: Fix usage error with busybox grep 2020-10-06 17:16:26 +00:00
vars.inc.mk Rust: Add crates-to-module adapter 2022-07-09 21:15:29 +02:00