lkml.org 
[lkml]   [2006]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Provide an interface for getting the current tick length
Andrew Morton writes:

> Ah, you copied-and-pasted from update_wall_time_one_tick().

Yep, and I didn't even notice the extra space.

> Can we share that code?

We could share the code that computes time_adjust_step, i.e. this
much:

if ((time_adjust_step = time_adjust) != 0) {
/*
* We are doing an adjtime thing. Prepare time_adjust_step to
* be within bounds. Note that a positive time_adjust means we
* want the clock to run faster.
*
* Limit the amount of the step to be in the range
* -tickadj .. +tickadj
*/
time_adjust_step = min(time_adjust_step, (long)tickadj);
time_adjust_step = max(time_adjust_step, (long)-tickadj);
}

Is that enough to be worth factoring out? Note that
update_wall_time_one_tick() needs both time_adjust_step and
delta_nsec, so to share more, we would have to have a function
returning two values and it would start to get ugly.

Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-16 03:57    [W:0.063 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site