source: rtems/cpukit/score/src/watchdogreportchain.c @ 749d64a

4.104.115
Last change on this file since 749d64a was c8f7b4e6, checked in by Joel Sherrill <joel.sherrill@…>, on 11/26/08 at 16:38:06

2008-11-26 Joel Sherrill <joel.sherrill@…>

  • score/Makefile.am, score/include/rtems/score/watchdog.h: Add _Watchdog_Report and _Watchdog_Report_chain as debug assist routines. They are NOT to be used in directives.
  • score/src/watchdogreport.c, score/src/watchdogreportchain.c: New files.
  • Property mode set to 100644
File size: 1.1 KB
Line 
1/**
2 *  @file watchdogreportchain.c
3 *
4 *  This should only be used for debugging.
5 */
6
7/*  COPYRIGHT (c) 1989-2008.
8 *  On-Line Applications Research Corporation (OAR).
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.com/license/LICENSE.
13 *
14 *  $Id$
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/system.h>
22#include <rtems/score/watchdog.h>
23#include <rtems/score/isr.h>
24#include <rtems/bspIo.h>
25
26void _Watchdog_Report_chain(
27  const char        *name,
28  Chain_Control     *header
29)
30{
31  ISR_Level          level;
32  Chain_Node        *node;
33
34  _ISR_Disable( level );
35    printk( "Watchdog Chain: %s %p\n", name, header );
36    if ( !_Chain_Is_empty( header ) ) {
37      for ( node = header->first ;
38            node != _Chain_Tail(header) ;
39            node = node->next )
40      {
41        Watchdog_Control *watch = (Watchdog_Control *) node;
42
43        _Watchdog_Report( NULL, watch );
44      }
45      printk( "== end of %s \n", name );
46    } else {
47      printk( "Chain is empty\n" );
48    }
49  _ISR_Enable( level );
50}
Note: See TracBrowser for help on using the repository browser.