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]
Other format: [Raw text]

Re: ia64 clock_gettime and HP_TIMING


>>>>> "Ulrich" == Ulrich Drepper <drepper@redhat.com> writes:

Ulrich> All the machines I have looked at (mostly tigers) have "0" in
Ulrich> /proc/sal/itc_drift.  I.e., the machines wouldn't use the itc
Ulrich> which cannot be correct since they all use it now without
Ulrich> problems.

I just reread the code a couple of times and I think it's correct. The
machines that have the problem will have 1 in /proc/sal/itc_drift,
tigers don't drift so they return 0.

+		if (buf[0] != '0')
+		  __itc_drift_internal = 1;
+		else
+		  __itc_drift_internal = -1;

If the buffer is '1' __itc_drift_internal is set to 1, other values
will make it -1, ie. for the Tiger. Then further down where it checks
the value:

+    if (__itc_drift_internal != 1)
+      {
+	/* Store the number.  */
+	*clock_id = CLOCK_PROCESS_CPUTIME_ID;
+	retval = 0;
+      }

Ie. if its_drift_internal == -1 it will return
CLOCK_PROCESS_CPUTIME_ID and work as expected.

I might be confused so feel free to correct me if I misread it again.

Cheers,
Jes


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