[vlc-devel] [PATCH 2/4] linux/cpu: revector (nonfunctional change)
RĂ©mi Denis-Courmont
remi at remlab.net
Sun Mar 29 22:43:53 CEST 2020
---
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..f9a82bb51e 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 uint32_t cpu_flags = 0;
+
+static void vlc_CPU_init(void)
+{
+ cpu_flags = vlc_CPU_raw();
}
unsigned vlc_CPU (void)
--
2.26.0
More information about the vlc-devel
mailing list