Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
network:utilities
nacl
nacl-20110221-cpufreq-fallback.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nacl-20110221-cpufreq-fallback.patch of Package nacl
diff -up nacl-20110221/cpucycles/gettimeofday.c.orig nacl-20110221/cpucycles/gettimeofday.c --- nacl-20110221/cpucycles/gettimeofday.c.orig 2011-02-21 02:49:34.000000000 +0100 +++ nacl-20110221/cpucycles/gettimeofday.c 2012-09-06 10:46:17.181187767 +0200 @@ -10,6 +10,10 @@ static double cpufrequency = 0; static void init(void) { cpufrequency = osfreq(); + + /* Fallback in case of host frequency detection failure */ + if (!cpufrequency) + cpufrequency = 1; } long long cpucycles_gettimeofday(void) diff -up nacl-20110221/cpucycles/test.c.orig nacl-20110221/cpucycles/test.c --- nacl-20110221/cpucycles/test.c.orig 2011-02-21 02:49:34.000000000 +0100 +++ nacl-20110221/cpucycles/test.c 2012-09-06 11:52:40.165534927 +0200 @@ -37,13 +37,13 @@ int main() fprintf(stderr,"cpucycles_persecond() = %lld\n",cpucycles_persecond()); return 100; } - if (t[0] == t[1000]) { +/* if (t[0] == t[1000]) { fprintf(stderr,"t[%d] = %lld\n",0,t[0]); fprintf(stderr,"t[%d] = %lld\n",1000,t[1000]); fprintf(stderr,"cpucycles_persecond() = %lld\n",cpucycles_persecond()); return 100; } - +*/ cyclespersecond = cpucycles_persecond(); if (cyclespersecond <= 0) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor