[ELDK] using other clocks with timer_create

Robert Iakobashvili coroberti at gmail.com
Tue Sep 23 13:35:39 CEST 2008


Hi Seimon,

On Tue, Sep 23, 2008 at 11:25 AM, Seimon Williams <sw at remsdaq.com> wrote:
> Hi,
>
> We're using ELDK 4.0 on an arm9 based project and I'm having some trouble with the timer_create call.
>
> I believe I need to use the CLOCK_MONOTONIC clock when I call timer_create so that the timer is not affected by a system time change as it is with CLOCK_REALTIME, but when I try to call timer_create I get EINVAL which indicates that the clock is not supported. I'm using kernel 2.6.15 and I thought that the Monotonic clock was supported.
>
> So I looked deeper into the glibc-2.3.5 code from the ELDK Source CD, and noticed a million #ifdefs! I'm not too sure which bit is used and which isn't at the moment, but I think basically my question is if I rebuild glibc and somehow point it at my kernel code will I get the use of the monotonic clock? If so, can anyone give me some quick dummy pointers as to how to go about that - it scares me!
>
> Thanks for your time,
>
> Seimon

We had some similar issue on arm with CLOCK_MONOTONIC, where kernel 2.4 series
+ MV patches was not fully supporting it (the code was inside, but the
syscall was not opened in the map of system calls of kernel).

When we patched it and re-built out toolchain, glibc has seen the
syscall, and made the right
choice of supporting it (before we got EINVAL).

Take care.

Truly,
Robert Iakobashvili, Ph.D.
......................................................................
Assistive technology that understands you
......................................................................


More information about the eldk mailing list