mirror of https://github.com/ARMmbed/mbed-os.git
Fix ThisThread::get_name definition
parent
b53dc6695b
commit
922b656d39
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue