[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH ARM v5 14/20] mini-os: moved unlikely/likely macros to new compiler.h



Thomas Leonard, le Thu 26 Jun 2014 12:28:31 +0100, a écrit :
> Requested by Julien Grall.
> 
> Signed-off-by: Thomas Leonard <talex5@xxxxxxxxx>

Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

> ---
>  extras/mini-os/include/compiler.h | 5 +++++
>  extras/mini-os/include/x86/os.h   | 7 +------
>  2 files changed, 6 insertions(+), 6 deletions(-)
>  create mode 100644 extras/mini-os/include/compiler.h
> 
> diff --git a/extras/mini-os/include/compiler.h 
> b/extras/mini-os/include/compiler.h
> new file mode 100644
> index 0000000..e35c9d5
> --- /dev/null
> +++ b/extras/mini-os/include/compiler.h
> @@ -0,0 +1,5 @@
> +#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
> +#define __builtin_expect(x, expected_value) (x)
> +#endif
> +#define unlikely(x)  __builtin_expect((x),0)
> +#define likely(x)  __builtin_expect((x),1)
> diff --git a/extras/mini-os/include/x86/os.h b/extras/mini-os/include/x86/os.h
> index 9e3f9bf..7a1bdc5 100644
> --- a/extras/mini-os/include/x86/os.h
> +++ b/extras/mini-os/include/x86/os.h
> @@ -7,16 +7,11 @@
>  #ifndef _OS_H_
>  #define _OS_H_
>  
> -#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
> -#define __builtin_expect(x, expected_value) (x)
> -#endif
> -#define unlikely(x)  __builtin_expect((x),0)
> -#define likely(x)  __builtin_expect((x),1)
> -
>  #define smp_processor_id() 0
>  
>  
>  #ifndef __ASSEMBLY__
> +#include <mini-os/compiler.h>
>  #include <mini-os/types.h>
>  #include <mini-os/hypervisor.h>
>  #include <mini-os/kernel.h>
> -- 
> 2.0.0
> 

-- 
Samuel
 jr> J'ai fait.
 Ne bougez pas, l'aide soignante va venir nettoyer.
 -+- FF in GNU - Le vieil homme et la merde -+-

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.