This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: timer_create() returns EINVAL for CLOCK_PROCESS_CPUTIME_ID
- From: Ulrich Drepper <drepper at redhat dot com>
- To: "Li, Adam" <adam dot li at intel dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Tue, 11 May 2004 17:20:31 -0700
- Subject: Re: timer_create() returns EINVAL for CLOCK_PROCESS_CPUTIME_ID
- Organization: Red Hat, Inc.
- References: <A12F5F3545A0654B97BFD863950C1E1803B0812F@PDSMSX403.ccr.corp.intel.com>
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 â