From owner-freebsd-alpha Sun Apr 29 8:46:37 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from iona.dcs.gla.ac.uk (iona.dcs.gla.ac.uk [130.209.240.35]) by hub.freebsd.org (Postfix) with ESMTP id 6ABEE37B422 for ; Sun, 29 Apr 2001 08:46:34 -0700 (PDT) (envelope-from neugebar@dcs.gla.ac.uk) Received: from therese.dcs.gla.ac.uk ([130.209.241.134] helo=therese.dcs.gla.ac.uk.dcs.gla.ac.uk) by iona.dcs.gla.ac.uk with esmtp (Exim 3.13 #1) id 14ttP2-00004z-00 for freebsd-alpha@FreeBSD.ORG; Sun, 29 Apr 2001 16:46:28 +0100 Received: by therese.dcs.gla.ac.uk.dcs.gla.ac.uk (8.11.2/Dumb) id f3TFkQm10321; Sun, 29 Apr 2001 16:46:26 +0100 (BST) To: freebsd-alpha@FreeBSD.ORG Subject: determine cycle counter frequency in user space From: Rolf Neugebauer Date: 29 Apr 2001 16:46:24 +0100 Message-ID: Lines: 17 User-Agent: Gnus/5.0805 (Gnus v5.8.5) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I try to determine the cycle counter frequency from a user space program to do some accurate time counting. Ideally, I would like to access the rpb_cc_freq field Hardware Restart Parameter Block (rpb) as possible under OSF/1 using getsysinfo(2) or the calibrated cycles_per_sec variable from sys/alpha/alpha/machdep.c. While it would be easy to introduce a new sysctl or similar, I was wondering if there is already a 'standard' way under FreeBSD to access this information (ideally, also under ix86). I searched around a bit, but couldn't find any obvious way. Thanks Rolf To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message