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

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

CPU clock handling


I've just checked in a bunch of fixes for the x86 CPU clock handling.
The standard is a bit weak since it does not explain in the places
where you would expect what the requirements for the clocks are.  I've
read a bit more in the standard and came to the conclusion that the
semantics is as follows:

- the CPU clock for the process starts as zero when the process starts
  (well, at least to some degree, the 100% correct start time cannot be
  determined).  What happened so far is the time from the startup of the
  system was returned

- the thread CPU clocks are handled similarly, namely, they start at
  thread creation time.  So far they were handled exactly like the
  process CPU clock.

This interpretation makes much more sense and is more useful.  It also
allows a trivial implementation of clock_settime for these clocks.

In case somebody wants to implement CPU clocks for another
architecture please look at the x86 code.  There are also some changes
to the thread library necessary.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


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