Skip to content

Commit 0c2d35f

Browse files
author
Cruz Monrreal
authored
Merge pull request #8612 from vidavidorra/master
Add names to system thread
2 parents 6042ea3 + 2ef82e1 commit 0c2d35f

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

events/mbed_shared_queues.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ namespace mbed {
3232
*/
3333
template
3434
<osPriority Priority, size_t QueueSize, size_t StackSize>
35-
EventQueue *do_shared_event_queue_with_thread()
35+
EventQueue *do_shared_event_queue_with_thread(const char *name)
3636
{
3737
static uint64_t queue_buffer[QueueSize / sizeof(uint64_t)];
3838
static EventQueue queue(sizeof queue_buffer, (unsigned char *) queue_buffer);
3939

4040
static uint64_t stack[StackSize / sizeof(uint64_t)];
41-
static Thread thread(Priority, StackSize, (unsigned char *) stack);
41+
static Thread thread(Priority, StackSize, (unsigned char *) stack, name);
4242

4343
Thread::State state = thread.get_state();
4444
if (state == Thread::Inactive || state == Thread::Deleted) {
@@ -62,14 +62,14 @@ EventQueue *mbed_event_queue()
6262

6363
return &queue;
6464
#else
65-
return do_shared_event_queue_with_thread<osPriorityNormal, MBED_CONF_EVENTS_SHARED_EVENTSIZE, MBED_CONF_EVENTS_SHARED_STACKSIZE>();
65+
return do_shared_event_queue_with_thread<osPriorityNormal, MBED_CONF_EVENTS_SHARED_EVENTSIZE, MBED_CONF_EVENTS_SHARED_STACKSIZE>("shared_event_queue");
6666
#endif
6767
}
6868

6969
#ifdef MBED_CONF_RTOS_PRESENT
7070
EventQueue *mbed_highprio_event_queue()
7171
{
72-
return do_shared_event_queue_with_thread<osPriorityHigh, MBED_CONF_EVENTS_SHARED_HIGHPRIO_EVENTSIZE, MBED_CONF_EVENTS_SHARED_HIGHPRIO_STACKSIZE>();
72+
return do_shared_event_queue_with_thread<osPriorityHigh, MBED_CONF_EVENTS_SHARED_HIGHPRIO_EVENTSIZE, MBED_CONF_EVENTS_SHARED_HIGHPRIO_STACKSIZE>("shared_highprio_event_queue");
7373
}
7474
#endif
7575

features/cellular/easy_cellular/CellularConnectionFSM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ nsapi_error_t CellularConnectionFSM::start_dispatch()
617617
{
618618
MBED_ASSERT(!_queue_thread);
619619

620-
_queue_thread = new rtos::Thread(osPriorityNormal, 2048);
620+
_queue_thread = new rtos::Thread(osPriorityNormal, 2048, NULL, "cellular_fsm");
621621
if (!_queue_thread) {
622622
stop();
623623
return NSAPI_ERROR_NO_MEMORY;

features/lwipstack/lwip/src/include/lwip/opt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,7 @@
15361536
* TCPIP_THREAD_NAME: The name assigned to the main tcpip thread.
15371537
*/
15381538
#if !defined TCPIP_THREAD_NAME || defined __DOXYGEN__
1539-
#define TCPIP_THREAD_NAME "tcpip_thread"
1539+
#define TCPIP_THREAD_NAME "lwip_tcpip"
15401540
#endif
15411541

15421542
/**

features/lwipstack/ppp_lwip.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static EventQueue *prepare_event_queue()
6868

6969
// Only need to queue 2 events. new blows on failure.
7070
event_queue = new EventQueue(2 * EVENTS_EVENT_SIZE, NULL);
71-
event_thread = new Thread(osPriorityNormal, PPP_THREAD_STACK_SIZE);
71+
event_thread = new Thread(osPriorityNormal, PPP_THREAD_STACK_SIZE, NULL, "ppp_lwip");
7272

7373
if (event_thread->start(callback(event_queue, &EventQueue::dispatch_forever)) != osOK) {
7474
delete event_thread;

rtos/TARGET_CORTEX/mbed_rtos_rtx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ MBED_NORETURN void mbed_rtos_start()
5252
_main_thread_attr.cb_size = sizeof(_main_obj);
5353
_main_thread_attr.cb_mem = &_main_obj;
5454
_main_thread_attr.priority = osPriorityNormal;
55-
_main_thread_attr.name = "main_thread";
55+
_main_thread_attr.name = "main";
5656

5757
/* Allow non-secure main thread to call secure functions */
5858
#if defined(DOMAIN_NS) && (DOMAIN_NS == 1U)

rtos/TARGET_CORTEX/mbed_rtx_conf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
// LIBSPACE default value set for ARMCC
7171
#define OS_THREAD_LIBSPACE_NUM 4
7272

73-
#define OS_IDLE_THREAD_NAME "idle_thread"
74-
#define OS_TIMER_THREAD_NAME "timer_thread"
73+
#define OS_IDLE_THREAD_NAME "rtx_idle"
74+
#define OS_TIMER_THREAD_NAME "rtx_timer"
7575

7676
/* Enable only the evr events we use in Mbed-OS to save flash space. */
7777
//Following events are used by Mbed-OS, DO NOT disable them

0 commit comments

Comments
 (0)