]> git.sesse.net Git - vlc/blobdiff - src/misc/cpu.c
Forgiven in the previous commit (useless test)
[vlc] / src / misc / cpu.c
index c928ace1a97e01b28e5fd85ec0db0d4a7373c8ef..2e0b218a0d1a119a4fabb4ba3aea399541f842db 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 
 #ifdef HAVE_SIGNAL_H
@@ -33,6 +37,8 @@
 #   include <setjmp.h>                                    /* longjmp, setjmp */
 #endif
 
+#include "libvlc.h"
+
 #if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__))
 #include <sys/sysctl.h>
 #endif
@@ -51,7 +57,7 @@ static void SigHandler   ( int );
 static jmp_buf env;
 static int     i_illegal;
 #if defined( __i386__ ) || defined( __x86_64__ )
-static char   *psz_capability;
+static const char *psz_capability;
 #endif
 #endif
 
@@ -338,3 +344,15 @@ static void SigHandler( int i_signal )
 }
 #endif
 
+
+uint32_t cpu_flags = 0;
+
+
+/*****************************************************************************
+ * vlc_CPU: get pre-computed CPU capability flags
+ ****************************************************************************/
+unsigned vlc_CPU (void)
+{
+    return cpu_flags;
+}
+