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

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


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

cpu: revector (nonfunctional change)

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

 src/misc/cpu.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/misc/cpu.c b/src/misc/cpu.c
index d42d7ed066..9d9c71fd98 100644
--- a/src/misc/cpu.c
+++ b/src/misc/cpu.c
@@ -55,8 +55,6 @@
 #include <machine/cpu.h>
 #endif
 
-static uint32_t cpu_flags;
-
 #if defined (__i386__) || defined (__x86_64__) || defined (__powerpc__) \
  || defined (__ppc__) || defined (__ppc64__) || defined (__powerpc64__)
 # if defined (HAVE_FORK)
@@ -113,10 +111,9 @@ static void Altivec_test (void)
 #endif
 
 /**
- * Determines the CPU capabilities and stores them in cpu_flags.
- * The result can be retrieved with vlc_CPU().
+ * Determines the CPU capabilities.
  */
-static void vlc_CPU_init(void)
+static unsigned vlc_CPU_raw(void)
 {
     uint32_t i_capabilities = 0;
 
@@ -247,8 +244,14 @@ out:
 #   endif
 
 #endif
+    return i_capabilities;
+}
 
-    cpu_flags = i_capabilities;
+static unsigned cpu_flags;
+
+static void vlc_CPU_init(void)
+{
+    cpu_flags = vlc_CPU_raw();
 }
 
 VLC_WEAK unsigned vlc_CPU(void)



More information about the vlc-commits mailing list