From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110074 invoked by alias); 7 Oct 2019 19:55:25 -0000 Mailing-List: contact cygwin-cvs-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-cvs-owner@cygwin.com Received: (qmail 110059 invoked by uid 9996); 7 Oct 2019 19:55:25 -0000 Date: Mon, 07 Oct 2019 19:55:00 -0000 Message-ID: <20191007195525.110058.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Ken Brown To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] fhandler_proc.cc(format_proc_cpuinfo): round cpu MHz X-Act-Checkin: newlib-cygwin X-Git-Author: Brian Inglis X-Git-Refname: refs/heads/master X-Git-Oldrev: 7a0496f78f60d43cf9545a794cbf8c00d7bb8e02 X-Git-Newrev: 70e834ea7c970dd9bf98167e0cf7d4d7c643a225 X-SW-Source: 2019-q4/txt/msg00004.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=70e834ea7c970dd9bf98167e0cf7d4d7c643a225 commit 70e834ea7c970dd9bf98167e0cf7d4d7c643a225 Author: Brian Inglis Date: Mon Oct 7 10:23:01 2019 -0600 fhandler_proc.cc(format_proc_cpuinfo): round cpu MHz Round cpu MHz to correct Windows and match Linux cpuinfo. Diff: --- winsup/cygwin/fhandler_proc.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index c94cde9..86c1f62 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -695,6 +695,7 @@ format_proc_cpuinfo (void *, char *&destbuf) RtlQueryRegistryValues (RTL_REGISTRY_ABSOLUTE, cpu_key, tab, NULL, NULL); + cpu_mhz = ((cpu_mhz - 1) / 10 + 1) * 10; /* round up to multiple of 10 */ bufptr += __small_sprintf (bufptr, "processor\t: %d\n", cpu_number); uint32_t maxf, vendor_id[4], unused;