Re: [PATCH] optimized ktime_get[_ts] for GENERIC_TIME=y
From: Martin Schwidefsky
Date: Mon Jul 06 2009 - 10:16:02 EST
On Mon, 06 Jul 2009 16:07:22 +0200
Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote:
> > diff -urpN linux-2.5/kernel/time/timekeeping.c linux-2.5-patched/kernel/time/timekeeping.c
> > --- linux-2.5/kernel/time/timekeeping.c 2009-07-03 10:46:07.000000000 +0200
> > +++ linux-2.5-patched/kernel/time/timekeeping.c 2009-07-03 10:46:23.000000000 +0200
> > @@ -118,6 +118,69 @@ void getnstimeofday(struct timespec *ts)
> >
> > EXPORT_SYMBOL(getnstimeofday);
> >
> > +ktime_t ktime_get(void)
> > +{
> > + cycle_t cycle_now, cycle_delta;
> > + struct timespec time;
> > + unsigned long seq;
> > + s64 nsecs;
> > +
> > + do {
> > + seq = read_seqbegin(&xtime_lock);
>
> minor nit : read_seqbegin() returns an "unsigned int", not an "unsigned long"
Hmm, just cut-copy-pasted the seq-loop. Seems like a job for the janitor ..
But I will update my patch.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/