From dfe698a9460ef43fffe06c45c681829b9b82f037 Mon Sep 17 00:00:00 2001 From: Ben Deane Date: Thu, 2 Jan 2025 08:28:26 -0700 Subject: [PATCH 1/3] :arrow_up: Update `stdx` to include FLATTEN --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a13e9fd0..9123b152 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ include(cmake/string_catalog.cmake) add_versioned_package("gh:boostorg/mp11#boost-1.83.0") fmt_recipe(10.2.1) add_versioned_package("gh:intel/cpp-baremetal-concurrency#7c5b26c") -add_versioned_package("gh:intel/cpp-std-extensions#2512bcf") +add_versioned_package("gh:intel/cpp-std-extensions#4d57b2e") add_versioned_package("gh:intel/cpp-baremetal-senders-and-receivers#73d95bc") add_library(cib_sc INTERFACE) From ada3ff61405f85ad2615b401dc4abcd59525f9e8 Mon Sep 17 00:00:00 2001 From: Ben Deane Date: Thu, 2 Jan 2025 08:28:43 -0700 Subject: [PATCH 2/3] :zap: Inline injected log functions --- include/log/log.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/log/log.hpp b/include/log/log.hpp index 4c736e03..ee8bdf0d 100644 --- a/include/log/log.hpp +++ b/include/log/log.hpp @@ -4,6 +4,7 @@ #include #include +#include #include #include @@ -35,7 +36,7 @@ template inline auto config = null::config{}; struct default_flavor_t; template -constexpr static auto get_config() -> auto & { +ALWAYS_INLINE constexpr static auto get_config() -> auto & { if constexpr (std::same_as) { return config; } else { @@ -45,7 +46,7 @@ constexpr static auto get_config() -> auto & { template -static auto log(TArgs &&...args) -> void { +ALWAYS_INLINE static auto log(TArgs &&...args) -> void { auto &cfg = get_config(); cfg.logger.template log(std::forward(args)...); } @@ -103,7 +104,8 @@ using cib_log_module_id_t = typename logging::module_id_t<"default">::type; ((expr) ? void(0) : CIB_FATAL("Assertion failure: " #expr)) namespace logging { -template static auto log_version() -> void { +template +ALWAYS_INLINE static auto log_version() -> void { auto &l_cfg = get_config(); auto &v_cfg = ::version::config; if constexpr (requires { From 84969f06cf08632313774c3feddb5304d9180f5d Mon Sep 17 00:00:00 2001 From: Ben Deane Date: Thu, 2 Jan 2025 08:30:34 -0700 Subject: [PATCH 3/3] :zap: Inline injected interrupt HAL functions --- include/interrupt/hal.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/interrupt/hal.hpp b/include/interrupt/hal.hpp index 78d85582..e26f3d74 100644 --- a/include/interrupt/hal.hpp +++ b/include/interrupt/hal.hpp @@ -3,6 +3,7 @@ #include #include +#include #include #include @@ -44,19 +45,20 @@ template inline auto injected_hal = null_hal{}; struct hal { template requires(sizeof...(Ts) == 0) - static auto init() -> void { + ALWAYS_INLINE static auto init() -> void { injected_hal.init(); } template requires(sizeof...(Ts) == 0) - static auto irq_init() -> void { + ALWAYS_INLINE static auto irq_init() -> void { injected_hal.template irq_init(); } template requires(sizeof...(Ts) == 0) - static auto run(irq_num_t irq, stdx::invocable auto const &isr) -> void { + ALWAYS_INLINE static auto run(irq_num_t irq, + stdx::invocable auto const &isr) -> void { injected_hal.template run

(irq, isr); } };