Changeset 47e5c1d in rtems


Ignore:
Timestamp:
Oct 1, 2019, 11:04:29 AM (3 weeks ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
8d989c5
Parents:
2763f53
git-author:
Sebastian Huber <sebastian.huber@…> (10/01/19 11:04:29)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/02/19 05:01:36)
Message:

score: Remove strange timecounter init step

The double call of the timecounter get method was added to FreeBSD in
2002 without a comment. It is not clear why this is needed.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/kern_tc.c

    r2763f53 r47e5c1d  
    14001400            tc->tc_frequency < timecounter->tc_frequency)
    14011401                return;
    1402 #endif /* __rtems__ */
    14031402        (void)tc->tc_get_timecount(tc);
    14041403        (void)tc->tc_get_timecount(tc);
     1404#endif /* __rtems__ */
    14051405        timecounter = tc;
    14061406#ifdef __rtems__
  • testsuites/sptests/sptimecounter01/init.c

    r2763f53 r47e5c1d  
    127127  tc_soft->tc_quality = 1234;
    128128  _Timecounter_Install(tc_soft);
    129   assert(ctx->tc_soft_counter == 3);
     129  assert(ctx->tc_soft_counter == 1);
    130130
    131131  rtems_bsd_binuptime(&bt);
    132   assert(ctx->tc_soft_counter == 4);
     132  assert(ctx->tc_soft_counter == 2);
    133133
    134134  assert(bt.sec == 1);
    135135  assert(bt.frac == 18446744073708);
    136136
    137   ctx->tc_soft_counter = 0xf0000000 | 3;
     137  ctx->tc_soft_counter = 0xf0000000 | 1;
    138138  rtems_bsd_binuptime(&bt);
    139   assert(ctx->tc_soft_counter == (0xf0000000 | 4));
     139  assert(ctx->tc_soft_counter == (0xf0000000 | 2));
    140140
    141141  assert(bt.sec == 1);
     
    143143
    144144  /* Ensure that the fraction overflows and the second remains constant */
    145   ctx->tc_soft_counter = (0xf0000000 | 3) + soft_freq;
     145  ctx->tc_soft_counter = (0xf0000000 | 1) + soft_freq;
    146146  rtems_bsd_binuptime(&bt);
    147   assert(ctx->tc_soft_counter == (0xf0000000 | 4) + soft_freq);
     147  assert(ctx->tc_soft_counter == (0xf0000000 | 2) + soft_freq);
    148148  assert(bt.sec == 1);
    149149  assert(bt.frac == 18446742522092);
Note: See TracChangeset for help on using the changeset viewer.