From 6aa98dafa9b0addd7e48aa72c4a5908a391ab060 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Mon, 25 Sep 2023 16:38:10 +0000 Subject: [PATCH] Fix #1421, Add RTEMS console and timebase posix task names --- src/os/rtems/src/os-impl-console.c | 4 ++++ src/os/rtems/src/os-impl-timebase.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/os/rtems/src/os-impl-console.c b/src/os/rtems/src/os-impl-console.c index fdbfc0cb3..04b6bc49c 100644 --- a/src/os/rtems/src/os-impl-console.c +++ b/src/os/rtems/src/os-impl-console.c @@ -32,6 +32,8 @@ /**************************************************************************************** INCLUDE FILES ***************************************************************************************/ +#define _GNU_SOURCE +#include #include "os-rtems.h" #include "os-shared-printf.h" @@ -170,6 +172,8 @@ int32 OS_ConsoleCreate_Impl(const OS_object_token_t *token) } else { + pthread_setname_np(r_task_id, "OS_CONSOLE"); + /* will place the task in 'ready for scheduling' state */ status = rtems_task_start(r_task_id, /*rtems task id*/ OS_ConsoleTask_Entry, /* task entry point */ diff --git a/src/os/rtems/src/os-impl-timebase.c b/src/os/rtems/src/os-impl-timebase.c index 1134bac9b..2754bb8bd 100644 --- a/src/os/rtems/src/os-impl-timebase.c +++ b/src/os/rtems/src/os-impl-timebase.c @@ -26,6 +26,9 @@ /**************************************************************************************** INCLUDE FILES ***************************************************************************************/ +#define _GNU_SOURCE +#include + #include "os-rtems.h" #include "os-shared-common.h" @@ -388,6 +391,8 @@ int32 OS_TimeBaseCreate_Impl(const OS_object_token_t *token) } else { + pthread_setname_np(local->handler_task, "OS_TIMEBASE"); + /* will place the task in 'ready for scheduling' state */ rtems_sc = rtems_task_start(local->handler_task, /* rtems task id */ OS_TimeBase_CallbackThreadEntry, /* task entry point */