diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-07-22 15:41:44 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-07-24 09:09:18 +0200 |
commit | d70f530842523d28414b1f3a786a74f3f3e4bff4 (patch) | |
tree | 8ff6cb7855a56213b3d047627c2e10159cedab12 /cpukit/libmisc/monitor/mon-task.c | |
parent | monitor: Print the wait queue to ease debugging (diff) | |
download | rtems-d70f530842523d28414b1f3a786a74f3f3e4bff4.tar.bz2 |
monitor: Add current CPU of thread
Diffstat (limited to 'cpukit/libmisc/monitor/mon-task.c')
-rw-r--r-- | cpukit/libmisc/monitor/mon-task.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cpukit/libmisc/monitor/mon-task.c b/cpukit/libmisc/monitor/mon-task.c index 57f506e900..0d6555717c 100644 --- a/cpukit/libmisc/monitor/mon-task.c +++ b/cpukit/libmisc/monitor/mon-task.c @@ -8,6 +8,7 @@ #include <rtems.h> #include <rtems/monitor.h> +#include <rtems/score/threadimpl.h> #include <rtems/score/threadqimpl.h> #include <stdio.h> @@ -28,6 +29,7 @@ rtems_monitor_task_canonical( canonical_task->argument = rtems_thread->Start.numeric_argument; canonical_task->stack = rtems_thread->Start.Initial_stack.area; canonical_task->stack_size = rtems_thread->Start.Initial_stack.size; + canonical_task->cpu = _Per_CPU_Get_index( _Thread_Get_CPU( rtems_thread ) ); canonical_task->priority = rtems_thread->current_priority; canonical_task->state = rtems_thread->current_state; canonical_task->wait_id = rtems_thread->Wait.id; @@ -57,8 +59,8 @@ rtems_monitor_task_dump_header( ) { fprintf(stdout,"\ -ID NAME PRI STATE MODES EVENTS WAITID WAITQUEUE\n"); /* -0a010004 SHLL 100 READY P:T:nA NONE 00000000 00000000 [DFLT] */ +ID NAME CPU PRI STATE MODES EVENTS WAITID WAITQUEUE\n"); /* +0a010004 SHLL 0 100 READY P:T:nA NONE 00000000 00000000 [DFLT] */ rtems_monitor_separator(); } @@ -77,6 +79,8 @@ rtems_monitor_task_dump( length += rtems_monitor_dump_id(monitor_task->id); length += rtems_monitor_pad(11, length); length += rtems_monitor_dump_name(monitor_task->id); + length += rtems_monitor_pad(21, length); + length += rtems_monitor_dump_decimal(monitor_task->cpu); length += rtems_monitor_pad(26, length); length += rtems_monitor_dump_priority(monitor_task->priority); length += rtems_monitor_pad(30, length); |