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

[Xen-changelog] [xen-unstable] tools/libxc: remove volatile keyword for bitmap operations



# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1328009707 0
# Node ID a056dcc72ed840b576a6f94973c11261acd841e3
# Parent  eabfa0150f1cbc328741676e7e6d95a511585634
tools/libxc: remove volatile keyword for bitmap operations

All bitmaps maintained by xc_bitops.h are used in single threaded
applications. So nothing will change the bitmaps content, adding
volatile adds just unneeded memory reloads.

xenpaging uses bitmaps alot and using non-volatile versions will
slightly improve performance.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r eabfa0150f1c -r a056dcc72ed8 tools/libxc/xc_bitops.h
--- a/tools/libxc/xc_bitops.h   Tue Jan 31 11:34:43 2012 +0000
+++ b/tools/libxc/xc_bitops.h   Tue Jan 31 11:35:07 2012 +0000
@@ -31,29 +31,29 @@
     memset(addr, 0, bitmap_size(nr_bits));
 }
 
-static inline int test_bit(int nr, volatile unsigned long *addr)
+static inline int test_bit(int nr, unsigned long *addr)
 {
     return (BITMAP_ENTRY(nr, addr) >> BITMAP_SHIFT(nr)) & 1;
 }
 
-static inline void clear_bit(int nr, volatile unsigned long *addr)
+static inline void clear_bit(int nr, unsigned long *addr)
 {
     BITMAP_ENTRY(nr, addr) &= ~(1UL << BITMAP_SHIFT(nr));
 }
 
-static inline void set_bit(int nr, volatile unsigned long *addr)
+static inline void set_bit(int nr, unsigned long *addr)
 {
     BITMAP_ENTRY(nr, addr) |= (1UL << BITMAP_SHIFT(nr));
 }
 
-static inline int test_and_clear_bit(int nr, volatile unsigned long *addr)
+static inline int test_and_clear_bit(int nr, unsigned long *addr)
 {
     int oldbit = test_bit(nr, addr);
     clear_bit(nr, addr);
     return oldbit;
 }
 
-static inline int test_and_set_bit(int nr, volatile unsigned long *addr)
+static inline int test_and_set_bit(int nr, unsigned long *addr)
 {
     int oldbit = test_bit(nr, addr);
     set_bit(nr, addr);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.