Skip to content

Commit

Permalink
Fix #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 380acd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 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
3 changes: 1 addition & 2 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(), "OS_TIMEBASE");
id = OS_ObjectIdFromInteger(arg);
OS_TimeBase_CallbackThread(id);
}
Expand Down Expand Up @@ -391,8 +392,6 @@ 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 */
Expand Down

0 comments on commit 380acd0

Please sign in to comment.