diff --git a/executables/referenceApp/CMakeLists.txt b/executables/referenceApp/CMakeLists.txt index adb9d46667..f9f9426093 100644 --- a/executables/referenceApp/CMakeLists.txt +++ b/executables/referenceApp/CMakeLists.txt @@ -25,7 +25,7 @@ endif () message(STATUS "Target platform: <${BUILD_TARGET_PLATFORM}>") -if (BUILD_TARGET_PLATFORM STREQUAL "POSIX") +if (BUILD_TARGET_PLATFORM STREQUAL "POSIX" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(PLATFORM_SUPPORT_CAN ON CACHE BOOL "Turn CAN support on or off" FORCE) diff --git a/executables/referenceApp/application/src/systems/DoCanSystem.cpp b/executables/referenceApp/application/src/systems/DoCanSystem.cpp index ef88ea7b52..4f9020f33b 100644 --- a/executables/referenceApp/application/src/systems/DoCanSystem.cpp +++ b/executables/referenceApp/application/src/systems/DoCanSystem.cpp @@ -14,7 +14,6 @@ namespace { uint32_t const TIMEOUT_DOCAN_SYSTEM = 10U; size_t const TICK_DELTA_TICKS = 2U; // Tick delta -size_t const TICK_100MS = 100U; // 100us ticks uint16_t const ALLOCATE_TIMEOUT = 1000U; uint16_t const RX_TIMEOUT = 1000U; uint16_t const TX_CALLBACK_TIMEOUT = 1000U; diff --git a/executables/referenceApp/platforms/posix/main/src/main.cpp b/executables/referenceApp/platforms/posix/main/src/main.cpp index b2f30596a8..df57245994 100644 --- a/executables/referenceApp/platforms/posix/main/src/main.cpp +++ b/executables/referenceApp/platforms/posix/main/src/main.cpp @@ -12,8 +12,9 @@ #include "systems/CanSystem.h" #endif // PLATFORM_SUPPORT_CAN -void terminal_setup(void); -void terminal_cleanup(void); +extern void terminal_setup(void); +extern void terminal_cleanup(void); +extern void main_thread_setup(void); extern void app_main(); namespace platform @@ -51,6 +52,7 @@ void intHandler(int sig) int main() { signal(SIGINT, intHandler); + main_thread_setup(); terminal_setup(); app_main(); // entry point for the generic part return (1); // we never reach this point diff --git a/libs/bsw/asyncFreeRtos/freeRtosConfiguration/async/Hook.h b/libs/bsw/asyncFreeRtos/freeRtosConfiguration/async/Hook.h index e32ffe1494..81efec422b 100644 --- a/libs/bsw/asyncFreeRtos/freeRtosConfiguration/async/Hook.h +++ b/libs/bsw/asyncFreeRtos/freeRtosConfiguration/async/Hook.h @@ -6,13 +6,14 @@ #ifndef GUARD_4B5334A0_F8B0_47F4_A981_CF83833F946D #define GUARD_4B5334A0_F8B0_47F4_A981_CF83833F946D -#include - #ifdef __cplusplus extern "C" { #endif // __cplusplus +#include +#include + void asyncEnterTask(size_t taskIdx); void asyncLeaveTask(size_t taskIdx); void asyncEnterIsrGroup(size_t isrGroupIdx); diff --git a/libs/bsw/lifecycle/include/lifecycle/LifecycleManager.h b/libs/bsw/lifecycle/include/lifecycle/LifecycleManager.h index a45aa9ac88..e7823844b0 100644 --- a/libs/bsw/lifecycle/include/lifecycle/LifecycleManager.h +++ b/libs/bsw/lifecycle/include/lifecycle/LifecycleManager.h @@ -95,6 +95,7 @@ class LifecycleManager , _transition(transition) , _isPending(true) {} + virtual ~ComponentTransitionExecutor() = default; void execute() override; diff --git a/libs/bsw/uds/include/uds/connection/IncomingDiagConnection.h b/libs/bsw/uds/include/uds/connection/IncomingDiagConnection.h index d96ca70c87..b5ebdb051a 100644 --- a/libs/bsw/uds/include/uds/connection/IncomingDiagConnection.h +++ b/libs/bsw/uds/include/uds/connection/IncomingDiagConnection.h @@ -47,6 +47,7 @@ class IncomingDiagConnection : public transport::ITransportMessageProcessedListe UNCOPYABLE(IncomingDiagConnection); public: + virtual ~IncomingDiagConnection() = default; void setDiagSessionManager(IDiagSessionManager& diagSessionManager) { fpDiagSessionManager = &diagSessionManager; diff --git a/libs/bsw/uds/include/uds/connection/ManagedOutgoingDiagConnection.h b/libs/bsw/uds/include/uds/connection/ManagedOutgoingDiagConnection.h index c95c8e0098..714bd22760 100644 --- a/libs/bsw/uds/include/uds/connection/ManagedOutgoingDiagConnection.h +++ b/libs/bsw/uds/include/uds/connection/ManagedOutgoingDiagConnection.h @@ -78,7 +78,7 @@ class ManagedOutgoingDiagConnection void processResponseQueue(); - void terminate(); + void terminate() override; void responseProcessed() override; diff --git a/platforms/posix/bsp/bspInterruptsImpl/src/interrupts/suspendResumeAllInterrupts.cpp b/platforms/posix/bsp/bspInterruptsImpl/src/interrupts/suspendResumeAllInterrupts.cpp index 335d885103..3b1259a040 100644 --- a/platforms/posix/bsp/bspInterruptsImpl/src/interrupts/suspendResumeAllInterrupts.cpp +++ b/platforms/posix/bsp/bspInterruptsImpl/src/interrupts/suspendResumeAllInterrupts.cpp @@ -5,12 +5,18 @@ #include #include #include +#include -OldIntEnabledStatusValueType getOldIntEnabledStatusValueAndSuspendAllInterrupts(void) +static pthread_t MAIN_THREAD_ID; + +void main_thread_setup(void) { - static pid_t mainThreadTid = getpid(); + MAIN_THREAD_ID = pthread_self(); +} - if (gettid() == mainThreadTid) +OldIntEnabledStatusValueType getOldIntEnabledStatusValueAndSuspendAllInterrupts(void) +{ + if (pthread_self() == MAIN_THREAD_ID) { // We will reach this place in two cases: // 1. The main thread still haven't entered vTaskStartScheduler() - or already exited it.