Changeset 5e7b6272 in rtems


Ignore:
Timestamp:
05/31/96 23:27:45 (28 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
52a0641
Parents:
c238a218
Message:

renamed _TOD_Ticks_since_boot as _Watchdog_Ticks_since_boot so the Watchdog
Handler could timestamp the starting and stopping of timers. Since
TOD is built on top of Watchdog, this avoided a circular dependency.

Files:
27 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/src/sched.c

    rc238a218 r5e7b6272  
    33 */
    44
     5#include <assert.h>
    56#include <sched.h>
    67
  • c/src/exec/posix/src/time.c

    rc238a218 r5e7b6272  
    175175#ifdef _POSIX_CPUTIME
    176176    case CLOCK_PROCESS_CPUTIME:
    177       /* could base this on _TOD_Ticks_since_boot -- must make set work though*/
     177      /* could base this on _Watchdog_Ticks_since_boot -- must make set work though*/
    178178      return POSIX_NOT_IMPLEMENTED();
    179179      break;
  • c/src/exec/posix/src/unistd.c

    rc238a218 r5e7b6272  
    2626  nanosleep( &tp, &tm );
    2727
    28   return tm->tv_sec;       /* seconds remaining */
     28  return tm.tv_sec;       /* seconds remaining */
    2929}
    3030/*
  • c/src/exec/rtems/src/clock.c

    rc238a218 r5e7b6272  
    6363
    6464    case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT:
    65       *(rtems_interval *)time_buffer = _TOD_Ticks_since_boot;
     65      *(rtems_interval *)time_buffer = _Watchdog_Ticks_since_boot;
    6666      return RTEMS_SUCCESSFUL;
    6767
  • c/src/exec/rtems/src/rtclock.c

    rc238a218 r5e7b6272  
    6363
    6464    case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT:
    65       *(rtems_interval *)time_buffer = _TOD_Ticks_since_boot;
     65      *(rtems_interval *)time_buffer = _Watchdog_Ticks_since_boot;
    6666      return RTEMS_SUCCESSFUL;
    6767
  • c/src/exec/score/headers/tod.h

    rc238a218 r5e7b6272  
    8282
    8383/*
    84  *  The following contains the number of ticks since the
    85  *  system was booted.
    86  */
    87 
    88 SCORE_EXTERN Watchdog_Interval _TOD_Ticks_since_boot;
    89 
    90 /*
    9184 *  The following contains the number of microseconds per tick.
    9285 */
  • c/src/exec/score/headers/watchdog.h

    rc238a218 r5e7b6272  
    8383  Watchdog_Interval initial;
    8484  Watchdog_Interval delta_interval;
     85  Watchdog_Interval start_time;
     86  Watchdog_Interval stop_time;
    8587  Watchdog_Service_routine_entry  routine;
    8688  Objects_Id        id;
     
    9597SCORE_EXTERN volatile unsigned32  _Watchdog_Sync_level;
    9698SCORE_EXTERN volatile unsigned32  _Watchdog_Sync_count;
     99
     100/*
     101 *  The following contains the number of ticks since the
     102 *  system was booted.
     103 */
     104
     105SCORE_EXTERN Watchdog_Interval _Watchdog_Ticks_since_boot;
    97106
    98107/*
  • c/src/exec/score/include/rtems/score/tod.h

    rc238a218 r5e7b6272  
    8282
    8383/*
    84  *  The following contains the number of ticks since the
    85  *  system was booted.
    86  */
    87 
    88 SCORE_EXTERN Watchdog_Interval _TOD_Ticks_since_boot;
    89 
    90 /*
    9184 *  The following contains the number of microseconds per tick.
    9285 */
  • c/src/exec/score/include/rtems/score/watchdog.h

    rc238a218 r5e7b6272  
    8383  Watchdog_Interval initial;
    8484  Watchdog_Interval delta_interval;
     85  Watchdog_Interval start_time;
     86  Watchdog_Interval stop_time;
    8587  Watchdog_Service_routine_entry  routine;
    8688  Objects_Id        id;
     
    9597SCORE_EXTERN volatile unsigned32  _Watchdog_Sync_level;
    9698SCORE_EXTERN volatile unsigned32  _Watchdog_Sync_count;
     99
     100/*
     101 *  The following contains the number of ticks since the
     102 *  system was booted.
     103 */
     104
     105SCORE_EXTERN Watchdog_Interval _Watchdog_Ticks_since_boot;
    97106
    98107/*
  • c/src/exec/score/inline/rtems/score/tod.inl

    rc238a218 r5e7b6272  
    4646{
    4747  _TOD_Current.ticks += 1;
    48   _TOD_Ticks_since_boot += 1;
     48  _Watchdog_Ticks_since_boot += 1;
    4949}
    5050
  • c/src/exec/score/inline/tod.inl

    rc238a218 r5e7b6272  
    4646{
    4747  _TOD_Current.ticks += 1;
    48   _TOD_Ticks_since_boot += 1;
     48  _Watchdog_Ticks_since_boot += 1;
    4949}
    5050
  • c/src/exec/score/macros/rtems/score/tod.inl

    rc238a218 r5e7b6272  
    3535#define _TOD_Tickle_ticks() \
    3636  _TOD_Current.ticks++; \
    37   _TOD_Ticks_since_boot++
     37  _Watchdog_Ticks_since_boot++
    3838
    3939/*PAGE
  • c/src/exec/score/macros/tod.inl

    rc238a218 r5e7b6272  
    3535#define _TOD_Tickle_ticks() \
    3636  _TOD_Current.ticks++; \
    37   _TOD_Ticks_since_boot++
     37  _Watchdog_Ticks_since_boot++
    3838
    3939/*PAGE
  • c/src/exec/score/src/coretod.c

    rc238a218 r5e7b6272  
    3838  _TOD_Microseconds_per_tick = microseconds_per_tick;
    3939
    40   _TOD_Ticks_since_boot = 0;
    4140  _TOD_Seconds_since_epoch = 0;
    4241
  • c/src/exec/score/src/tod.c

    rc238a218 r5e7b6272  
    3838  _TOD_Microseconds_per_tick = microseconds_per_tick;
    3939
    40   _TOD_Ticks_since_boot = 0;
    4140  _TOD_Seconds_since_epoch = 0;
    4241
  • c/src/exec/score/src/watchdog.c

    rc238a218 r5e7b6272  
    3333  _Watchdog_Sync_count = 0;
    3434  _Watchdog_Sync_level = 0;
     35  _Watchdog_Ticks_since_boot = 0;
     36
    3537  _Chain_Initialize_empty( &_Watchdog_Ticks_chain );
    3638  _Chain_Initialize_empty( &_Watchdog_Seconds_chain );
     
    8385      break;
    8486  }
     87  the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
     88
    8589  _ISR_Enable( level );
    8690  return( previous_state );
     
    201205  _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
    202206
     207  the_watchdog->start_time = _Watchdog_Ticks_since_boot;
     208
    203209exit_insert:
    204210  _Watchdog_Sync_level = insert_isr_nest_level;
  • c/src/tests/sptests/spsize/size.c

    rc238a218 r5e7b6272  
    330330/*tod.h*/       (sizeof _TOD_Current)                     +
    331331                (sizeof _TOD_Seconds_since_epoch)         +
    332                 (sizeof _TOD_Ticks_since_boot)            +
    333332                (sizeof _TOD_Microseconds_per_tick)       +
    334333                (sizeof _TOD_Ticks_per_second)            +
     
    344343/*watchdog.h*/  (sizeof _Watchdog_Sync_level)             +
    345344                (sizeof _Watchdog_Sync_count)             +
     345                (sizeof _Watchdog_Ticks_since_boot)       +
    346346                (sizeof _Watchdog_Ticks_chain)            +
    347347                (sizeof _Watchdog_Seconds_chain)          +
  • cpukit/posix/src/sched.c

    rc238a218 r5e7b6272  
    33 */
    44
     5#include <assert.h>
    56#include <sched.h>
    67
  • cpukit/posix/src/time.c

    rc238a218 r5e7b6272  
    175175#ifdef _POSIX_CPUTIME
    176176    case CLOCK_PROCESS_CPUTIME:
    177       /* could base this on _TOD_Ticks_since_boot -- must make set work though*/
     177      /* could base this on _Watchdog_Ticks_since_boot -- must make set work though*/
    178178      return POSIX_NOT_IMPLEMENTED();
    179179      break;
  • cpukit/rtems/src/rtclock.c

    rc238a218 r5e7b6272  
    6363
    6464    case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT:
    65       *(rtems_interval *)time_buffer = _TOD_Ticks_since_boot;
     65      *(rtems_interval *)time_buffer = _Watchdog_Ticks_since_boot;
    6666      return RTEMS_SUCCESSFUL;
    6767
  • cpukit/score/include/rtems/score/tod.h

    rc238a218 r5e7b6272  
    8282
    8383/*
    84  *  The following contains the number of ticks since the
    85  *  system was booted.
    86  */
    87 
    88 SCORE_EXTERN Watchdog_Interval _TOD_Ticks_since_boot;
    89 
    90 /*
    9184 *  The following contains the number of microseconds per tick.
    9285 */
  • cpukit/score/include/rtems/score/watchdog.h

    rc238a218 r5e7b6272  
    8383  Watchdog_Interval initial;
    8484  Watchdog_Interval delta_interval;
     85  Watchdog_Interval start_time;
     86  Watchdog_Interval stop_time;
    8587  Watchdog_Service_routine_entry  routine;
    8688  Objects_Id        id;
     
    9597SCORE_EXTERN volatile unsigned32  _Watchdog_Sync_level;
    9698SCORE_EXTERN volatile unsigned32  _Watchdog_Sync_count;
     99
     100/*
     101 *  The following contains the number of ticks since the
     102 *  system was booted.
     103 */
     104
     105SCORE_EXTERN Watchdog_Interval _Watchdog_Ticks_since_boot;
    97106
    98107/*
  • cpukit/score/inline/rtems/score/tod.inl

    rc238a218 r5e7b6272  
    4646{
    4747  _TOD_Current.ticks += 1;
    48   _TOD_Ticks_since_boot += 1;
     48  _Watchdog_Ticks_since_boot += 1;
    4949}
    5050
  • cpukit/score/macros/rtems/score/tod.inl

    rc238a218 r5e7b6272  
    3535#define _TOD_Tickle_ticks() \
    3636  _TOD_Current.ticks++; \
    37   _TOD_Ticks_since_boot++
     37  _Watchdog_Ticks_since_boot++
    3838
    3939/*PAGE
  • cpukit/score/src/coretod.c

    rc238a218 r5e7b6272  
    3838  _TOD_Microseconds_per_tick = microseconds_per_tick;
    3939
    40   _TOD_Ticks_since_boot = 0;
    4140  _TOD_Seconds_since_epoch = 0;
    4241
  • cpukit/score/src/watchdog.c

    rc238a218 r5e7b6272  
    3333  _Watchdog_Sync_count = 0;
    3434  _Watchdog_Sync_level = 0;
     35  _Watchdog_Ticks_since_boot = 0;
     36
    3537  _Chain_Initialize_empty( &_Watchdog_Ticks_chain );
    3638  _Chain_Initialize_empty( &_Watchdog_Seconds_chain );
     
    8385      break;
    8486  }
     87  the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
     88
    8589  _ISR_Enable( level );
    8690  return( previous_state );
     
    201205  _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
    202206
     207  the_watchdog->start_time = _Watchdog_Ticks_since_boot;
     208
    203209exit_insert:
    204210  _Watchdog_Sync_level = insert_isr_nest_level;
  • testsuites/sptests/spsize/size.c

    rc238a218 r5e7b6272  
    330330/*tod.h*/       (sizeof _TOD_Current)                     +
    331331                (sizeof _TOD_Seconds_since_epoch)         +
    332                 (sizeof _TOD_Ticks_since_boot)            +
    333332                (sizeof _TOD_Microseconds_per_tick)       +
    334333                (sizeof _TOD_Ticks_per_second)            +
     
    344343/*watchdog.h*/  (sizeof _Watchdog_Sync_level)             +
    345344                (sizeof _Watchdog_Sync_count)             +
     345                (sizeof _Watchdog_Ticks_since_boot)       +
    346346                (sizeof _Watchdog_Ticks_chain)            +
    347347                (sizeof _Watchdog_Seconds_chain)          +
Note: See TracChangeset for help on using the changeset viewer.