2008-07-17 Joel Sherrill <joel.sherrill@oarcorp.com>

* libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-object.c,
	libmisc/monitor/monitor.h, libmisc/shell/main_chmod.c,
	libmisc/shell/main_tty.c, libmisc/shell/main_umask.c,
	libmisc/shell/main_whoami.c: Add pthread command to monitor when
	POSIX is enabled. Remove include of rtems/monitor.h from files not
	related.
This commit is contained in:
Joel Sherrill
2008-07-17 15:43:56 +00:00
parent 9bd5118c72
commit 00a2d366a6
8 changed files with 36 additions and 6 deletions

View File

@@ -1,3 +1,12 @@
2008-07-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-object.c,
libmisc/monitor/monitor.h, libmisc/shell/main_chmod.c,
libmisc/shell/main_tty.c, libmisc/shell/main_umask.c,
libmisc/shell/main_whoami.c: Add pthread command to monitor when
POSIX is enabled. Remove include of rtems/monitor.h from files not
related.
2008-07-16 Till Straumann <strauman@slac.stanford.edu>
* score/cpu/powerpc/rtems/new-exceptions/cpu.h:

View File

@@ -248,6 +248,17 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
{ .monitor_command_entry = rtems_monitor_commands },
&rtems_monitor_commands[21],
},
#ifdef RTEMS_POSIX_API
{ "pthread",
"Display information about the specified pthreads. "
"Default is to display information about all pthreads on this node.\n"
" pthread [id [id ...] ]",
0,
rtems_monitor_object_cmd,
{ RTEMS_MONITOR_OBJECT_PTHREAD },
&rtems_monitor_commands[22],
},
#endif
#ifdef CPU_INVOKE_DEBUGGER
{ "debugger",
"Enter the debugger, if possible. "
@@ -255,7 +266,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
0,
rtems_monitor_debugger_cmd,
{ 0 },
&rtems_monitor_commands[22],
&rtems_monitor_commands[23],
},
#endif
{ 0, 0, 0, 0, { 0 }, &rtems_registered_commands },

View File

@@ -22,6 +22,9 @@
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
#include <rtems.h>
#include <rtems/monitor.h>
#if defined(RTEMS_POSIX_API)
#include <rtems/posix/pthread.h>
#endif
#include <stdio.h>
#include <stdlib.h> /* strtoul() */
@@ -124,6 +127,14 @@ rtems_monitor_object_info_t rtems_monitor_object_info[] =
(rtems_monitor_object_dump_header_fn) rtems_monitor_driver_dump_header,
(rtems_monitor_object_dump_fn) rtems_monitor_driver_dump,
},
{ RTEMS_MONITOR_OBJECT_PTHREAD,
(void *) &_POSIX_Threads_Information,
sizeof(rtems_monitor_task_t),
(rtems_monitor_object_next_fn) rtems_monitor_manager_next,
(rtems_monitor_object_canonical_fn) rtems_monitor_task_canonical,
(rtems_monitor_object_dump_header_fn) rtems_monitor_task_dump_header,
(rtems_monitor_object_dump_fn) rtems_monitor_task_dump,
},
};
/*

View File

@@ -44,7 +44,10 @@ typedef enum {
RTEMS_MONITOR_OBJECT_CONFIG,
RTEMS_MONITOR_OBJECT_INIT_TASK,
RTEMS_MONITOR_OBJECT_MPCI,
RTEMS_MONITOR_OBJECT_SYMBOL
RTEMS_MONITOR_OBJECT_SYMBOL,
#if defined(RTEMS_POSIX_API)
RTEMS_MONITOR_OBJECT_PTHREAD,
#endif
} rtems_monitor_object_type_t;
/*

View File

@@ -24,7 +24,6 @@
#include <sys/stat.h>
#include <rtems.h>
#include <rtems/monitor.h>
#include <rtems/shell.h>
#include "internal.h"

View File

@@ -22,7 +22,6 @@
#include <errno.h>
#include <rtems.h>
#include <rtems/monitor.h>
#include <rtems/shell.h>
#include "internal.h"

View File

@@ -24,7 +24,6 @@
#include <sys/stat.h>
#include <rtems.h>
#include <rtems/monitor.h>
#include <rtems/shell.h>
#include "internal.h"

View File

@@ -23,7 +23,6 @@
#include <pwd.h>
#include <rtems.h>
#include <rtems/monitor.h>
#include <rtems/shell.h>
#include "internal.h"