Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1482, rtems Timebase, and Console now have proper names. #1483

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading