This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Revised: IA64 HP_TIMING fixes for SMP systems with unsynchronizedITC


On Fri, 4 Jun 2004, Ulrich Drepper wrote:

> Christoph Lameter wrote:
>
> > However, if ITC is not realiable then also
> > clock_gettime(CLOCK_PROCESS_CPUTIME_ID) and
> > clock_gettime(CLOCK_THREAD_CPUTIME_ID) will still return unusable data to
> > the application. We would need to modify clock_gettime to also return an
> > error on those.
>
> No, this is an application bug. We are not making the implementation
> slower and bigger because programmers might misuse the interfaces.

So the application must know that if clock_getcpuclockid() returns an
error then also clock_gettime does not work reliably?

I do not see that anywhere in the Single Unix specification. No
application would make that inference. Note that return code ENOSYS
used by clock_getcpuclockid() is not mentioned in the Single Unix
Specification. clock_gettime would need to return EINVAL for the process
and the thread clock in order for an application to realize that these
clocks do not work reliably.

Note that the proposed patch only affects one arch (ia64).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]