Messages in this thread | | | Date | Sat, 18 Sep 2010 08:15:28 +0200 | From | Richard Cochran <> | Subject | Re: [PATCH] Posix CLOCK_RTC interface proof of concept |
| |
On Fri, Sep 17, 2010 at 11:42:38AM -0700, john stultz wrote: > On Fri, 2010-09-17 at 12:59 +0200, Thomas Gleixner wrote: > > That's basically a copy of enqueue_hrtimer(). Can't we use > > k_itimer.it.real for this and reuse the related functions in > > hrtimer.c? Not sure if it's worth the trouble though. > > Yes, there's also a similar duplication in drivers/char/mmtimer.c and > Richard Cochran commented on the same (although I'm not sure if he ended > up using the hrtimer for his similar PTP code).
After taking a look at the hrtimer code, I decided to remove the timer implementation from the patch set. I do have the userland interface to timer_create/settime in place, but no clock drivers implement it yet.
> I was hoping to find something I could re-use in the hrtimer code, but > it seemed a little tightly linked to the fixed CLOCK_MONOTONIC/REALTIME > bases.
That was my impression, too. It looks like hrtimers are hard-coded to the clock event device via a global per-cpu variable. Would it be possible to decouple this for multiple, different clock event devices?
Thanks, Richard
| |