timer_create() returns EINVAL for CLOCK_PROCESS_CPUTIME_ID

Ulrich Drepper drepper@redhat.com
Wed May 12 00:21:00 GMT 2004


Li, Adam wrote:

> The test case will try to create a timer using CLOCK_PROCESS_CPUTIME_ID. 

It won't work, ever.  The CPUTIME we provide is a clock only.  There is
no timer associated.  The problem is that what POSIX doesn't make it
very clear what the clock is supposed to do.  Now I know it's supposed
to measure the runtime (system+userspace code) of the process.  Which is
different from the high-resolution clock we implement which is monotonic
and independent of the process runtime.  Maybe at some point when the
kernel provide a real implementation of the CPU runtime clock we do
something to take care of the discrepancy but for now we are not.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖



More information about the Libc-alpha mailing list