[lkml]   [2004]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] CPU time clock support in clock_* syscalls
    On Tue, 5 Oct 2004, Roland McGrath wrote:

    > > I just reviewed the code and to my surprise the simple things like
    > >
    > > clock_gettime(CLOCK_PROCESS_CPUTIME_ID) and
    > > clock_gettime(CLOCK_THREAD_CPUTIME_ID) are not supported.
    > You seem to be confused. A clockid_t for a CPU clock encodes a PID, which
    > can be zero to indicate the current thread or current process.

    Is there a standard for that? Or is it an opaque type that you have
    defined this way?

    > > The thread specific time measurements have nothing to do with the posix
    > > standard and may best be kept separate.
    > Nonsense. POSIX defines the notion of CPU clocks for these calls, and that
    > is what I have implemented.

    Posix only defines a process and a thread clock. This is much more.

    > Of course glibc is in charge of what the meaning of the POSIX APIs is.
    > That is true for every call.

    The proper information to realize these clocks is only available on the
    kernel level. A clean API for that would remove lots of code that
    currently exists in glibc.

    I wonder how glibc will realize access to special timer hardware. Will
    glibc be able load device drivers for timer chips?

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:06    [W:0.019 / U:1.440 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site