source: rtems/cpukit/include/rtems/bspIo.h @ 90a5d194

4.104.114.84.9
Last change on this file since 90a5d194 was 90a5d194, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 6, 2007 at 10:51:25 PM

2007-09-06 Joel Sherrill <joel.sherrill@…>

  • libcsupport/Makefile.am, libcsupport/src/printk.c:
  • libcsupport/src/printk_plugin.c: New file. include/rtems/bspIo.h, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuuse.h, libmisc/stackchk/check.c, libmisc/stackchk/stackchk.h: rtems/include/rtems/rtems/ratemon.h, rtems/src/ratemonreportstatistics.c: Added capability to specify your own "printf" routine to various reporting functions. This added an XXX_with_plugin as the underlying implementation for + rtems_rate_monotonic_report_statistics + rtems_stack_checker_report_usage + rtems_cpu_usage_report As demonstration, the http netdemo can now print out stack and cpu usage reports.
  • Property mode set to 100644
File size: 1.9 KB
RevLine 
[1bce637]1/* bspIo.h
2 *
3 *  This include file contains declaration of interface that
4 *  will be provided by the file contained in this directory.
5 *
6 *  COPYRIGHT (c) 1998 valette@crf.canon.fr
7 *
8 *  The license and distribution terms for this file may be
9 *  found in found in the file LICENSE in this distribution or at
[09fd8ce5]10 *  http://www.rtems.com/license/LICENSE.
[1bce637]11 *
12 *  $Id$
13 */
[8ff51798]14#ifndef _RTEMS_BSPIO_H
15#define _RTEMS_BSPIO_H
[1bce637]16
[8eea24b]17#ifdef __cplusplus
18extern "C" {
19#endif
20
[1bce637]21/*
22 * All the functions declared as extern after this comment
23 * MUST be implemented in each BSP. Using this function,
24 * this directory contains shared code that export higher level
25 * functionnality described after the next command.
26 */
27typedef void    (*BSP_output_char_function_type)        (char c);
28typedef char    (*BSP_polling_getchar_function_type)    (void);
29
30extern  BSP_output_char_function_type           BSP_output_char;
31extern  BSP_polling_getchar_function_type       BSP_poll_char;
[34fd745]32
[1bce637]33/*
34 * All the function declared as extern after this comment
[34fd745]35 * are available for each BSP by compiling and linking
[1bce637]36 * the files contained in this directory PROVIDED definition
37 * and initialisation of the previous variable are done.
38 */
[108bab3]39#include <stdarg.h>
[90a5d194]40
41extern void vprintk(const char *fmt, va_list ap);
42extern void printk(const char *fmt, ...);
43
44/*
45 *  This routine is passed into RTEMS reporting functions
46 *  that may have their output redirected.  In particular,
47 *  the cpu usage, period usage, and stack usage reporting
48 *  functions use this.  If the user provides their
49 *  own "printf plugin", then they may redirect those reports
50 *  as they see fit.
51 */
52extern int printk_plugin(void *context, const char *fmt, ...);
53 
54/*
55 *  Type definition for function which can be plugged in to
56 *  certain reporting routines to redirect the output
57 */
58typedef int (*rtems_printk_plugin_t)(void *, const char *format, ...);
[1bce637]59
[8eea24b]60#ifdef __cplusplus
61}
62#endif
63
[1bce637]64#endif
Note: See TracBrowser for help on using the repository browser.