Skip to content

Commit

Permalink
Fix nasa#1482, rtems Timebase, and Console now have proper names.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Price committed Nov 8, 2024
1 parent a201177 commit 41f9058
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/os/rtems/src/os-impl-console.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ static void OS_ConsoleTask_Entry(rtems_task_argument arg)
OS_object_token_t token;
OS_impl_console_internal_record_t *local;

pthread_setname_np(pthread_self(), "OS_CONSOLE");

if (OS_ObjectIdGetById(OS_LOCK_MODE_REFCOUNT, OS_OBJECT_TYPE_OS_CONSOLE, OS_ObjectIdFromInteger(arg), &token) ==
OS_SUCCESS)
{
Expand Down Expand Up @@ -172,8 +174,6 @@ 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 */
Expand Down
1 change: 1 addition & 0 deletions src/os/rtems/src/os-impl-timebase.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ void OS_UsecsToTicks(uint32 usecs, rtems_interval *ticks)
static void OS_TimeBase_CallbackThreadEntry(rtems_task_argument arg)
{
osal_id_t id;
pthread_setname_np(pthread_self(), "timebase");
id = OS_ObjectIdFromInteger(arg);
OS_TimeBase_CallbackThread(id);
}
Expand Down

0 comments on commit 41f9058

Please sign in to comment.