Fix ThisThread::get_name definition

pull/13030/head
Kevin Bracey 2020-05-29 11:46:58 +03:00
parent b53dc6695b
commit 922b656d39
2 changed files with 2 additions and 3 deletions

View File

@ -500,9 +500,8 @@ void test_thread_name()
const char tname[] = "Amazing thread";
Thread t(osPriorityNormal, THREAD_STACK_SIZE, NULL, tname);
t.start(callback(thread_wait_flags));
TEST_ASSERT_EQUAL(strcmp(tname, t.get_name()), 0);
t.flags_set(0x1);
t.start([&] { TEST_ASSERT_EQUAL(strcmp(tname, ThisThread::get_name()), 0); });
t.join();
}

View File

@ -272,7 +272,7 @@ osThreadId_t ThisThread::get_id()
#endif
}
const char *get_name()
const char *ThisThread::get_name()
{
#if MBED_CONF_RTOS_PRESENT
osThreadId_t id = osThreadGetId();