direct-io.hg

changeset 10480:f91cc71173c5

[TOOLS] Fix set_bit/clear bit for x86/64 in xc_linux_save
From: John Byrne <john.l.byrne@hp.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jun 22 21:37:33 2006 +0100 (2006-06-22)
parents f10127505d3c
children 28a752998a23 fdf25330e4a6
files tools/libxc/xc_linux_save.c
line diff
     1.1 --- a/tools/libxc/xc_linux_save.c	Thu Jun 22 21:30:51 2006 +0100
     1.2 +++ b/tools/libxc/xc_linux_save.c	Thu Jun 22 21:37:33 2006 +0100
     1.3 @@ -91,12 +91,12 @@ static inline int test_bit (int nr, vola
     1.4  
     1.5  static inline void clear_bit (int nr, volatile void * addr)
     1.6  {
     1.7 -    BITMAP_ENTRY(nr, addr) &= ~(1 << BITMAP_SHIFT(nr));
     1.8 +    BITMAP_ENTRY(nr, addr) &= ~(1UL << BITMAP_SHIFT(nr));
     1.9  }
    1.10  
    1.11  static inline void set_bit ( int nr, volatile void * addr)
    1.12  {
    1.13 -    BITMAP_ENTRY(nr, addr) |= (1 << BITMAP_SHIFT(nr));
    1.14 +    BITMAP_ENTRY(nr, addr) |= (1UL << BITMAP_SHIFT(nr));
    1.15  }
    1.16  
    1.17  /* Returns the hamming weight (i.e. the number of bits set) in a N-bit word */