From 922b656d398c1074a1072c587970b6105d569295 Mon Sep 17 00:00:00 2001 From: Kevin Bracey Date: Fri, 29 May 2020 11:46:58 +0300 Subject: [PATCH] Fix ThisThread::get_name definition --- TESTS/mbedmicro-rtos-mbed/threads/main.cpp | 3 +-- rtos/source/ThisThread.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/TESTS/mbedmicro-rtos-mbed/threads/main.cpp b/TESTS/mbedmicro-rtos-mbed/threads/main.cpp index a96bf04f43..6cd9f3b1ee 100644 --- a/TESTS/mbedmicro-rtos-mbed/threads/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/threads/main.cpp @@ -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(); } diff --git a/rtos/source/ThisThread.cpp b/rtos/source/ThisThread.cpp index 921b10a881..e314a48c39 100644 --- a/rtos/source/ThisThread.cpp +++ b/rtos/source/ThisThread.cpp @@ -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();