From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31136 invoked by alias); 11 Dec 2003 10:50:27 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 31113 invoked from network); 11 Dec 2003 10:50:24 -0000 Received: from unknown (HELO jaguar.mkp.net) (192.139.46.146) by sources.redhat.com with SMTP; 11 Dec 2003 10:50:24 -0000 Received: from jes by jaguar.mkp.net with local (Exim 3.35 #1) id 1AUOIR-0002UJ-00; Thu, 11 Dec 2003 05:43:51 -0500 To: Ulrich Drepper Cc: davidm@hpl.hp.com, libc-hacker@sources.redhat.com Subject: Re: ia64 clock_gettime and HP_TIMING References: <16306.21333.78785.923547@gargle.gargle.HOWL> <3FB2751B.9010302@redhat.com> <3FB34B5A.2040209@redhat.com> <16308.3006.52067.235699@napali.hpl.hp.com> <3FB515DC.9010909@redhat.com> <3FD7AABA.9040809@redhat.com> From: Jes Sorensen Date: Thu, 11 Dec 2003 10:50:00 -0000 In-Reply-To: <3FD7AABA.9040809@redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-12/txt/msg00052.txt.bz2 >>>>> "Ulrich" == Ulrich Drepper 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