mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Merge pull request #13030 from kjbracey-arm/thisthreadgetname
Fix ThisThread::get_name definitionpull/13077/head
						commit
						8ff3c95b2d
					
				| 
						 | 
				
			
			@ -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