Ignore:
Timestamp:
Jun 13, 2015, 1:29:04 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
e6b31b27
Parents:
258d580c
git-author:
Sebastian Huber <sebastian.huber@…> (06/13/15 13:29:04)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/13/15 13:51:21)
Message:

score: Add _Watchdog_Preinitialize()

Add an assert to ensure that the watchdog is the proper state for a
_Watchdog_Initialize(). This helps to detect invalid initializations
which may lead to a corrupt watchdog chain.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/spwatchdog/init.c

    r258d580c r80fca28  
    4949  rtems_test_assert( _Chain_Is_empty( &header->Iterators ) );
    5050
    51   _Watchdog_Initialize( c, NULL, 0, NULL );
     51  _Watchdog_Preinitialize( c );
    5252  c->initial = 6;
    5353  _Watchdog_Insert( header, c );
     
    5757  rtems_test_assert( _Chain_Is_empty( &header->Iterators ) );
    5858
    59   _Watchdog_Initialize( a, NULL, 0, NULL );
     59  _Watchdog_Preinitialize( a );
    6060  a->initial = 2;
    6161  _Watchdog_Insert( header, a );
     
    6363  rtems_test_assert( c->delta_interval == 4 );
    6464
    65   _Watchdog_Initialize( b, NULL, 0, NULL );
     65  _Watchdog_Preinitialize( b );
    6666  b->initial = 4;
    6767  _Watchdog_Insert( header, b );
     
    7070  rtems_test_assert( c->delta_interval == 2 );
    7171
    72   _Watchdog_Initialize( d, NULL, 0, NULL );
     72  _Watchdog_Preinitialize( d );
    7373}
    7474
Note: See TracChangeset for help on using the changeset viewer.