forked from Imagelibrary/rtems
* itron/src/exd_tsk.c, itron/src/task.c, libmisc/capture/capture.c, libmisc/monitor/mon-config.c, libmisc/monitor/mon-driver.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c, libmisc/monitor/mon-symbols.c, posix/src/cancelrun.c, posix/src/pthreadexit.c, rtems/Makefile.am, rtems/preinstall.am, rtems/include/rtems.h, rtems/include/rtems/rtems/support.h, rtems/inline/rtems/rtems/tasks.inl, rtems/src/eventmp.c, rtems/src/msgmp.c, rtems/src/partmp.c, rtems/src/regionmp.c, rtems/src/rtemsobjectgetname.c, rtems/src/semmp.c, rtems/src/signalmp.c, rtems/src/taskdelete.c, rtems/src/taskmp.c, rtems/src/timerserver.c, score/Makefile.am, score/include/rtems/score/object.h, score/inline/rtems/score/object.inl, score/src/Unlimited.txt, score/src/objectgetnameasstring.c, score/src/threadqextractwithproxy.c: Add new Object Services collection. This changed the name of a few previously public but undocumented services and added a some new services. * rtems/include/rtems/rtems/object.h, rtems/src/rtemsbuildid.c, rtems/src/rtemsbuildname.c, rtems/src/rtemsobjectapimaximumclass.c, rtems/src/rtemsobjectapiminimumclass.c, rtems/src/rtemsobjectgetapiclassname.c, rtems/src/rtemsobjectgetapiname.c, rtems/src/rtemsobjectgetclassicname.c, rtems/src/rtemsobjectgetclassinfo.c, rtems/src/rtemsobjectidapimaximum.c, rtems/src/rtemsobjectidapiminimum.c, rtems/src/rtemsobjectidgetapi.c, rtems/src/rtemsobjectidgetclass.c, rtems/src/rtemsobjectidgetindex.c, rtems/src/rtemsobjectidgetnode.c, rtems/src/rtemsobjectsetname.c, score/src/objectapimaximumclass.c, score/src/objectgetinfo.c, score/src/objectgetinfoid.c, score/src/objectsetname.c: New files. * rtems/src/rtemsidtoname.c: Removed.
123 lines
3.1 KiB
C
123 lines
3.1 KiB
C
/*
|
|
* RTEMS Monitor init task support
|
|
*
|
|
* $Id$
|
|
*/
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
|
|
#include <rtems.h>
|
|
#include <rtems/monitor.h>
|
|
|
|
#include <inttypes.h>
|
|
#include <stdio.h>
|
|
|
|
/*
|
|
* As above, but just for init tasks
|
|
*/
|
|
void
|
|
rtems_monitor_init_task_canonical(
|
|
rtems_monitor_init_task_t *canonical_itask,
|
|
void *itask_void
|
|
)
|
|
{
|
|
rtems_initialization_tasks_table *rtems_itask = itask_void;
|
|
|
|
rtems_monitor_symbol_canonical_by_value(&canonical_itask->entry,
|
|
(void *) rtems_itask->entry_point);
|
|
|
|
canonical_itask->argument = rtems_itask->argument;
|
|
canonical_itask->stack_size = rtems_itask->stack_size;
|
|
canonical_itask->priority = rtems_itask->initial_priority;
|
|
canonical_itask->modes = rtems_itask->mode_set;
|
|
canonical_itask->attributes = rtems_itask->attribute_set;
|
|
}
|
|
|
|
void *
|
|
rtems_monitor_init_task_next(
|
|
void *object_info,
|
|
rtems_monitor_init_task_t *canonical_init_task,
|
|
rtems_id *next_id
|
|
)
|
|
{
|
|
rtems_configuration_table *c = _Configuration_Table;
|
|
rtems_initialization_tasks_table *itask;
|
|
uint32_t n = rtems_object_id_get_index(*next_id);
|
|
|
|
if (n >= c->RTEMS_api_configuration->number_of_initialization_tasks)
|
|
goto failed;
|
|
|
|
_Thread_Disable_dispatch();
|
|
|
|
itask = c->RTEMS_api_configuration->User_initialization_tasks_table + n;
|
|
|
|
/*
|
|
* dummy up a fake id and name for this item
|
|
*/
|
|
|
|
canonical_init_task->id = n;
|
|
canonical_init_task->name = itask->name;
|
|
|
|
*next_id += 1;
|
|
return (void *) itask;
|
|
|
|
failed:
|
|
*next_id = RTEMS_OBJECT_ID_FINAL;
|
|
return 0;
|
|
}
|
|
|
|
|
|
void
|
|
rtems_monitor_init_task_dump_header(
|
|
boolean verbose
|
|
)
|
|
{
|
|
fprintf(stdout,"\
|
|
# NAME ENTRY ARGUMENT PRIO MODES ATTRIBUTES STACK SIZE\n");
|
|
/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
|
|
0 1 2 3 4 5 6 7 */
|
|
rtems_monitor_separator();
|
|
}
|
|
|
|
/*
|
|
*/
|
|
|
|
void
|
|
rtems_monitor_init_task_dump(
|
|
rtems_monitor_init_task_t *monitor_itask,
|
|
boolean verbose
|
|
)
|
|
{
|
|
int length = 0;
|
|
|
|
length += rtems_monitor_dump_decimal(monitor_itask->id);
|
|
|
|
length += rtems_monitor_pad(7, length);
|
|
length += rtems_monitor_dump_name(monitor_itask->name);
|
|
|
|
length += rtems_monitor_pad(14, length);
|
|
length += rtems_monitor_symbol_dump(&monitor_itask->entry, verbose);
|
|
|
|
length += rtems_monitor_pad(25, length);
|
|
length += fprintf(stdout,"%" PRId32 " [0x%" PRIx32 "]",
|
|
monitor_itask->argument, monitor_itask->argument);
|
|
|
|
length += rtems_monitor_pad(39, length);
|
|
length += rtems_monitor_dump_priority(monitor_itask->priority);
|
|
|
|
length += rtems_monitor_pad(46, length);
|
|
length += rtems_monitor_dump_modes(monitor_itask->modes);
|
|
|
|
length += rtems_monitor_pad(54, length);
|
|
length += rtems_monitor_dump_attributes(monitor_itask->attributes);
|
|
|
|
length += rtems_monitor_pad(66, length);
|
|
length += fprintf(stdout,"%" PRId32 " [0x%" PRIx32 "]",
|
|
monitor_itask->stack_size, monitor_itask->stack_size);
|
|
|
|
fprintf(stdout,"\n");
|
|
}
|