From e3916b5a68eb569ba30eec9fb61264d93d45f03b Mon Sep 17 00:00:00 2001 From: Tobias Langer Date: Thu, 18 Aug 2016 16:05:37 +0200 Subject: [PATCH] Added configuration option for hard realtime The cmake configuration option HARD_REALTIME was added. This sets or unsets the compile time variable EMBB_HARD_REALTIME. --- CMakeLists.txt | 5 +++++ base_c/include/embb/base/c/internal/cmake_config.h.in | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a6458fb..5319e86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,6 +86,7 @@ option(WARNINGS_ARE_ERRORS "Specify whether warnings should be treated as errors option(USE_AUTOMATIC_INITIALIZATION "Specify whether the MTAPI C++ interface, algorithms and dataflow should automatically intialize the MTAPI node if no explicit initialization is present" ON) option(BUILD_OPENCL_PLUGIN "Specify whether the MTAPI OpenCL plugin should be built" OFF) option(THREADING_ANALYSIS_MODE "Replaces lock-free synchronization constructs by mutex-based implementations to support threading analysis tools" OFF) +option(HARD_REALTIME "Specify whether hard real-time scheduling should be activated" ON) ## LOCAL INSTALLATION OF SUBPROJECT BINARIES # @@ -158,6 +159,10 @@ if(CUDA_FOUND) list(APPEND EXPECTED_EMBB_TEST_EXECUTABLES "embb_mtapi_cuda_c_test") endif() +# Adding hard real-time support with slightly different scheduling +if(HARD_REALTIME STREQUAL ON) + set(EMBB_HARD_REALTIME 1) +endif() ## Copy test execution script to local binaries folder diff --git a/base_c/include/embb/base/c/internal/cmake_config.h.in b/base_c/include/embb/base/c/internal/cmake_config.h.in index 876ceed..2596d5f 100644 --- a/base_c/include/embb/base/c/internal/cmake_config.h.in +++ b/base_c/include/embb/base/c/internal/cmake_config.h.in @@ -59,6 +59,13 @@ #cmakedefine EMBB_THREADING_ANALYSIS_MODE /** + * If defined, instead of the MTAPI round-robin work-stealing scheduling with + * local queues per priority, global edf is used for scheduling in order to + * guarantee hard real-time bounds. + */ +#cmakedefine EMBB_HARD_REALTIME + +/** * Version defines. */ #define EMBB_BASE_VERSION_MAJOR ${EMBB_BASE_VERSION_MAJOR} -- libgit2 0.26.0