Changeset 2e71aa41 in rtems


Ignore:
Timestamp:
Feb 17, 2016, 11:52:17 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
ac13ffd
Parents:
db329a7
Message:

score: Simplify _Watchdog_Tick()

Move thread dispatch disable check to legacy rtems_clock_tick(). Assert
that thread dispatching is disabled in _Watchdog_Tick(). This is
usually the case, since this function is called in interrupt context by
the clock tick service routine.

Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/clocktick.c

    rdb329a7 r2e71aa41  
    2121#include <rtems/rtems/clock.h>
    2222#include <rtems/score/timecounter.h>
     23#include <rtems/score/threadimpl.h>
    2324
    2425rtems_status_code rtems_clock_tick( void )
     
    3334  );
    3435
     36  if ( _Thread_Dispatch_is_enabled() ) {
     37    _Thread_Dispatch();
     38  }
     39
    3540  return RTEMS_SUCCESSFUL;
    3641}
  • cpukit/score/src/watchdogtick.c

    rdb329a7 r2e71aa41  
    1313 */
    1414
     15#include <rtems/score/assert.h>
    1516#include <rtems/score/schedulerimpl.h>
    16 #include <rtems/score/threadimpl.h>
     17#include <rtems/score/threaddispatch.h>
    1718#include <rtems/score/todimpl.h>
    1819#include <rtems/score/watchdogimpl.h>
     
    2425void _Watchdog_Tick( void )
    2526{
     27  _Assert( !_Thread_Dispatch_is_enabled() );
     28
    2629  _TOD_Tickle_ticks();
    2730
     
    2932
    3033  _Scheduler_Tick();
    31 
    32   if ( _Thread_Dispatch_is_enabled() )
    33     _Thread_Dispatch();
    3434}
Note: See TracChangeset for help on using the changeset viewer.