From f06d3bf9ad4997956b52f92a551fb0793f95f03c Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Mon, 19 Aug 2019 13:08:36 +0200 Subject: [PATCH] FreeRTOS: replace DDS_TRACE+abort by DDS_FATAL Signed-off-by: Erik Boasson --- src/ddsrt/src/sync/freertos/sync.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ddsrt/src/sync/freertos/sync.c b/src/ddsrt/src/sync/freertos/sync.c index c721fb9..f38b0c2 100644 --- a/src/ddsrt/src/sync/freertos/sync.c +++ b/src/ddsrt/src/sync/freertos/sync.c @@ -49,7 +49,6 @@ mutex_lock(ddsrt_mutex_t *mutex, int blk) assert(mutex != NULL); if (xSemaphoreTake(mutex->sem, (blk == 1 ? portMAX_DELAY : 0)) != pdPASS) { - DDS_TRACE("Failed to lock 0x%p", mutex); /* xSemaphoreTake will only return pdFAIL on timeout. The wait will be indefinite if INCLUDE_vTaskSuspend is set to 1 in FreeRTOSConfig.h and portMAX_DELAY was passed. */ @@ -63,7 +62,7 @@ mutex_lock(ddsrt_mutex_t *mutex, int blk) void ddsrt_mutex_lock(ddsrt_mutex_t *mutex) { if (!mutex_lock(mutex, 1)) { - abort(); + DDS_FATAL("Failed to lock 0x%p", mutex); } } @@ -77,8 +76,7 @@ void ddsrt_mutex_unlock(ddsrt_mutex_t *mutex) assert(mutex != NULL); if (xSemaphoreGive(mutex->sem) != pdPASS) { - DDS_TRACE("Failed to unlock 0x%p", mutex->sem); - abort(); + DDS_FATAL("Failed to unlock 0x%p", mutex->sem); } }