Skip to content

Commit

Permalink
Fix #1281, Set RTEMS task name for cpuuse
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Aug 25, 2023
1 parent 99e3b40 commit aadcb72
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 aadcb72

Please sign in to comment.