[vlc-devel] [PATCH 2/4] linux/cpu: revector (nonfunctional change)

Steve Lhomme robux4 at ycbcr.xyz
Mon Mar 30 08:22:01 CEST 2020



On 2020-03-29 22:43, RĂ©mi Denis-Courmont wrote:
> ---
>   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)

Should be uint32_t.

>   {
>       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
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list