Changeset 34675587 in rtems for cpukit/score/src

Timestamp:
10/28/21 08:22:58 (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
c3a68059
Parents:
ea389aaa
git-author:
Sebastian Huber <sebastian.huber@…> (10/28/21 08:22:58)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/15/21 07:56:54)
Message:

kern_tc.c: Scaling/large delta recalculation

This change is a slight performance optimization for systems with a slow
64-bit division.

The th->th_scale and th->th_large_delta values only depend on the
timecounter frequency and the th->th_adjustment. The timecounter
frequency of a timehand only changes when a new timecounter is activated
for the timehand. The th->th_adjustment is only changed by the NTP
second update. The NTP second update is not done for every call of
tc_windup().

Move the code block to recalculate the scaling factor and
the large delta of a timehand to the new helper function
recalculate_scaling_factor_and_large_delta().

Call recalculate_scaling_factor_and_large_delta() when a new timecounter
is activated and a NTP second update occurred.

MFC after: 1 week

(No files)

Note: See TracChangeset for help on using the changeset viewer.