From 8644b833a3722e84bf7a3d19418c0013f253d7e8 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sun, 20 Feb 2022 18:46:15 +0000 Subject: [PATCH 1/4] Fixed send_message signatures --- include/etl/generators/message_router_generator.h | 4 ++-- include/etl/message_bus.h | 10 +++++----- include/etl/message_router.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/etl/generators/message_router_generator.h b/include/etl/generators/message_router_generator.h index f46b1b22..c5068f57 100644 --- a/include/etl/generators/message_router_generator.h +++ b/include/etl/generators/message_router_generator.h @@ -325,8 +325,8 @@ namespace etl //*************************************************************************** /// Send a message to a router. //*************************************************************************** - static void send_message(etl::imessage_router& destination, - const etl::imessage& message) + static inline void send_message(etl::imessage_router& destination, + const etl::imessage& message) { destination.receive(message); } diff --git a/include/etl/message_bus.h b/include/etl/message_bus.h index 5e1bf4c3..3c852f31 100644 --- a/include/etl/message_bus.h +++ b/include/etl/message_bus.h @@ -415,8 +415,8 @@ namespace etl //*************************************************************************** /// Send a message to a bus. //*************************************************************************** - inline static void send_message(etl::imessage_bus& bus, - const etl::imessage& message) + static inline void send_message(etl::imessage_bus& bus, + const etl::imessage& message) { bus.receive(message); } @@ -424,9 +424,9 @@ namespace etl //*************************************************************************** /// Send a message to a bus. //*************************************************************************** - inline static void send_message(etl::imessage_bus& bus, - etl::message_router_id_t id, - const etl::imessage& message) + static inline void send_message(etl::imessage_bus& bus, + etl::message_router_id_t id, + const etl::imessage& message) { bus.receive(id, message); } diff --git a/include/etl/message_router.h b/include/etl/message_router.h index 8bfcbaa6..3cff2134 100644 --- a/include/etl/message_router.h +++ b/include/etl/message_router.h @@ -313,8 +313,8 @@ namespace etl //*************************************************************************** /// Send a message to a router. //*************************************************************************** - static void send_message(etl::imessage_router& destination, - const etl::imessage& message) + static inline void send_message(etl::imessage_router& destination, + const etl::imessage& message) { destination.receive(message); } From 60757a44ab903e88f540567927362e6981482377 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sun, 20 Feb 2022 18:49:43 +0000 Subject: [PATCH 2/4] callback and message timers now uses etl::timer_semaphore_t --- include/etl/callback_timer_atomic.h | 4 +- include/etl/message_timer_atomic.h | 4 +- test/etl_profile.h | 6 - test/vs2019/etl.vcxproj.filters | 288 ++++++++++++++-------------- 4 files changed, 148 insertions(+), 154 deletions(-) diff --git a/include/etl/callback_timer_atomic.h b/include/etl/callback_timer_atomic.h index 6e04a032..fdf0864a 100644 --- a/include/etl/callback_timer_atomic.h +++ b/include/etl/callback_timer_atomic.h @@ -163,7 +163,7 @@ namespace etl { if (enabled) { - if (process_semaphore.load() == 0U) + if (process_semaphore == 0U) { // We have something to do? bool has_active = !active_list.empty(); @@ -567,7 +567,7 @@ namespace etl timer_list active_list; volatile bool enabled; - volatile etl::atomic_uint_least16_t process_semaphore; + volatile etl::timer_semaphore_t process_semaphore; volatile uint_least8_t number_of_registered_timers; public: diff --git a/include/etl/message_timer_atomic.h b/include/etl/message_timer_atomic.h index 789002d5..19d0479e 100644 --- a/include/etl/message_timer_atomic.h +++ b/include/etl/message_timer_atomic.h @@ -165,7 +165,7 @@ namespace etl { if (enabled) { - if (process_semaphore.load() == 0U) + if (process_semaphore == 0U) { // We have something to do? bool has_active = !active_list.empty(); @@ -580,7 +580,7 @@ namespace etl timer_list active_list; volatile bool enabled; - volatile etl::atomic_uint_least16_t process_semaphore; + volatile etl::timer_semaphore_t process_semaphore; volatile uint_least8_t registered_timers; public: diff --git a/test/etl_profile.h b/test/etl_profile.h index cd287699..3a7b3216 100644 --- a/test/etl_profile.h +++ b/test/etl_profile.h @@ -109,12 +109,6 @@ SOFTWARE. #define ETL_VARIANT_FORCE_CPP11 #endif -//#define ETL_VARIANT_CPP11_MAX_16_TYPES - -#if defined(ETL_NO_STL) - #define ETL_TIMER_SEMAPHORE_TYPE uint32_t -#endif - #include "../include/etl/profiles/determine_compiler_language_support.h" #if ETL_CPP17_NOT_SUPPORTED diff --git a/test/vs2019/etl.vcxproj.filters b/test/vs2019/etl.vcxproj.filters index 495513aa..932fd108 100644 --- a/test/vs2019/etl.vcxproj.filters +++ b/test/vs2019/etl.vcxproj.filters @@ -1868,81 +1868,6 @@ Tests\Sanity Checks - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - - - Source Files\Sanity Checks - Tests\Sanity Checks @@ -2909,21 +2834,6 @@ Tests\Sanity Checks - - Tests\Sanity Checks - - - Tests\Sanity Checks - - - Tests\Sanity Checks - - - Tests\Sanity Checks - - - Tests\Sanity Checks - Tests\Sanity Checks @@ -2936,30 +2846,18 @@ Tests\Sanity Checks - - Tests\Sanity Checks - Tests\Sanity Checks - - Tests\Sanity Checks - Tests\Sanity Checks Tests\Sanity Checks - - Tests\Sanity Checks - Tests\Sanity Checks - - Tests\Sanity Checks - Tests\Sanity Checks @@ -2978,18 +2876,12 @@ Tests\Sanity Checks - - Tests\Sanity Checks - Tests\Sanity Checks Tests\Sanity Checks - - Tests\Sanity Checks - Tests\Sanity Checks @@ -3005,54 +2897,18 @@ Tests\Sanity Checks - - Tests\Sanity Checks - Tests\Sanity Checks Tests\Sanity Checks - - Tests\Sanity Checks - Tests\Sanity Checks Tests\Sanity Checks - - Tests\Sanity Checks - - - Tests\Sanity Checks - - - Tests\Sanity Checks - - - Tests\Sanity Checks - - - Tests\Sanity Checks - - - Tests\Sanity Checks - - - Tests\Sanity Checks - - - Tests\Sanity Checks - - - Tests\Sanity Checks - - - Tests\Sanity Checks - Tests @@ -3203,6 +3059,150 @@ Tests\Sanity Checks + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + + + Tests\Sanity Checks + From 679304b9f5ed51405a591fc3da3e016bf956312b Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sun, 20 Feb 2022 18:57:06 +0000 Subject: [PATCH 3/4] Adjusted initializer_list include logic --- include/etl/initializer_list.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/etl/initializer_list.h b/include/etl/initializer_list.h index 3a5c75e6..96092ec3 100644 --- a/include/etl/initializer_list.h +++ b/include/etl/initializer_list.h @@ -37,7 +37,9 @@ SOFTWARE. #include -#if (ETL_USING_STL && ETL_NOT_USING_STLPORT) || !defined(ETL_IN_UNIT_TEST_INITIALIZER_LIST) + + +#if ((ETL_USING_STL && ETL_NOT_USING_STLPORT) || defined(ETL_IN_UNIT_TEST)) && !defined(ETL_IN_UNIT_TEST_INITIALIZER_LIST) #define ETL_USING_INITIALIZER_LIST 1 #include From 90b20e626bb21c8794de9c5fc24e27b7d77ff55f Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sun, 20 Feb 2022 19:14:25 +0000 Subject: [PATCH 4/4] Updated versions --- include/etl/version.h | 2 +- library.json | 2 +- library.properties | 2 +- meson.build | 2 +- support/Release notes.txt | 5 +++++ 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/etl/version.h b/include/etl/version.h index 773e4a79..32649efb 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -39,7 +39,7 @@ SOFTWARE. #define ETL_VERSION_MAJOR 20 #define ETL_VERSION_MINOR 24 -#define ETL_VERSION_PATCH 0 +#define ETL_VERSION_PATCH 1 #define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) "." ETL_STRINGIFY(ETL_VERSION_MINOR) "." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_W ETL_STRINGIFY(ETL_VERSION_MAJOR) L"." ETL_STRINGIFY(ETL_VERSION_MINOR) L"." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_U16 ETL_STRINGIFY(ETL_VERSION_MAJOR) u"." ETL_STRINGIFY(ETL_VERSION_MINOR) u"." ETL_STRINGIFY(ETL_VERSION_PATCH) diff --git a/library.json b/library.json index 7c8109b9..21e9c397 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Embedded Template Library", - "version": "20.24.0", + "version": "20.24.1", "authors": { "name": "John Wellbelove", "email": "john.wellbelove@etlcpp.com" diff --git a/library.properties b/library.properties index ba76c0fc..b1d0b456 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Embedded Template Library -version=20.24.0 +version=20.24.1 author= John Wellbelove maintainer=John Wellbelove license=MIT diff --git a/meson.build b/meson.build index 153c61a2..e15c20ca 100644 --- a/meson.build +++ b/meson.build @@ -8,7 +8,7 @@ project('etl', 'cpp_std=c++17', 'build.cpp_std=c++17', ], meson_version: '>=0.54.0', - version: '20.24.0' + version: '20.24.1' ) compile_args = [] diff --git a/support/Release notes.txt b/support/Release notes.txt index 89ed222d..dd567a9f 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,8 @@ +=============================================================================== +20.24.1 +callback and message timers now use etl::timer_semaphore_t instead of et::atomic_uint_least16_t +Fixed send_message function signatures. + =============================================================================== 20.24.0 #503 Algorithm transform uses expensive post increment operator - Fixed for all occurences of iterator increment.