projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8550a33
)
eina_cpu: Fix error handling in eina_cpu_fast_core_get
author
Derek Foreman
<derekf@osg.samsung.com>
Mon, 19 Sep 2016 14:23:59 +0000
(09:23 -0500)
committer
Derek Foreman
<derekf@osg.samsung.com>
Mon, 19 Sep 2016 14:23:59 +0000
(09:23 -0500)
I introduced a crash on linux systems where the cpufreq directory
doesn't exist. This fixes it.
src/lib/eina/eina_cpu.c
patch
|
blob
|
history
diff --git
a/src/lib/eina/eina_cpu.c
b/src/lib/eina/eina_cpu.c
index
1de86d8
..
b5e6b90
100644
(file)
--- a/
src/lib/eina/eina_cpu.c
+++ b/
src/lib/eina/eina_cpu.c
@@
-396,6
+396,9
@@
_eina_cpu_fast_core_get(void)
if (fastest_core_speed == 0) eina_cpu_map_init();
+ /* Check again now that it's actually set up */
+ if (fastest_core_speed == -1) return -1;
+
corelist = eina_hash_find(cpu_hash, &fastest_core_speed);
cores = *corelist;
bit = rand() % __builtin_popcount(cores);