Prev: ray ban
Next: (none)
From: Arnd Bergmann on
On Saturday 05 June 2010, John Stultz wrote:
> do {
> seq = read_seqbegin(&xtime_lock);
> xts = __current_kernel_time();
> - tom = wall_to_monotonic;
> + tom = __get_wall_to_monotonic();
> } while (read_seqretry(&xtime_lock, seq));

Would it make sense to also limit the use of xtime_lock to the
timekeeping code? I suppose you could merge the various accessors
(current_kernel_time, get_monotonic_coarse, __current_kernel_time,
__get_wall_to_monotonic) with a single function doing

struct timespec current_kernel_time(struct timespec *tomono)
struct timespec now;
unsigned long seq;

do {
seq = read_seqbegin(&xtime_lock);
if (tomono)
now = xtime;
} while (read_seqretry(&xtime_lock, seq));

return now;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)
More majordomo info at
Please read the FAQ at
Pages: 1
Prev: ray ban
Next: (none)