Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 5 additions & 3 deletions include/interrupt/hal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <interrupt/fwd.hpp>
#include <interrupt/policies.hpp>

#include <stdx/compiler.hpp>
#include <stdx/concepts.hpp>
#include <stdx/type_traits.hpp>

Expand Down Expand Up @@ -44,19 +45,20 @@ template <typename...> inline auto injected_hal = null_hal{};
struct hal {
template <typename... Ts>
requires(sizeof...(Ts) == 0)
static auto init() -> void {
ALWAYS_INLINE static auto init() -> void {
injected_hal<Ts...>.init();
}

template <bool Enable, irq_num_t IrqNumber, int Priority, typename... Ts>
requires(sizeof...(Ts) == 0)
static auto irq_init() -> void {
ALWAYS_INLINE static auto irq_init() -> void {
injected_hal<Ts...>.template irq_init<Enable, IrqNumber, Priority>();
}

template <status_policy P, typename... Ts>
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<Ts...>.template run<P>(irq, isr);
}
};
Expand Down
8 changes: 5 additions & 3 deletions include/log/log.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <sc/format.hpp>
#include <sc/fwd.hpp>

#include <stdx/compiler.hpp>
#include <stdx/ct_string.hpp>
#include <stdx/panic.hpp>

Expand Down Expand Up @@ -35,7 +36,7 @@ template <typename...> inline auto config = null::config{};
struct default_flavor_t;

template <typename Flavor, typename... Ts>
constexpr static auto get_config() -> auto & {
ALWAYS_INLINE constexpr static auto get_config() -> auto & {
if constexpr (std::same_as<Flavor, default_flavor_t>) {
return config<Ts...>;
} else {
Expand All @@ -45,7 +46,7 @@ constexpr static auto get_config() -> auto & {

template <typename Flavor, level L, typename ModuleId, typename... Ts,
typename... TArgs>
static auto log(TArgs &&...args) -> void {
ALWAYS_INLINE static auto log(TArgs &&...args) -> void {
auto &cfg = get_config<Flavor, Ts...>();
cfg.logger.template log<L, ModuleId>(std::forward<TArgs>(args)...);
}
Expand Down Expand Up @@ -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 <typename Flavor, typename... Ts> static auto log_version() -> void {
template <typename Flavor, typename... Ts>
ALWAYS_INLINE static auto log_version() -> void {
auto &l_cfg = get_config<Flavor, Ts...>();
auto &v_cfg = ::version::config<Ts...>;
if constexpr (requires {
Expand Down
Loading