From aadcb727d472fbe682130e66c81a2bc60ae4db3a Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Thu, 3 Aug 2023 17:02:32 +0000 Subject: [PATCH] Fix #1281, Set RTEMS task name for cpuuse --- src/os/rtems/src/os-impl-tasks.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/os/rtems/src/os-impl-tasks.c b/src/os/rtems/src/os-impl-tasks.c index 64c9e8b7a..10e09943b 100644 --- a/src/os/rtems/src/os-impl-tasks.c +++ b/src/os/rtems/src/os-impl-tasks.c @@ -33,6 +33,9 @@ INCLUDE FILES ***************************************************************************************/ +#define _GNU_SOURCE +#include + #include "os-rtems.h" #include "os-impl-tasks.h" @@ -126,6 +129,8 @@ int32 OS_TaskCreate_Impl(const OS_object_token_t *token, uint32 flags) return OS_ERROR; } + pthread_setname_np(impl->id, task->task_name); + /* will place the task in 'ready for scheduling' state */ status = rtems_task_start(impl->id, /*rtems task id*/ (rtems_task_entry)OS_RtemsEntry, /* task entry point */