aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_bitops.h
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2012-01-31 11:35:07 +0000
committerOlaf Hering <olaf@aepfle.de>2012-01-31 11:35:07 +0000
commit5028e9bb656906ec217d6729f784424a06f37e6d (patch)
tree03ea4c2b1a4a016ff525e7ff5430e668318ee442 /tools/libxc/xc_bitops.h
parent05693908d1bb548cc090fe45cff939bb47d49783 (diff)
downloadxen-5028e9bb656906ec217d6729f784424a06f37e6d.tar.gz
xen-5028e9bb656906ec217d6729f784424a06f37e6d.tar.bz2
xen-5028e9bb656906ec217d6729f784424a06f37e6d.zip
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@aepfle.de> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'tools/libxc/xc_bitops.h')
-rw-r--r--tools/libxc/xc_bitops.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/libxc/xc_bitops.h b/tools/libxc/xc_bitops.h
index 274d8c8b0e..d8e0c168d7 100644
--- a/tools/libxc/xc_bitops.h
+++ b/tools/libxc/xc_bitops.h
@@ -31,29 +31,29 @@ static inline void bitmap_clear(unsigned long *addr, int nr_bits)
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);