Skip to content

Commit

Permalink
Merge pull request #1407 from skliper:fix1281-set_rtems_task_name
Browse files Browse the repository at this point in the history
Fix #1281, Set RTEMS task name for cpuuse
  • Loading branch information
dzbaker committed Sep 13, 2023
2 parents dc548b7 + aadcb72 commit 1401352
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/os/rtems/src/os-impl-tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
INCLUDE FILES
***************************************************************************************/

#define _GNU_SOURCE
#include <pthread.h>

#include "os-rtems.h"
#include "os-impl-tasks.h"

Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 1401352

Please sign in to comment.