lkml.org 
[lkml]   [2009]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] optimized ktime_get[_ts] for GENERIC_TIME=y
On Mon, 06 Jul 2009 16:07:22 +0200
Eric Dumazet <eric.dumazet@gmail.com> 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.



\
 
 \ /
  Last update: 2009-07-06 16:19    [W:0.056 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site