[vlc-commits] linux/cpu: revector (nonfunctional change)

Rémi Denis-Courmont git at videolan.org
Mon Mar 30 15:51:27 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar 29 17:16:34 2020 +0300| [674602054eb98f2d308662b1dd45c57bdd20d380] | committer: Rémi Denis-Courmont

linux/cpu: revector (nonfunctional change)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=674602054eb98f2d308662b1dd45c57bdd20d380
---

 src/linux/cpu.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/linux/cpu.c b/src/linux/cpu.c
index 1b240a7082..b8a4b4d354 100644
--- a/src/linux/cpu.c
+++ b/src/linux/cpu.c
@@ -40,13 +40,11 @@
 #endif
 
 #ifdef CPU_FLAGS
-static uint32_t cpu_flags = 0;
-
-static void vlc_CPU_init (void)
+static unsigned vlc_CPU_raw(void)
 {
     FILE *info = fopen ("/proc/cpuinfo", "rte");
     if (info == NULL)
-        return;
+        return 0;
 
     char *line = NULL;
     size_t linelen = 0;
@@ -120,7 +118,14 @@ static void vlc_CPU_init (void)
     if (all_caps == 0xFFFFFFFF) /* Error parsing of cpuinfo? */
         all_caps = 0; /* Do not assume any capability! */
 
-    cpu_flags = all_caps;
+    return all_caps;
+}
+
+static unsigned cpu_flags = 0;
+
+static void vlc_CPU_init(void)
+{
+    cpu_flags = vlc_CPU_raw();
 }
 
 unsigned vlc_CPU (void)



More information about the vlc-commits mailing list