Changeset 89c0313 in rtems for testsuites


Ignore:
Timestamp:
12/21/17 13:31:55 (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
3a4e044
Parents:
0c5d22f
git-author:
Sebastian Huber <sebastian.huber@…> (12/21/17 13:31:55)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/02/18 14:01:20)
Message:

score: Optimize watchdog tickle

Avoid unnecessary lock acquire/release operations. Get realtime via
timecounter only if necessary.

Update #3264.

File:
1 edited

Legend:

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

    r0c5d22f r89c0313  
    8383  ISR_LOCK_DEFINE( , lock, "Test" )
    8484  ISR_lock_Context lock_context;
     85  Watchdog_Control *first;
    8586
    8687  _ISR_lock_ISR_disable_and_acquire( &lock, &lock_context );
     88
    8789  ++now;
    88   _Watchdog_Tickle( header, now, &lock, &lock_context );
     90  first = _Watchdog_Header_first( header );
     91
     92  if ( first != NULL ) {
     93    _Watchdog_Tickle( header, first, now, &lock, &lock_context );
     94  }
     95
     96  _ISR_lock_Release_and_ISR_enable( &lock, &lock_context );
    8997  _ISR_lock_Destroy( &lock );
    9098
Note: See TracChangeset for help on using the changeset viewer.