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

[Xen-changelog] [xen master] mini-os: moved unlikely/likely macros to new compiler.h



commit 3973f7f3314f83109f973d5d92841911d7839c31
Author:     Thomas Leonard <talex5@xxxxxxxxx>
AuthorDate: Thu Jun 26 12:28:31 2014 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Jun 27 14:13:20 2014 +0100

    mini-os: moved unlikely/likely macros to new compiler.h
    
    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(-)

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 73b8297..192b23cd 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>
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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